{{-- Differences a director sent back to the person who counted, instead of approving or rejecting them. Sending one back is rarely a request for better wording: it is "you recorded this as income when it was an expense, go and fix it". So answering re-opens that day's count in full — both figures editable, the expected side recomputed live, and the same Record expense / invoice payment / other cash-in buttons used the first time round. Whatever is left when she sends it back is what the director then rules on, and if the correction closed the gap there is nothing left to rule on at all. Shown across all dates, not just the one on screen, otherwise a question about last Tuesday would never be found. Rendered inside the attention dialog on the cash-up page, which supplies the heading; this is just the list. --}}
@foreach ($myQueries as $line) @php $isOpen = $answeringLineId === $line->id; @endphp
{{ $line->account?->name ?? __('Cash') }} · {{ $line->reconciliation?->business_date?->format('D, d M Y') }}
abs((float) $line->variance) < 0.01, 'bg-rose-50 text-rose-700' => (float) $line->variance < -0.01, 'bg-emerald-50 text-emerald-700' => (float) $line->variance > 0.01, ])> {{ $line->currency_code }} {{ (float) $line->variance > 0 ? '+' : '' }}{{ number_format((float) $line->variance, 2) }}
@include('livewire.treasury.partials.cash-up-thread', ['line' => $line])
@if ($isOpen && $answering) {{-- The day, re-opened. Same card as the original count, so every fix she had then she still has now. --}}
@include('livewire.treasury.partials.cash-up-bucket', [ 'bucket' => $answering['bucket'], 'title' => $answering['account']->name, 'icon' => $answering['bucket'] === 'mobile' ? 'credit-card' : 'banknotes', 'accent' => $answering['bucket'] === 'mobile' ? 'sky' : 'emerald', 'account' => $answering['account'], 'accounts' => collect([$answering['account']]), 'data' => $answering['data'], 'accountModel' => $answering['bucket'] === 'mobile' ? 'mobileAccountId' : 'cashAccountId', 'declaredModel' => $answering['bucket'] === 'mobile' ? 'declaredMobile' : 'declaredCash', 'takingsModel' => $answering['bucket'] === 'mobile' ? 'takingsMobile' : 'takingsCash', 'reasonModel' => 'answerReason', 'openingOkModel' => $answering['bucket'] === 'mobile' ? 'openingOkMobile' : 'openingOkCash', 'openingActualModel' => $answering['bucket'] === 'mobile' ? 'openingActualMobile' : 'openingActualCash', 'sweepToModel' => $answering['bucket'] === 'mobile' ? 'sweepMobileTo' : 'sweepCashTo', 'sweepAmountModel' => $answering['bucket'] === 'mobile' ? 'sweepMobileAmount' : 'sweepCashAmount', 'sweepTargets' => $sweepTargets, 'valueLabel' => $answering['account']->name, 'correcting' => true, 'keySuffix' => '-answer-'.$line->id, ])

{{ __('Anything you record here is dated to that day, so the expected figures above update as you go.') }}

@error('answerReason')

{{ $message }}

@enderror
@else
@endif
@endforeach