Skip to content

DecreasedTable

reference
1 min readUpdated

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

MethodSignatureReturns
resetFromSymoblresetFromSymobl()void
FromcurrencyChangeFromcurrencyChange(e: any)void
TocurrencyChangeTocurrencyChange(e: any)void
resetToSymoblresetToSymobl()void

Properties

PropertyType
IDnumber
SupplierIDnumber
DecreasedTableSerialnumber
FromValuenumber
ToValuenumber
FormCurrencyCodestring
ToCurrencyCodestring
Percentagenumber
_FromCurrencySymbolstring
_ToCurrencySymbolstring

Where it refuses work

  • DecreasedTable stops the work with an early return when this._FromCurrencySymbol != "".
  • DecreasedTable stops the work with an early return when this._ToCurrencySymbol != "".

Diagram

mermaid
graph 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

ts
const 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 Symobl and 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 and TocurrencyChange() 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)

  • DecreassedMarginComponentFrontend/src/app/components/shared/decreassed-margin/decreassed-margin.component.ts:1
  • SupplierContractualInfoFrontend/src/app/models/common/supplier-contractual-info.model.ts:7
  • AccountTypeFrontend/src/app/models/person/accounts.model.ts:13
  • SupplierFrontend/src/app/models/person/supplier.model.ts:9

Was this page helpful?

Download as PDF