# DecreasedTable

**Kind:** Class

**Source:** `Frontend/src/app/models/common/decreased-table.model.ts` (line 2)

**Part of:** [Frontend](subsystem-frontend-src-app)

`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

- `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)

- `DecreassedMarginComponent` — `Frontend/src/app/components/shared/decreassed-margin/decreassed-margin.component.ts`:1
- `SupplierContractualInfo` — `Frontend/src/app/models/common/supplier-contractual-info.model.ts`:7
- `AccountType` — `Frontend/src/app/models/person/accounts.model.ts`:13
- `Supplier` — `Frontend/src/app/models/person/supplier.model.ts`:9
