@extends('layouts.master') @section('content')

Customer Statements

@foreach($customers as $customer) @endforeach
CustomerTotal InvoicedTotal ReceivedOutstandingLast Transaction
{{ $customer->customer_name }} {{ number_format((float) $customer->total_invoiced, 2) }} {{ number_format((float) $customer->total_received, 2) }} @foreach(($customerBalances[$customer->id] ?? []) as $code => $amount)
{{ $code }} {{ number_format((float) $amount, 2) }}
@endforeach
{{ $customer->last_transaction_date }}
{{ $customers->links() }}
@endsection