fix(cashier): My Vouchers filters, Fund Transfer GL support, and disbursement-list rename
build-run / Run Lint, Build and Deploy (push) Canceled after 0s
Publish Image in Docker Hub / build (push) Canceled after 0s
Playwright E2E Tests / Run Playwright Tests (push) Canceled after 0s
Tests / testRigor (push) Canceled after 0s

my-work.component (My Vouchers):
- The five summary tiles (Received/Payments/Journal/Entered/Approved) were
  bound directly to the server's day-total fields, so they stayed fixed at
  the combined "entered + approved" figure no matter what the Side/My part
  dropdowns were set to. They're now pinned to this user's own entered rows
  only (enteredRows), independent of both filters, so "how much did I
  personally put through today" reads correctly regardless of what the table
  below happens to be filtered to. The table and its dropdowns are unchanged
  and still default to showing everything.

transaction-entry.component (Fund Transfer):
- onSave()'s plain bank-transfer branch (SD/CA/CB only) was catching every
  'Fund Transfer' row before the GL-aware Disbursement/Collection branch
  below it could see them, so a Fund Transfer against a GL account was always
  rejected with "Invalid Account Type" even though that branch already
  supports it under the same label. Fund Transfer rows that include a GL leg
  now skip the plain-transfer branch and fall through correctly.

my-disbursement-requests.component (Disbursements & Transfer list):
- getCreditEntries() only read the stored credit_entries JSON, which holds
  the full picture for Collection (its GL leg is one of the entries) but not
  for Disbursement/Fund Transfer, whose GL is the request's own top-level
  source (gl_account_no/dr_amount) and was never in that array. The DR/CR
  breakdown for those two types showed only the credit side, looking like
  half the entry was missing. The GL leg is now synthesised back in as the
  first row for those two types, matching what actually posted.
- Renamed the clerk's "My Disbursements" / "My Disbursement Requests" screen
  to "Disbursements & Transfer" throughout (nav tab, dropdown menu, route
  title/breadcrumb, cashier counter link, page header) — the register covers
  Disbursement, Collection, Fund Transfer and Bank Transfer requests, and the
  old name read as disbursement-only. "My Requests" (Withdrawal Slip
  requests, a separate register) is renamed to "Withdrawal Request" for the
  same reason: neither name said what was actually inside.
This commit is contained in:
2026-09-10 12:40:32 +05:30
parent 03bc2ff139
commit f0c06988c0
11 changed files with 133 additions and 31 deletions
@@ -576,14 +576,25 @@ export class BranchDayComponent implements OnInit {
if (!this.closeTarget || !hasFigure || this.closing) return false;
// Block while cashier/vault data is still loading — the reconciliation check can't run yet.
if (this.eodLoading || this.previewLoading) return false;
if (this.hasUnreconciledOrUnsettledCashiers) return false;
return !this.isLateClose || !!this.forceReason.trim();
// An unreconciled cashier is a reason-required condition, not an absolute block: the backend
// accepts the close once a reason is recorded (and appends the cashiers' names to it), and
// refusing outright left a day that could never be closed at all — a cashier who reconciled on
// the wrong date, went on leave, or left mid-shift would strand that day and every day after it.
if (this.isLateClose || this.hasUnreconciledOrUnsettledCashiers) {
return !!this.forceReason.trim();
}
return true;
}
submitClose(): void {
// Safety: re-check reconciliation even if the button was somehow enabled.
if (this.hasUnreconciledOrUnsettledCashiers || this.eodLoading || this.previewLoading) {
this.errorMsg = 'Cannot close — cashiers holding cash have not been reconciled or settled.';
if (this.eodLoading || this.previewLoading) {
this.errorMsg = 'Still loading the cashier and vault positions — try again in a moment.';
return;
}
// Safety net mirroring canSubmitClose: never send a close that the backend will refuse for a
// missing override reason.
if ((this.isLateClose || this.hasUnreconciledOrUnsettledCashiers) && !this.forceReason.trim()) {
this.errorMsg = 'Record why this day is being closed before submitting.';
return;
}
const day = this.closeTarget;
@@ -598,7 +609,10 @@ export class BranchDayComponent implements OnInit {
day.businessDate,
Number(figure),
this.closeRemarks.trim() || undefined,
this.isLateClose ? this.forceReason.trim() : undefined,
// Sent whenever one was typed, not only on a late close: it is also the override the backend
// needs for a same-day close over an unreconciled cashier, and gating it on isLateClose
// dropped it on exactly the request that could not succeed without it.
this.forceReason.trim() || undefined,
undefined,
denominations
)