{{-- One counted figure in the cash-up history table: the amount that was counted as the headline, with how far it was out as a small line underneath. Balanced cells carry nothing extra so a difference stands out on its own. amount — what was counted (null when this count was never taken, e.g. a cash-up recorded before the day's takings were asked for) variance — counted minus expected in the account's currency (null = unknown) legacy — the figure is a day's NET movement, from before the count asked for money in. Marked so it is not read as money in. --}} @props(['amount' => null, 'variance' => null, 'legacy' => false]) @php $out = $variance !== null && abs((float) $variance) >= 0.005; $short = $out && (float) $variance < 0; @endphp @if ($amount === null) — @else
@if ($legacy) {{-- Counted on the old basis. A dotted mark rather than a badge: it should be noticed on a second look, not shout down the figure it belongs to. --}} † @endif ! $out, 'font-semibold text-slate-800' => $out, ])>{{ number_format((float) $amount, 2) }} @if ($out) $short, 'text-amber-600' => ! $short, ])>{{ $short ? '−' : '+' }}{{ number_format(abs((float) $variance), 2) }} @endif
@endif