diff --git a/src/app/cashier/transaction-entry/transaction-entry.component.html b/src/app/cashier/transaction-entry/transaction-entry.component.html index 631fdfbca..07fee8993 100644 --- a/src/app/cashier/transaction-entry/transaction-entry.component.html +++ b/src/app/cashier/transaction-entry/transaction-entry.component.html @@ -681,7 +681,7 @@
4.Freeze Amount - {{ currencySymbol }}{{ freezeAmount | number: '1.2-2' }} + {{ currencySymbol }}0.00
5.Withdrawable Amt. @@ -746,7 +746,7 @@
Transfer Hold - 0.00 + {{ freezeAmount | number: '1.2-2' }}
Clearing Hold @@ -862,7 +862,7 @@
Tr. Hold - 0.00 + {{ freezeAmount | number: '1.2-2' }}
Clr. Hold diff --git a/src/app/cashier/transaction-entry/transaction-entry.component.ts b/src/app/cashier/transaction-entry/transaction-entry.component.ts index a832befe2..7caf560e6 100644 --- a/src/app/cashier/transaction-entry/transaction-entry.component.ts +++ b/src/app/cashier/transaction-entry/transaction-entry.component.ts @@ -1999,12 +1999,29 @@ export class TransactionEntryComponent implements OnInit, OnDestroy { } get freezeAmount(): number { - return this.accountDetails?.summary?.holdAmountBalance ?? 0; + // Savings exposes the lien/user hold as root-level `savingsAmountOnHold`; Current exposes its + // own (differently-sourced) hold as `onHoldFunds`. `summary.holdAmountBalance` never existed in + // either API response, so this always read 0 before. + const acTyp = this.selectedRow?.acTyp; + const isCurrent = acTyp === 'CA' || acTyp === 'CB'; + if (isCurrent) { + return this.accountDetails?.onHoldFunds ?? this.accountDetails?.summary?.onHoldFunds ?? 0; + } + return this.accountDetails?.savingsAmountOnHold ?? 0; } get withdrawableAmount(): number { const avail = this.accountDetails?.summary?.availableBalance ?? this.currentBalance; - return Math.max(0, avail - this.freezeAmount); + const acTyp = this.selectedRow?.acTyp; + const isCurrent = acTyp === 'CA' || acTyp === 'CB'; + // Savings' availableBalance is already computed hold-adjusted on the backend (subtracts both + // guarantor and lien holds) — subtracting freezeAmount again here would double-count it. + // Current's availableBalance is just the raw balance and does NOT subtract its hold, so it + // still needs freezeAmount subtracted client-side. + if (isCurrent) { + return Math.max(0, avail - this.freezeAmount); + } + return Math.max(0, avail); } get currencySymbol(): string { diff --git a/src/app/savings/savings-account-view/general-tab/general-tab.component.html b/src/app/savings/savings-account-view/general-tab/general-tab.component.html index 4a9182157..68ddc9f50 100644 --- a/src/app/savings/savings-account-view/general-tab/general-tab.component.html +++ b/src/app/savings/savings-account-view/general-tab/general-tab.component.html @@ -350,6 +350,16 @@
} + @if (savingsAccountData.savingsAmountOnHold) { +
+ {{ 'labels.inputs.On Hold Amount (Lien)' | translate }} + + + {{ savingsAccountData.savingsAmountOnHold | currency: currency.code : 'symbol-narrow' : '1.2-2' }} + + +
+ } @if (savingsAccountData.withHoldTax) {
{{ 'labels.inputs.Withhold Tax Group' | translate }} diff --git a/src/assets/translations/en-US.json b/src/assets/translations/en-US.json index df7f79915..33dd14aee 100644 --- a/src/assets/translations/en-US.json +++ b/src/assets/translations/en-US.json @@ -2513,6 +2513,7 @@ "Offices Loan Products": "Offices --> Loan Products", "Offices Savings Products": "Offices --> Savings Products", "On Arrears Aging": "On Arrears Aging", + "On Hold Amount (Lien)": "On Hold Amount (Lien)", "On Hold Funds": "On Hold Funds", "On Month Day": "On Month Day", "On arrears ageing": "On arrears ageing",