feat: cash-only registers, day book sections and DD amendments
This commit is contained in:
@@ -27,12 +27,23 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
@if (!showGl && rows.length > 0) {
|
||||
<!-- Shown whenever the day has any cash at all, not only when a denomination breakdown exists:
|
||||
a cash Demand Draft is recorded without one, and gating on rows hid its money entirely. -->
|
||||
@if (!showGl && (rows.length > 0 || ddCashTotal > 0)) {
|
||||
<!-- Summary totals bar -->
|
||||
<div class="closing-summary">
|
||||
<div class="closing-summary__item closing-summary__item--in">
|
||||
<span class="closing-summary__label">Total Deposits (IN)</span>
|
||||
<span class="closing-summary__value">₹{{ depositTotal | number: '1.2-2' }}</span>
|
||||
<span class="closing-summary__value">₹{{ depositTotalWithDd | number: '1.2-2' }}</span>
|
||||
@if (ddCashTotal > 0) {
|
||||
<!-- Named on the tile as well as in the table: this part of the total carries no
|
||||
denomination, so without saying so the figures read as failing to add up. -->
|
||||
<span class="closing-summary__note">
|
||||
incl. ₹{{ ddCashTotal | number: '1.2-2' }} not itemised ({{ ddCashCount }} cash DD{{
|
||||
ddCashCount === 1 ? '' : 's'
|
||||
}})
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
<div class="closing-summary__sep">−</div>
|
||||
<div class="closing-summary__item closing-summary__item--out">
|
||||
@@ -45,15 +56,57 @@
|
||||
[class.closing-summary__item--net-pos]="netTotal >= 0"
|
||||
[class.closing-summary__item--net-neg]="netTotal < 0"
|
||||
>
|
||||
<span class="closing-summary__label">Net Closing Cash</span>
|
||||
<!-- Named for what it is: the counter's own movement. It was labelled "Net Closing Cash",
|
||||
which it is not -- it carries nothing forward from yesterday and leaves out vault and
|
||||
inter-cashier legs, so it can differ from the drawer by a large amount. The real
|
||||
closing figure is in the balance strip below. -->
|
||||
<span class="closing-summary__label">Net Counter Movement</span>
|
||||
<span class="closing-summary__value">₹{{ netTotal | number: '1.2-2' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
<!-- Opening → closing, the figure a physical count is checked against. Shown only for a
|
||||
cashier-scoped report; a branch-wide one has no single drawer to open and close. -->
|
||||
@if (!showGl && scopedToCashier && closingBalance !== null) {
|
||||
<div class="closing-summary closing-summary--balance">
|
||||
<div class="closing-summary__item">
|
||||
<span class="closing-summary__label">Opening Balance</span>
|
||||
<span class="closing-summary__value">₹{{ openingBalance | number: '1.2-2' }}</span>
|
||||
</div>
|
||||
<div class="closing-summary__sep">+</div>
|
||||
<div
|
||||
class="closing-summary__item"
|
||||
[class.closing-summary__item--in]="(cashMovement ?? 0) >= 0"
|
||||
[class.closing-summary__item--out]="(cashMovement ?? 0) < 0"
|
||||
>
|
||||
<span class="closing-summary__label">Cash Movement</span>
|
||||
<span class="closing-summary__value">₹{{ cashMovement | number: '1.2-2' }}</span>
|
||||
</div>
|
||||
<div class="closing-summary__sep">=</div>
|
||||
<div
|
||||
class="closing-summary__item"
|
||||
[class.closing-summary__item--net-pos]="(closingBalance ?? 0) >= 0"
|
||||
[class.closing-summary__item--net-neg]="(closingBalance ?? 0) < 0"
|
||||
>
|
||||
<span class="closing-summary__label">Closing Balance</span>
|
||||
<span class="closing-summary__value">₹{{ closingBalance | number: '1.2-2' }}</span>
|
||||
</div>
|
||||
</div>
|
||||
@if (cashMovement !== null && netTotal !== cashMovement) {
|
||||
<!-- The gap between the two is not an error: it is the vault, inter-cashier and exchange
|
||||
traffic that never crossed the counter. Said plainly, because two different "net"
|
||||
figures on one screen otherwise read as a bug. -->
|
||||
<p class="closing-note">
|
||||
Cash movement differs from counter movement by ₹{{ cashMovement - netTotal | number: '1.2-2' }} — vault,
|
||||
inter-cashier and exchange legs that did not pass over the counter.
|
||||
</p>
|
||||
}
|
||||
}
|
||||
|
||||
@if (!showGl) {
|
||||
<div class="pg-card">
|
||||
@if (noteRows.length > 0) {
|
||||
@if (noteRows.length > 0 || ddCashTotal > 0) {
|
||||
<div class="pos-section-label">Notes</div>
|
||||
<table class="pg-table">
|
||||
<thead>
|
||||
@@ -93,7 +146,42 @@
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
|
||||
<!-- Cash taken for a Demand Draft, on the deposit side where it belongs. It has no
|
||||
denomination to sit against -- the notes were never itemised -- so the piece
|
||||
counts show a dash rather than a zero, which would read as "no notes". -->
|
||||
@if (ddCashTotal > 0) {
|
||||
<tr>
|
||||
<td>
|
||||
<span class="pg-chip">Not itemised</span>
|
||||
<span class="closing-row__hint"> {{ ddCashCount }} cash DD{{ ddCashCount === 1 ? '' : 's' }} </span>
|
||||
</td>
|
||||
<td class="num col-in">—</td>
|
||||
<td class="num col-in">₹{{ ddCashTotal | number: '1.2-2' }}</td>
|
||||
<td class="num col-out">—</td>
|
||||
<td class="num col-out">₹0.00</td>
|
||||
<td class="num col-net">—</td>
|
||||
<td class="num col-net" style="color: #16a34a">+₹{{ ddCashTotal | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
<!-- Totals, so the table reconciles against the summary above rather than having to be
|
||||
added up by hand — and so the deposit column visibly accounts for the DD row. -->
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td>Total</td>
|
||||
<td class="num col-in">{{ noteDepositCount }}</td>
|
||||
<td class="num col-in">₹{{ noteDepositAmount | number: '1.2-2' }}</td>
|
||||
<td class="num col-out">{{ noteWithdrawalCount }}</td>
|
||||
<td class="num col-out">₹{{ noteWithdrawalAmount | number: '1.2-2' }}</td>
|
||||
<td class="num col-net"></td>
|
||||
<td class="num col-net">
|
||||
{{ noteNetAmount >= 0 ? '+' : '−' }}₹{{
|
||||
(noteNetAmount < 0 ? -noteNetAmount : noteNetAmount) | number: '1.2-2'
|
||||
}}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
}
|
||||
|
||||
@@ -141,8 +229,20 @@
|
||||
</table>
|
||||
}
|
||||
|
||||
@if (loaded && rows.length === 0 && exchangeRows.length === 0) {
|
||||
<div class="pg-empty">No cash denomination data for this date.</div>
|
||||
<!-- Not shown when a Demand Draft row is on the table: there is something to read then, and
|
||||
an "empty" notice under it contradicts it. -->
|
||||
@if (loaded && rows.length === 0 && exchangeRows.length === 0 && ddCashTotal === 0) {
|
||||
<!-- A day with no counter work is not an empty report: the cashier is still holding
|
||||
whatever they held yesterday, and that balance is shown in the strip above. Saying
|
||||
only "no data" here read as though the drawer were empty. -->
|
||||
<div class="pg-empty">
|
||||
@if (scopedToCashier && closingBalance !== null) {
|
||||
No cash crossed the counter on this date. The drawer still holds ₹{{ closingBalance | number: '1.2-2' }},
|
||||
carried forward.
|
||||
} @else {
|
||||
No cash denomination data for this date.
|
||||
}
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user