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) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
89e17f561f
commit
555d9fb4b7
+6
-1
@@ -402,7 +402,12 @@
|
||||
<fa-icon icon="times" class="m-r-6"></fa-icon>
|
||||
{{ 'labels.buttons.Cancel' | translate }}
|
||||
</button>
|
||||
<button mat-flat-button type="submit" class="sat__submit" [disabled]="!currentAccountTransactionForm.valid">
|
||||
<button
|
||||
mat-flat-button
|
||||
type="submit"
|
||||
class="sat__submit"
|
||||
[disabled]="!currentAccountTransactionForm.valid || (denominationTotal > 0 && !denominationMatchesForm)"
|
||||
>
|
||||
<fa-icon icon="check" class="m-r-6"></fa-icon>
|
||||
{{ 'labels.buttons.Submit' | translate }}
|
||||
</button>
|
||||
|
||||
+4
-1
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user