feat(cashier): carry forward yesterday's denomination count into Day Open, warn on a mismatch
The Day Open form's note/coin table started at zero even though the branch's own closing count from the day before was already on record -- whoever opened the day had to re-key numbers that were already known. It now auto-fills from that closing count, flags any row a manual edit moves away from it, and shows a live Tallied/Short/Excess comparison against it -- so a short or excess opening count is visible before the day is opened, not discovered later. A reason is required once a mismatch exists, matching the new backend enforcement. Also fixes the register table's date chip wrapping onto two lines when the column narrows. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -135,11 +135,32 @@
|
||||
</label>
|
||||
</div>
|
||||
<p class="bd-hint">
|
||||
Left blank with no notes/coins counted below, yesterday's closing figure carries forward automatically — which
|
||||
is what keeps the opening balance from drifting. Counting the drawer below is what actually records the
|
||||
note/coin stock the branch can check a vault handout against later.
|
||||
@if (hasAutoFilledOpenCounts) {
|
||||
Auto-filled below from yesterday's own closing count (₹{{ carriedForwardTotal | number: '1.2-2' }}) — correct
|
||||
only the rows where today's physical count differs before opening.
|
||||
} @else {
|
||||
Left blank with no notes/coins counted below, yesterday's closing figure carries forward automatically — which
|
||||
is what keeps the opening balance from drifting. Counting the drawer below is what actually records the
|
||||
note/coin stock the branch can check a vault handout against later.
|
||||
}
|
||||
</p>
|
||||
|
||||
@if (hasAutoFilledOpenCounts && openLiveDifference !== null) {
|
||||
@if (openLiveDifference === 0) {
|
||||
<div class="db-cmp db-cmp--good">
|
||||
<span class="db-cmp__label">vs. yesterday's close</span>
|
||||
<span class="db-cmp__value">Tallied</span>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="db-cmp db-cmp--bad">
|
||||
<span class="db-cmp__label">vs. yesterday's close</span>
|
||||
<span class="db-cmp__value">
|
||||
{{ openLiveDifference > 0 ? 'Excess' : 'Short' }} ₹{{ absValue(openLiveDifference) | number: '1.2-2' }}
|
||||
</span>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
<div class="pg-card bd-denom">
|
||||
<table class="pg-table">
|
||||
<thead>
|
||||
@@ -160,7 +181,7 @@
|
||||
<td>
|
||||
<span class="pg-chip">{{ d.label }}</span>
|
||||
</td>
|
||||
<td style="display: flex; justify-content: center">
|
||||
<td style="display: flex; flex-direction: column; align-items: center">
|
||||
<div class="pg-step">
|
||||
<button
|
||||
type="button"
|
||||
@@ -177,6 +198,9 @@
|
||||
/>
|
||||
<button type="button" (click)="bumpCount(openCounts, d, 1)">+</button>
|
||||
</div>
|
||||
@if (hasAutoFilledOpenCounts && countFor(openCounts, d) !== autoOpenCountFor(d)) {
|
||||
<span class="db-muted bd-denom__auto">yesterday closed {{ autoOpenCountFor(d) }}</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">₹{{ subtotalFor(openCounts, d) | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
@@ -191,7 +215,7 @@
|
||||
<td>
|
||||
<span class="pg-chip pg-chip--coin">{{ d.label }}</span>
|
||||
</td>
|
||||
<td style="display: flex; justify-content: center">
|
||||
<td style="display: flex; flex-direction: column; align-items: center">
|
||||
<div class="pg-step">
|
||||
<button
|
||||
type="button"
|
||||
@@ -208,6 +232,9 @@
|
||||
/>
|
||||
<button type="button" (click)="bumpCount(openCounts, d, 1)">+</button>
|
||||
</div>
|
||||
@if (hasAutoFilledOpenCounts && countFor(openCounts, d) !== autoOpenCountFor(d)) {
|
||||
<span class="db-muted bd-denom__auto">yesterday closed {{ autoOpenCountFor(d) }}</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">₹{{ subtotalFor(openCounts, d) | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
@@ -218,11 +245,27 @@
|
||||
@if (openDenomTotal > 0) {
|
||||
<p class="bd-hint">
|
||||
Denomination total: <strong>₹{{ openDenomTotal | number: '1.2-2' }}</strong>
|
||||
@if (hasAutoFilledOpenCounts) {
|
||||
<button type="button" class="pg-btn bd-denom__reset" (click)="resetOpenToAutoFill()">
|
||||
Reset to yesterday's count
|
||||
</button>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
|
||||
@if (openLiveDifference !== null && openLiveDifference !== 0) {
|
||||
<label class="pg-field bd-panel__wide">
|
||||
<span>Why does this differ from yesterday's closing count? (required)</span>
|
||||
<input
|
||||
type="text"
|
||||
[(ngModel)]="openDifferenceReason"
|
||||
placeholder="e.g. notes exchanged for smaller denominations, extra cash added from head office"
|
||||
/>
|
||||
</label>
|
||||
}
|
||||
|
||||
<div class="db-panel__actions">
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="submitOpen()" [disabled]="opening || !openDate">
|
||||
<button type="button" class="pg-btn pg-btn--primary" (click)="submitOpen()" [disabled]="!canSubmitOpen">
|
||||
Open Day
|
||||
</button>
|
||||
<button type="button" class="pg-btn" (click)="cancelOpen()">Cancel</button>
|
||||
@@ -414,9 +457,14 @@
|
||||
</div>
|
||||
|
||||
<p class="bd-hint">
|
||||
Pre-filled with what the books expect — change it only if the drawer counted something different, and that
|
||||
difference is then recorded against the day. Counting the denominations below overrides the typed figure with
|
||||
what was actually counted, note by note.
|
||||
@if (hasAutoFilledCounts) {
|
||||
Auto-filled below from the vault and every cashier's position shown above — correct only the rows where the
|
||||
physical count differs, note by note.
|
||||
} @else {
|
||||
Pre-filled with what the books expect — change it only if the drawer counted something different, and that
|
||||
difference is then recorded against the day. Counting the denominations below overrides the typed figure with
|
||||
what was actually counted, note by note.
|
||||
}
|
||||
</p>
|
||||
|
||||
<div class="pg-card bd-denom">
|
||||
@@ -439,7 +487,7 @@
|
||||
<td>
|
||||
<span class="pg-chip">{{ d.label }}</span>
|
||||
</td>
|
||||
<td style="display: flex; justify-content: center">
|
||||
<td style="display: flex; flex-direction: column; align-items: center">
|
||||
<div class="pg-step">
|
||||
<button
|
||||
type="button"
|
||||
@@ -456,6 +504,9 @@
|
||||
/>
|
||||
<button type="button" (click)="bumpCount(closeCounts, d, 1)">+</button>
|
||||
</div>
|
||||
@if (hasAutoFilledCounts && countFor(closeCounts, d) !== autoCountFor(d)) {
|
||||
<span class="db-muted bd-denom__auto">system counted {{ autoCountFor(d) }}</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">₹{{ subtotalFor(closeCounts, d) | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
@@ -470,7 +521,7 @@
|
||||
<td>
|
||||
<span class="pg-chip pg-chip--coin">{{ d.label }}</span>
|
||||
</td>
|
||||
<td style="display: flex; justify-content: center">
|
||||
<td style="display: flex; flex-direction: column; align-items: center">
|
||||
<div class="pg-step">
|
||||
<button
|
||||
type="button"
|
||||
@@ -487,6 +538,9 @@
|
||||
/>
|
||||
<button type="button" (click)="bumpCount(closeCounts, d, 1)">+</button>
|
||||
</div>
|
||||
@if (hasAutoFilledCounts && countFor(closeCounts, d) !== autoCountFor(d)) {
|
||||
<span class="db-muted bd-denom__auto">system counted {{ autoCountFor(d) }}</span>
|
||||
}
|
||||
</td>
|
||||
<td class="num">₹{{ subtotalFor(closeCounts, d) | number: '1.2-2' }}</td>
|
||||
</tr>
|
||||
@@ -497,6 +551,11 @@
|
||||
@if (closeDenomTotal > 0) {
|
||||
<p class="bd-hint">
|
||||
Denomination total: <strong>₹{{ closeDenomTotal | number: '1.2-2' }}</strong>
|
||||
@if (hasAutoFilledCounts) {
|
||||
<button type="button" class="pg-btn bd-denom__reset" (click)="resetToAutoFill()">
|
||||
Reset to auto-filled count
|
||||
</button>
|
||||
}
|
||||
</p>
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user