feat(cashier): morning opening balance panel across settlement, reconciliation, position & history
- Cash Settlement form: morning panel (denomination pills) + Morning column in denomination table - Reconciliation form: morning panel (denomination pills) + Morning column in denomination table - Cashier Position Report: Morning vs Current comparison bar + Morning column (single-cashier mode) - Cash History – Settlement detail panel: Morning Received vs Settled comparison bar + Morning column - Cash History – denomination Notes/Coins separation in detail panel for all transaction types - CashierService: added getCashierMorningBalance() calling GET /cashreports/cashier-morning - All morning data loaded via forkJoin alongside existing API calls (no extra loading states) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
6433ae068d
commit
51495f8eb8
@@ -191,6 +191,48 @@
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Morning vs Settled comparison (settlements only) -->
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<div class="settle-compare-bar">
|
||||
<div class="settle-compare-item settle-compare-item--morning">
|
||||
<mat-icon>wb_sunny</mat-icon>
|
||||
<div>
|
||||
<span class="settle-compare-label">Morning Received</span>
|
||||
<strong>₹{{ detail.morningTotal | number: '1.2-2' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<mat-icon class="settle-compare-arrow">arrow_forward</mat-icon>
|
||||
<div class="settle-compare-item settle-compare-item--settled">
|
||||
<mat-icon>account_balance_wallet</mat-icon>
|
||||
<div>
|
||||
<span class="settle-compare-label">This Settlement</span>
|
||||
<strong>₹{{ detail.row.amount | number: '1.2-2' }}</strong>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
class="settle-compare-net"
|
||||
[class.settle-compare-net--pos]="detail.row.amount > detail.morningTotal"
|
||||
[class.settle-compare-net--neg]="detail.row.amount < detail.morningTotal"
|
||||
[class.settle-compare-net--zero]="detail.row.amount === detail.morningTotal"
|
||||
>
|
||||
<mat-icon>{{
|
||||
detail.row.amount === detail.morningTotal
|
||||
? 'check_circle'
|
||||
: detail.row.amount > detail.morningTotal
|
||||
? 'trending_up'
|
||||
: 'trending_down'
|
||||
}}</mat-icon>
|
||||
{{
|
||||
detail.row.amount === detail.morningTotal
|
||||
? 'Fully Settled'
|
||||
: (detail.row.amount - detail.morningTotal >= 0 ? '+' : '') +
|
||||
'₹' +
|
||||
(detail.row.amount - detail.morningTotal | number: '1.2-2')
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Denomination breakdown -->
|
||||
<div class="detail-denom-head">
|
||||
<mat-icon>payments</mat-icon>
|
||||
@@ -202,37 +244,102 @@
|
||||
} @else if (detail.denominations.length === 0) {
|
||||
<div class="pg-empty" style="padding: 20px 0">No denomination data recorded.</div>
|
||||
} @else {
|
||||
<table class="pg-table detail-denom-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Denomination</th>
|
||||
<th style="text-align: center">Count</th>
|
||||
<th class="num">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (d of detail.denominations; track d.denominationValue) {
|
||||
<!-- Notes -->
|
||||
@if (notes(detail.denominations).length > 0) {
|
||||
<div class="detail-denom-kind-label">Notes</div>
|
||||
<table class="pg-table detail-denom-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip">₹{{ d.denominationValue }}</span>
|
||||
</td>
|
||||
<td style="text-align: center; font-weight: 600">{{ d.count }}</td>
|
||||
<td class="num">₹{{ d.totalAmount | number: '1.2-2' }}</td>
|
||||
<th>Denomination</th>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<th class="num settle-detail-col-morning" title="Count received from vault this morning">Morning</th>
|
||||
}
|
||||
<th style="text-align: center">{{ detail.row.type === 'settlement' ? 'Settled' : 'Count' }}</th>
|
||||
<th class="num">Total</th>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="detail-denom-total">
|
||||
<td><strong>Total</strong></td>
|
||||
<td style="text-align: center">
|
||||
<strong>{{ totalCount(detail.denominations) }}</strong>
|
||||
</td>
|
||||
<td class="num">
|
||||
<strong>₹{{ detail.row.amount | number: '1.2-2' }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (d of notes(detail.denominations); track d.denominationValue) {
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip">₹{{ d.denominationValue }}</span>
|
||||
</td>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<td class="num settle-detail-morning">{{ d.morningCount || '—' }}</td>
|
||||
}
|
||||
<td style="text-align: center; font-weight: 600">{{ d.count }}</td>
|
||||
<td class="num">₹{{ d.totalAmount | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="detail-denom-total">
|
||||
<td><strong>Subtotal</strong></td>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<td></td>
|
||||
}
|
||||
<td style="text-align: center">
|
||||
<strong>{{ totalCount(notes(detail.denominations)) }}</strong>
|
||||
</td>
|
||||
<td class="num">
|
||||
<strong>₹{{ subtotal(notes(detail.denominations)) | number: '1.2-2' }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
}
|
||||
|
||||
<!-- Coins -->
|
||||
@if (coins(detail.denominations).length > 0) {
|
||||
<div class="detail-denom-kind-label">Coins</div>
|
||||
<table class="pg-table detail-denom-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Denomination</th>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<th class="num settle-detail-col-morning" title="Count received from vault this morning">Morning</th>
|
||||
}
|
||||
<th style="text-align: center">{{ detail.row.type === 'settlement' ? 'Settled' : 'Count' }}</th>
|
||||
<th class="num">Total</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@for (d of coins(detail.denominations); track d.denominationValue) {
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip pg-chip--coin">₹{{ d.denominationValue }}</span>
|
||||
</td>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<td class="num settle-detail-morning">{{ d.morningCount || '—' }}</td>
|
||||
}
|
||||
<td style="text-align: center; font-weight: 600">{{ d.count }}</td>
|
||||
<td class="num">₹{{ d.totalAmount | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr class="detail-denom-total">
|
||||
<td><strong>Subtotal</strong></td>
|
||||
@if (detail.row.type === 'settlement' && detail.morningTotal > 0) {
|
||||
<td></td>
|
||||
}
|
||||
<td style="text-align: center">
|
||||
<strong>{{ totalCount(coins(detail.denominations)) }}</strong>
|
||||
</td>
|
||||
<td class="num">
|
||||
<strong>₹{{ subtotal(coins(detail.denominations)) | number: '1.2-2' }}</strong>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
}
|
||||
|
||||
<!-- Grand total -->
|
||||
<div class="detail-denom-grand-total">
|
||||
<span>Grand Total</span>
|
||||
<span>{{ totalCount(detail.denominations) }} notes/coins</span>
|
||||
<span>₹{{ detail.row.amount | number: '1.2-2' }}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user