| {{ __('SL') }}. | {{ __('Customer Name') }} | {{ __('Phone') }} | {{ __('Type') }} | {{ __('Total Sales') }} | {{ __('Amount') }} | {{ __('Paid') }} | {{ __('Total Sale Due') }} | |
|---|---|---|---|---|---|---|---|---|
| {{ $customers->firstItem() + $loop->index }} | {{ $customer->name }} | {{ $customer->phone }} | @if ($customer->type == 'Retailer'){{ __('Customer') }} | @else{{ $customer->type }} | @endif{{ $customer->sales?->count() }} | {{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }} | {{ currency_format($customer->sales?->sum('paidAmount'), currency: business_currency()) }} | {{ currency_format($customer->sales?->sum('dueAmount'), currency: business_currency()) }} |
| {{__('Total')}} | {{ $customers->sum(fn($customer) => $customer->sales?->count()) }} | {{ currency_format($totalAmount, currency: business_currency()) }} | {{ currency_format($totalPaid, currency: business_currency()) }} | {{ currency_format($totalDue, currency: business_currency()) }} |