Received
-
₹{{ report.receivedTotal | number: '1.2-2' }}
+
₹{{ receivedTotal | number: '1.2-2' }}
Payments
-
₹{{ report.paymentTotal | number: '1.2-2' }}
+
₹{{ paymentTotal | number: '1.2-2' }}
Journal
-
₹{{ report.journalTotal | number: '1.2-2' }}
+
₹{{ journalTotal | number: '1.2-2' }}
Entered
-
{{ report.raisedCount }}
+
{{ raisedCount }}
Approved
-
{{ report.verifiedCount }}
+
{{ verifiedCount }}
diff --git a/src/app/cashier/my-work/my-work.component.ts b/src/app/cashier/my-work/my-work.component.ts
index c4644ba0b..9173fc55f 100644
--- a/src/app/cashier/my-work/my-work.component.ts
+++ b/src/app/cashier/my-work/my-work.component.ts
@@ -82,7 +82,11 @@ export class MyWorkComponent implements OnInit {
period: 'DAY' | 'MONTH' = 'DAY';
anchor = this.todayIso();
- /** Narrow to one side, or to the part the user played. Both applied in the browser. */
+ /**
+ * Narrow to one side, or to the part the user played. Both applied in the browser, and only to
+ * the table below — the five summary tiles are pinned to Entered work regardless (see
+ * enteredRows), so this can default to showing everything without muddying them.
+ */
sideFilter: '' | VoucherSide = '';
roleFilter: '' | MyRole = '';
@@ -174,6 +178,44 @@ export class MyWorkComponent implements OnInit {
return this.rows.reduce((sum, r) => sum + Number(r.amount ?? 0), 0);
}
+ /**
+ * What this person themselves put through today — never narrowed by the Side or My part
+ * filters, which exist only to browse the table below.
+ *
+ * The five summary tiles are pinned to this set on purpose. They answer one question, "what did
+ * I personally do today", and that answer cannot depend on which slice of the list a person
+ * happens to have the table filtered to at the moment — a Received figure that changed whenever
+ * someone picked "Approved" to go look at what they'd passed would not be their own total any
+ * more, it would be whatever the table was showing.
+ */
+ get enteredRows(): MyWorkRow[] {
+ const all = this.report?.vouchers ?? [];
+ return all.filter((r) => r.myRole === 'RAISED' || r.myRole === 'RAISED_AND_VERIFIED');
+ }
+
+ get receivedTotal(): number {
+ return this.enteredRows.filter((r) => r.side === 'CR').reduce((sum, r) => sum + Number(r.amount ?? 0), 0);
+ }
+
+ get paymentTotal(): number {
+ return this.enteredRows.filter((r) => r.side === 'DR').reduce((sum, r) => sum + Number(r.amount ?? 0), 0);
+ }
+
+ get journalTotal(): number {
+ return this.enteredRows
+ .filter((r) => r.side !== 'CR' && r.side !== 'DR')
+ .reduce((sum, r) => sum + Number(r.amount ?? 0), 0);
+ }
+
+ get raisedCount(): number {
+ return this.enteredRows.length;
+ }
+
+ get verifiedCount(): number {
+ const all = this.report?.vouchers ?? [];
+ return all.filter((r) => r.myRole === 'VERIFIED' || r.myRole === 'RAISED_AND_VERIFIED').length;
+ }
+
sideLabel(side: VoucherSide | null): string {
if (side === 'CR') {
return 'Received';
diff --git a/src/app/cashier/transaction-entry/transaction-entry.component.html b/src/app/cashier/transaction-entry/transaction-entry.component.html
index 8496b5dc4..98ae9647e 100644
--- a/src/app/cashier/transaction-entry/transaction-entry.component.html
+++ b/src/app/cashier/transaction-entry/transaction-entry.component.html
@@ -1856,9 +1856,9 @@
class="ws-btn ws-btn--ghost"
type="button"
(click)="router.navigate(['/clerk/my-disbursement-requests'])"
- title="View my disbursement requests"
+ title="View my fund requests — Disbursement, Collection, Fund Transfer and Bank Transfer"
>
- My Disbursements
+ Disbursements & Transfer
}
@if (canShowAccountActions) {
diff --git a/src/app/cashier/transaction-entry/transaction-entry.component.ts b/src/app/cashier/transaction-entry/transaction-entry.component.ts
index fbbd61837..5a49e956d 100644
--- a/src/app/cashier/transaction-entry/transaction-entry.component.ts
+++ b/src/app/cashier/transaction-entry/transaction-entry.component.ts
@@ -2763,7 +2763,7 @@ export class TransactionEntryComponent implements OnInit, OnDestroy {
this.showAlert('success', 'Bank Transfer Submitted', [
`Voucher No: ${res.voucherNo}`,
`Total: ₹${totalDr.toLocaleString('en-IN', { minimumFractionDigits: 2 })} · DR: ${drRows.length} account(s) → CR: ${crRows.length} account(s)`,
- 'Pending Manager approval. Track status in "My Disbursement Requests".'
+ 'Pending Manager approval. Track status in "Disbursements & Transfer".'
]);
this.rows = [];
this.rowAccountIds = {};
@@ -4365,10 +4365,20 @@ export class TransactionEntryComponent implements OnInit, OnDestroy {
// is the same flow under a second TYPE label — onTypChange() already defaults it identically to
// 'Enter Bank Transfer', so submission has to recognise both or a share redemption or bank
// transfer raised under this label silently falls through to the wrong branch below.
+ //
+ // But 'Fund Transfer' rows that include a GL leg are NOT this flow — they are the
+ // Disbursement/Collection double-entry shape (see the TYPE options comment), just under the
+ // friendlier 'Fund Transfer' label so a non-loan GL movement doesn't have to be called a
+ // "Disbursement". 'Enter Bank Transfer' never carries a GL leg, so it always stays in this
+ // branch; only skip out to the Disbursement/Collection branch below when every row is 'Fund
+ // Transfer' and at least one of them is GL.
+ const fundTransferRowsHaveGl =
+ this.rows.every((r) => r.typ === 'Fund Transfer') && this.rows.some((r) => r.acTyp === 'GL');
if (
this.isClerk &&
this.rows.length >= 2 &&
- this.rows.every((r) => r.typ === 'Enter Bank Transfer' || r.typ === 'Fund Transfer')
+ this.rows.every((r) => r.typ === 'Enter Bank Transfer' || r.typ === 'Fund Transfer') &&
+ !fundTransferRowsHaveGl
) {
const drRows = this.rows.filter((r) => r.dbCr === 'Dr');
const crRows = this.rows.filter((r) => r.dbCr === 'Cr');
diff --git a/src/app/clerk/my-disbursement-requests/my-disbursement-requests.component.html b/src/app/clerk/my-disbursement-requests/my-disbursement-requests.component.html
index 6171928f5..634cdd3ba 100644
--- a/src/app/clerk/my-disbursement-requests/my-disbursement-requests.component.html
+++ b/src/app/clerk/my-disbursement-requests/my-disbursement-requests.component.html
@@ -12,13 +12,15 @@
You have not submitted any disbursement requests yet.