feat(clerk): add collection flow — multi-DR savings to CR GL with maker-checker
- Transaction entry: detect collection mode (N DR savings → 1 CR GL) and disbursement mode (1 DR GL → N CR savings); build dbCr-tagged payload for backend - Disbursement review: show 'GL Credit (Target)' / 'Debit Entries' labels for collection; fix double-count by summing only DR entries for collection totals; dynamic approve button text - My disbursement requests: add DR/CR badge column in expanded credit-entries preview - My requests / withdrawal-requests: minor consistency updates Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
efb01d5441
commit
6cccb58c04
@@ -127,7 +127,12 @@
|
||||
</td>
|
||||
<td class="num mdr-amount">₹{{ r.dr_amount | number: '1.2-2' }}</td>
|
||||
<td>
|
||||
<span class="mdr-credit-badge">{{ creditCount(r) }} account{{ creditCount(r) !== 1 ? 's' : '' }}</span>
|
||||
<button type="button" class="mdr-credit-badge mdr-credit-badge--btn" (click)="toggleExpand(r.id)">
|
||||
{{ creditCount(r) }} account{{ creditCount(r) !== 1 ? 's' : '' }}
|
||||
<mat-icon class="mdr-credit-chevron" [class.mdr-credit-chevron--open]="expandedIds.has(r.id)">
|
||||
expand_more
|
||||
</mat-icon>
|
||||
</button>
|
||||
</td>
|
||||
<td>{{ r.payment_type_name || 'Transfer' }}</td>
|
||||
<td>{{ r.manager_name || r.manager_username || '—' }}</td>
|
||||
@@ -136,6 +141,46 @@
|
||||
<span class="mdr-status" [ngClass]="statusClass(r.status)">{{ statusLabel(r.status) }}</span>
|
||||
</td>
|
||||
</tr>
|
||||
@if (expandedIds.has(r.id)) {
|
||||
<tr class="mdr-expand-row">
|
||||
<td colspan="8" class="mdr-expand-cell">
|
||||
<div class="mdr-credit-preview">
|
||||
<table class="mdr-credit-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>DR/CR</th>
|
||||
<th>Account No</th>
|
||||
<th>Account Name</th>
|
||||
<th>Type</th>
|
||||
<th class="num">Amount (₹)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (ce of getCreditEntries(r); track ce.accountNo) {
|
||||
<tr>
|
||||
<td>
|
||||
<span
|
||||
class="mdr-actype"
|
||||
[style.background]="ce.dbCr === 'Dr' ? '#fee2e2' : '#dcfce7'"
|
||||
[style.color]="ce.dbCr === 'Dr' ? '#991b1b' : '#166534'"
|
||||
>
|
||||
{{ ce.dbCr || 'CR' }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="cell-mono">{{ ce.accountNo || '—' }}</td>
|
||||
<td>{{ ce.accountName || '—' }}</td>
|
||||
<td>
|
||||
<span class="mdr-actype">{{ ce.accountType || '—' }}</span>
|
||||
</td>
|
||||
<td class="num mdr-ce-amount">{{ ce.amount | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
@if (r.status === 'REJECTED' && r.rejection_reason) {
|
||||
<tr class="mdr-reason-row">
|
||||
<td colspan="8" class="mdr-reason-cell">
|
||||
|
||||
Reference in New Issue
Block a user