Skip to content

DecreasedTable

reference
1 min readUpdated

Kind: Class

Source: Pams/Web/Pams.WebApp/Client/app/models/common/decreased-table.model.ts (line 2)

Part of: Pams

DecreasedTable manages source and target currency symbol state for a decreased-value table model. Its methods reset symbols and handle currency-change events so related UI state can stay aligned with selected currencies.

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.ToValue == null.
  • 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
  UI[Currency selection UI] --> FromChange[FromcurrencyChange()]
  UI --> ToChange[TocurrencyChange()]
  FromChange --> Table[DecreasedTable]
  ToChange --> Table
  ResetFrom[resetFromSymobl()] --> Table
  ResetTo[resetToSymobl()] --> Table

Usage

ts
import { DecreasedTable } from './models/common/decreased-table.model';

const decreasedTable = new DecreasedTable();

// Handle source and target currency selection changes.
decreasedTable.FromcurrencyChange();
decreasedTable.TocurrencyChange();

// Reset currency symbol state when clearing the table or form.
decreasedTable.resetFromSymobl();
decreasedTable.resetToSymobl();

AI Coding Instructions

  • Keep the existing method names and casing, including Symobl, when calling this class.
  • Call FromcurrencyChange() and TocurrencyChange() from the matching currency selection handlers.
  • Reset symbol state with resetFromSymobl() or resetToSymobl() when clearing related form state.
  • Check connected components and templates before changing currency-state behavior.

Relationships

  • IMPORTS → AppSettings

Used by

3 references from 3 files. Each is a place in this repository where the symbol is actually used — go read one rather than trusting an example.

Imported by (3)

  • SupplierContractualInfoPams/Web/Pams.WebApp/Client/app/models/common/supplier-contractual-info.model.ts:6
  • AccountPams/Web/Pams.WebApp/Client/app/models/person/accounts.model.ts:10
  • SupplierPams/Web/Pams.WebApp/Client/app/models/person/supplier.model.ts:9

Was this page helpful?

Download as PDF