Cashup: show Newbook reported cash target + variance in Cash Takings section
Mirrors the float count variance pattern — once Newbook data is loaded, shows the reported cash amount and the counted vs reported variance directly beneath the Cash Takings header. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2f9b876d0d
commit
13f1b524b0
1 changed files with 14 additions and 1 deletions
|
|
@ -356,10 +356,23 @@ export function DailyCashUp({ user }: Props) {
|
|||
|
||||
{/* Cash denomination — Takings */}
|
||||
<Card style={{ marginBottom: '1rem' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '1rem' }}>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: newbookTotals ? '0.35rem' : '1rem' }}>
|
||||
<h2 style={{ fontSize: '1rem', fontWeight: 700 }}>Cash Takings</h2>
|
||||
<span style={{ fontWeight: 700, fontSize: '1.1rem' }}>{fmtGBP(denomTotal(takings))}</span>
|
||||
</div>
|
||||
{newbookTotals && (() => {
|
||||
const cashVariance = denomTotal(takings) - newbookTotals.cash
|
||||
return (
|
||||
<div style={{ display: 'flex', gap: '1.25rem', fontSize: '0.8rem', marginBottom: '1rem' }}>
|
||||
<span style={{ color: 'var(--text-mid)' }}>Reported: {fmtGBP(newbookTotals.cash)}</span>
|
||||
<span style={{ fontWeight: 600, color: Math.abs(cashVariance) < 0.01 ? 'var(--text-mid)' : cashVariance > 0 ? 'var(--success)' : 'var(--danger)' }}>
|
||||
{Math.abs(cashVariance) < 0.01
|
||||
? 'In balance'
|
||||
: (cashVariance > 0 ? '+' : '') + fmtGBP(Math.abs(cashVariance)) + ' variance'}
|
||||
</span>
|
||||
</div>
|
||||
)
|
||||
})()}
|
||||
<DenomGrid denoms={takings} onChange={(i, f, v) => updateDenom(takings, setTakings, i, f, v)} disabled={isFinal} tabBase={0} />
|
||||
</Card>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue