feat(cashier,organization): denomination-aware vault UI, Bank/Branch Profile screens, popup disbursement review
Branch Day open/close now captures a denomination-wise count (carried forward automatically to the next day), and shows an auto-fetched EOD summary at close time -- vault + every cashier's position, a branch-total reconciliation against the book figure, and each cashier's reconciliation/settlement status and transaction count -- so closing the day no longer means separately checking Vault Position and every cashier's own screen by hand. New Vault Position screen (branch-ops menu) mirrors Cashier Position for the teller/vault. Cash Transfer now shows the vault's live per-denomination availability while counting a handout, with a client-side warning before it can be over-counted. New Organization screens for Bank Profile, Branch Profile and Clearing GL Configuration, wired into the Organization landing page and the previously-dead "Bank Profile" admin menu button. Cashier Transaction Entry: TYPE is now Receipt/Payment only (cash-only TXN TP.) on the cashier side, with no change to the clerk dashboard's own Withdrawal Slip/Cheque/Disbursement/Enter Bank Transfer/DD flow beyond adding a new Fund Transfer type alongside Disbursement for a GL credit that isn't a loan payout. Neither TYPE nor TXN TP. offers a blank placeholder option anymore -- a new row starts on a real default instead. Footer no longer polls the business-date config for cashier/clerk roles, who never have permission to read it. Disbursement & Transfer Requests: "Review" now opens the review screen as a popup instead of navigating to a separate route, refreshing the list on close; the review screen recognises the new Fund Transfer request type too, and its non-functional "+ Disbursement Review" tab-styled label is now a plain heading. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -37,8 +37,10 @@ export class CashierService {
|
||||
}
|
||||
|
||||
// ── Tellers / Cashiers ──
|
||||
getTellers(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/tellers');
|
||||
getTellers(officeId?: number): Observable<any[]> {
|
||||
let params = new HttpParams();
|
||||
if (officeId) params = params.set('officeId', String(officeId));
|
||||
return this.http.get<any[]>('/tellers', { params });
|
||||
}
|
||||
getAllCashiers(): Observable<any[]> {
|
||||
return this.http.get<any[]>('/cashiers');
|
||||
@@ -227,11 +229,17 @@ export class CashierService {
|
||||
return this.http.get('/branchday/close-preview', { params });
|
||||
}
|
||||
|
||||
openBranchDay(businessDate: string, openingCash?: number, officeId?: number): Observable<any> {
|
||||
openBranchDay(
|
||||
businessDate: string,
|
||||
openingCash?: number,
|
||||
officeId?: number,
|
||||
denominations?: { denominationId: number; denominationValue: number; count: number }[]
|
||||
): Observable<any> {
|
||||
return this.http.post('/branchday/open', {
|
||||
businessDate,
|
||||
openingCash: openingCash != null ? String(openingCash) : null,
|
||||
officeId: officeId ?? null,
|
||||
denominations: denominations?.length ? denominations : null,
|
||||
locale: 'en'
|
||||
});
|
||||
}
|
||||
@@ -242,7 +250,8 @@ export class CashierService {
|
||||
closingCash: number,
|
||||
remarks?: string,
|
||||
forceCloseReason?: string,
|
||||
officeId?: number
|
||||
officeId?: number,
|
||||
denominations?: { denominationId: number; denominationValue: number; count: number }[]
|
||||
): Observable<any> {
|
||||
return this.http.post('/branchday/close', {
|
||||
businessDate,
|
||||
@@ -250,9 +259,26 @@ export class CashierService {
|
||||
remarks: remarks ?? null,
|
||||
forceCloseReason: forceCloseReason ?? null,
|
||||
officeId: officeId ?? null,
|
||||
denominations: denominations?.length ? denominations : null,
|
||||
locale: 'en'
|
||||
});
|
||||
}
|
||||
|
||||
/** The opening/closing denomination breakdown recorded for one business day, if any was captured. */
|
||||
branchDayDenominations(officeId?: number, businessDate?: string): Observable<any> {
|
||||
let params = new HttpParams();
|
||||
if (officeId) params = params.set('officeId', String(officeId));
|
||||
if (businessDate) params = params.set('businessDate', businessDate);
|
||||
return this.http.get('/branchday/denominations', { params });
|
||||
}
|
||||
|
||||
/** Denomination-wise stock a vault (teller) currently holds — "how much of what does the bank have". */
|
||||
vaultPosition(tellerId?: number, asOfDate?: string): Observable<any> {
|
||||
let params = new HttpParams();
|
||||
if (tellerId) params = params.set('tellerId', String(tellerId));
|
||||
if (asOfDate) params = params.set('asOfDate', asOfDate);
|
||||
return this.http.get('/cashreports/vault-position', { params });
|
||||
}
|
||||
excessTransactionReport(threshold: number, fromDate?: string, toDate?: string): Observable<any[]> {
|
||||
let params = new HttpParams().set('threshold', String(threshold));
|
||||
if (fromDate) params = params.set('fromDate', fromDate);
|
||||
|
||||
Reference in New Issue
Block a user