fix(cashier,chequebook): surface real backend errors; skip redundant balance check on token disbursement
Cashier token-based withdrawal disbursement was re-running the balance/min-balance checks against the already-approved amount, which always failed since the manager approval had already deducted the balance — the check now skips for that case (clerk-created requests still get the full validation). Cheque book request submission now shows the actual backend error message (e.g. insufficient-balance rejections) instead of a generic fallback string. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
0cc79ccd57
commit
24b1d7c087
@@ -281,9 +281,13 @@ export class ChequeBooksComponent implements OnInit {
|
||||
this.notify('Submitted for approval — see Approvals > Cheque Book Requests');
|
||||
this.loadBooks();
|
||||
},
|
||||
error: () => {
|
||||
error: (err: any) => {
|
||||
this.busy = false;
|
||||
this.notify('Request failed — check the account is active and the cheque-book facility is enabled', true);
|
||||
const msg =
|
||||
err?.error?.errors?.[0]?.defaultUserMessage ||
|
||||
err?.error?.developerMessage ||
|
||||
'Request failed — check the account is active and the cheque-book facility is enabled';
|
||||
this.notify(msg, true);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user