From 555d9fb4b738de6f6ca5504b08a33c083d3a19d2 Mon Sep 17 00:00:00 2001 From: Jaanu423 Date: Wed, 27 May 2026 18:37:19 +0530 Subject: [PATCH] feat: send denominationId in deposit payload + block submit on denomination mismatch - All 4 deposit forms (Current/Savings/FD/RD) now send denominationId + denominationValue in denominationBreakdown so the backend can persist rows. - Submit is disabled when a denomination breakdown is entered but its total does not match the transaction amount. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../current-account-transactions.component.html | 7 ++++++- .../current-account-transactions.component.ts | 5 ++++- .../fixed-deposits-cash-transaction.component.html | 7 ++++++- .../fixed-deposits-cash-transaction.component.ts | 10 +++++++++- .../deposit-recurring-deposits-account.component.html | 7 ++++++- .../deposit-recurring-deposits-account.component.ts | 10 +++++++++- .../savings-account-transactions.component.html | 7 ++++++- .../savings-account-transactions.component.ts | 5 ++++- 8 files changed, 50 insertions(+), 8 deletions(-) diff --git a/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.html b/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.html index 9d3973bb7..9a610910c 100644 --- a/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.html +++ b/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.html @@ -402,7 +402,12 @@ {{ 'labels.buttons.Cancel' | translate }} - diff --git a/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.ts b/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.ts index fe99882ae..6886849b1 100644 --- a/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.ts +++ b/src/app/current-accounts/current-account-actions/current-account-transactions/current-account-transactions.component.ts @@ -35,6 +35,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** Single Indian denomination row (note or coin). */ interface Denomination { + id: number; value: number; kind: 'note' | 'coin'; label: string; @@ -138,6 +139,7 @@ export class CurrentAccountTransactionsComponent implements OnInit { this.denominationMasterService.getAll().subscribe({ next: (list: any[]) => { const rows: Denomination[] = (list || []).map((d) => ({ + id: d.id, value: d.denomination, kind: d.kind as 'note' | 'coin', label: '₹' + d.denomination, @@ -399,7 +401,8 @@ export class CurrentAccountTransactionsComponent implements OnInit { ...this.coins ] .map((d) => ({ - denomination: d.value, + denominationId: d.id, + denominationValue: d.value, kind: d.kind, count: this.countFor(d), subtotal: this.subtotalFor(d) diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html index fa6b7df27..8ba08466d 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.html @@ -368,7 +368,12 @@ {{ 'labels.buttons.Cancel' | translate }} - diff --git a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts index a6698c0e2..165f9f1bd 100644 --- a/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts +++ b/src/app/deposits/fixed-deposits/fixed-deposits-account-actions/fixed-deposits-cash-transaction/fixed-deposits-cash-transaction.component.ts @@ -32,6 +32,7 @@ import { IdentityVerifyDialogComponent } from '../../../../savings/saving-accoun import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; interface Denomination { + id: number; value: number; kind: 'note' | 'coin'; label: string; @@ -117,6 +118,7 @@ export class FixedDepositsCashTransactionComponent implements OnInit { this.denominationMasterService.getAll().subscribe({ next: (list: any[]) => { const rows: Denomination[] = (list || []).map((d) => ({ + id: d.id, value: d.denomination, kind: d.kind as 'note' | 'coin', label: '₹' + d.denomination, @@ -308,7 +310,13 @@ export class FixedDepositsCashTransactionComponent implements OnInit { ...this.notes, ...this.coins ] - .map((d) => ({ denomination: d.value, kind: d.kind, count: this.countFor(d), subtotal: this.subtotalFor(d) })) + .map((d) => ({ + denominationId: d.id, + denominationValue: d.value, + kind: d.kind, + count: this.countFor(d), + subtotal: this.subtotalFor(d) + })) .filter((row) => row.count > 0); } this.fixedDepositsService diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html index f4d2869da..ebbd9951b 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.html @@ -374,7 +374,12 @@ {{ 'labels.buttons.Cancel' | translate }} - diff --git a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts index a22dea89b..15804c827 100644 --- a/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts +++ b/src/app/deposits/recurring-deposits/recurring-deposits-account-actions/deposit-recurring-deposits-account/deposit-recurring-deposits-account.component.ts @@ -35,6 +35,7 @@ import { IdentityVerifyDialogComponent } from '../../../../savings/saving-accoun import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; interface Denomination { + id: number; value: number; kind: 'note' | 'coin'; label: string; @@ -135,6 +136,7 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { this.denominationMasterService.getAll().subscribe({ next: (list: any[]) => { const rows: Denomination[] = (list || []).map((d) => ({ + id: d.id, value: d.denomination, kind: d.kind as 'note' | 'coin', label: '₹' + d.denomination, @@ -329,7 +331,13 @@ export class DepositRecurringDepositsAccountComponent implements OnInit { ...this.notes, ...this.coins ] - .map((d) => ({ denomination: d.value, kind: d.kind, count: this.countFor(d), subtotal: this.subtotalFor(d) })) + .map((d) => ({ + denominationId: d.id, + denominationValue: d.value, + kind: d.kind, + count: this.countFor(d), + subtotal: this.subtotalFor(d) + })) .filter((row) => row.count > 0); } this.recurringDepositsService diff --git a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html index a2b686307..bfc2bc19a 100644 --- a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html +++ b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.html @@ -402,7 +402,12 @@ {{ 'labels.buttons.Cancel' | translate }} - diff --git a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts index e9dbeed9c..e2a242514 100644 --- a/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts +++ b/src/app/savings/saving-account-actions/savings-account-transactions/savings-account-transactions.component.ts @@ -35,6 +35,7 @@ import { STANDALONE_SHARED_IMPORTS } from 'app/standalone-shared.module'; /** Single Indian denomination row (note or coin). */ interface Denomination { + id: number; value: number; kind: 'note' | 'coin'; label: string; @@ -155,6 +156,7 @@ export class SavingsAccountTransactionsComponent implements OnInit { this.denominationMasterService.getAll().subscribe({ next: (list: any[]) => { const rows: Denomination[] = (list || []).map((d) => ({ + id: d.id, value: d.denomination, kind: d.kind as 'note' | 'coin', label: '₹' + d.denomination, @@ -457,7 +459,8 @@ export class SavingsAccountTransactionsComponent implements OnInit { ...this.coins ] .map((d) => ({ - denomination: d.value, + denominationId: d.id, + denominationValue: d.value, kind: d.kind, count: this.countFor(d), subtotal: this.subtotalFor(d)