Kind: Class
Source: Frontend/src/app/models/common/decreased-table.model.ts (line 2)
Part of: Frontend
DecreasedTable stores the from/to symbol and currency state used by a decreased-table view or calculation flow. Its methods reset symbol values and react to currency changes for each side of the table.
Methods
| Method | Signature | Returns |
|---|---|---|
resetFromSymobl | resetFromSymobl() | void |
FromcurrencyChange | FromcurrencyChange(e: any) | void |
TocurrencyChange | TocurrencyChange(e: any) | void |
resetToSymobl | resetToSymobl() | void |
Properties
| Property | Type |
|---|---|
ID | number |
SupplierID | number |
DecreasedTableSerial | number |
FromValue | number |
ToValue | number |
FormCurrencyCode | string |
ToCurrencyCode | string |
Percentage | number |
_FromCurrencySymbol | string |
_ToCurrencySymbol | string |
Where it refuses work
DecreasedTablestops the work with an early return whenthis._FromCurrencySymbol != "".DecreasedTablestops the work with an early return whenthis._ToCurrencySymbol != "".
Diagram
mermaidgraph LR DecreasedTable[DecreasedTable] FromSymbol[From Symbol] FromCurrency[From Currency] ToSymbol[To Symbol] ToCurrency[To Currency] DecreasedTable -->|resetFromSymobl| FromSymbol DecreasedTable -->|FromcurrencyChange| FromCurrency DecreasedTable -->|TocurrencyChange| ToCurrency DecreasedTable -->|resetToSymobl| ToSymbol
Usage
tsconst decreasedTable = new DecreasedTable();
// Reset selected symbols when the related currency changes.
decreasedTable.FromcurrencyChange();
decreasedTable.resetFromSymobl();
decreasedTable.TocurrencyChange();
decreasedTable.resetToSymobl();
AI Coding Instructions
- Preserve the existing method names, including
Symobland the current capitalization of currency-change methods. - Call the matching reset method after changes that invalidate the selected from or to symbol.
- Keep from-side and to-side updates separate; use
FromcurrencyChange()for from state andTocurrencyChange()for to state. - Check component and service call sites before changing reset behavior, since these methods may clear dependent form state.
Relationships
- IMPORTS →
AppSettings
Used by
4 references from 4 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.
Imported by (4)
DecreassedMarginComponent—Frontend/src/app/components/shared/decreassed-margin/decreassed-margin.component.ts:1SupplierContractualInfo—Frontend/src/app/models/common/supplier-contractual-info.model.ts:7AccountType—Frontend/src/app/models/person/accounts.model.ts:13Supplier—Frontend/src/app/models/person/supplier.model.ts:9
Was this page helpful?