@foreach(['USD','SSP'] as $c)@php($rows=$documents->where('currency',$c))
Total {{ $c }}{{ number_format($rows->sum('total'),2) }}Paid {{ number_format($rows->sum('paid'),2) }} ยท Balance {{ number_format($rows->sum('total')-$rows->sum('paid'),2) }}
@endforeach
@forelse($documents as $d)@if($type==='purchases')@endif @empty@endforelse@foreach(['USD','SSP'] as $c)@php($rows=$documents->where('currency',$c))@endforeach
DateReference{{ $type==='purchases'?'Supplier':'Description' }}CurrencyTotalPaidBalanceMethodUserAction
{{ $d->document_date }}{{ $d->reference }}{{ $type==='purchases'?$d->supplier:$d->description }}{{ $d->currency }}{{ number_format($d->total,2) }}{{ number_format($d->paid,2) }}{{ number_format($d->total-$d->paid,2) }}{{ $d->method }}{{ $d->staff }}@include('hotel_workspace.record_actions',['recordType'=>'document','recordId'=>$d->id,'recordModule'=>$type==='purchases'?'hotel-purchases':'hotel-expenses'])
Purchased Items@foreach($documentLines->get($d->id,collect()) as $line)@endforeach
ItemTypeQuantityUnit Price ({{ $d->currency }})Total ({{ $d->currency }})
{{ $line->name }}{{ ucfirst($line->kind) }}{{ number_format($line->quantity,2) }}{{ number_format($line->unit_price,2) }}{{ number_format($line->total,2) }}
No matching records.
Totals{{ $c }}{{ number_format($rows->sum('total'),2) }}{{ number_format($rows->sum('paid'),2) }}{{ number_format($rows->sum('total')-$rows->sum('paid'),2) }}