feat(cashier): integrate expected balance, settlement verification, and reconciliation checks
This commit is contained in:
@@ -73,6 +73,7 @@ export class ReconciliationComponent implements OnInit {
|
||||
cashierName = '';
|
||||
reconDate = '';
|
||||
note = '';
|
||||
varianceReason = '';
|
||||
rows: DenomRow[] = [];
|
||||
loadingExpected = false;
|
||||
saving = false;
|
||||
@@ -162,7 +163,11 @@ export class ReconciliationComponent implements OnInit {
|
||||
return v === 0 ? 'OK' : v > 0 ? 'EXCESS' : 'SHORT';
|
||||
}
|
||||
get valid(): boolean {
|
||||
return !!this.selectedCashierId && this.rows.length > 0;
|
||||
return (
|
||||
!!this.selectedCashierId &&
|
||||
this.rows.length > 0 &&
|
||||
(this.totalVariance === 0 || this.varianceReason.trim().length > 0)
|
||||
);
|
||||
}
|
||||
|
||||
submit(): void {
|
||||
@@ -173,7 +178,13 @@ export class ReconciliationComponent implements OnInit {
|
||||
tellerId: this.selectedTellerId,
|
||||
cashierName: this.cashierName,
|
||||
reconDate: this.reconDate,
|
||||
note: this.note || null,
|
||||
note:
|
||||
[
|
||||
this.note,
|
||||
this.totalVariance !== 0 ? `Variance reason: ${this.varianceReason}` : null
|
||||
]
|
||||
.filter(Boolean)
|
||||
.join(' | ') || null,
|
||||
denominations: this.rows.map((r) => ({
|
||||
denominationId: r.denominationId,
|
||||
denominationValue: r.denominationValue,
|
||||
@@ -190,6 +201,7 @@ export class ReconciliationComponent implements OnInit {
|
||||
});
|
||||
this.rows = [];
|
||||
this.note = '';
|
||||
this.varianceReason = '';
|
||||
this.saving = false;
|
||||
this.loadHistory();
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user