migrate to gtea from bistbucket
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{{ __('SL') }}.</th>
|
||||
<th class="text-start">{{ __('Customer Name') }}</th>
|
||||
<th class="text-start">{{ __('Phone') }}</th>
|
||||
<th class="text-start">{{ __('Email') }}</th>
|
||||
<th class="text-start">{{ __('Type') }}</th>
|
||||
<th class="text-start">{{ __('Total Sales') }}</th>
|
||||
<th class="text-start">{{ __('Total Amount') }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($customers as $customer)
|
||||
<tr>
|
||||
<td>{{ $loop->iteration }}</td>
|
||||
<td class="text-start">{{ $customer->name }}</td>
|
||||
<td class="text-start">{{ $customer->phone }}</td>
|
||||
<td class="text-start">{{ $customer->email }}</td>
|
||||
@if ($customer->type == 'Retailer')
|
||||
<td class="text-start">{{ __('Customer') }}</td>
|
||||
@else
|
||||
<td class="text-start">{{ $customer->type }}</td>
|
||||
@endif
|
||||
<td class="text-start">{{ $customer->sales?->count() }}</td>
|
||||
<td class="text-start">{{ currency_format($customer->sales?->sum('totalAmount'), currency: business_currency()) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@if ($customers->count() > 0)
|
||||
<tr class="table-footer">
|
||||
<td>{{ __('Total') }}</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td class="d-print-none"></td>
|
||||
<td class="text-center">
|
||||
{{ $customers->sum(fn($customer) => $customer->sales?->count() ?? 0) }}
|
||||
</td>
|
||||
<td class="text-end">
|
||||
{{ currency_format($customers->sum(fn($customer) => $customer->sales?->sum('totalAmount') ?? 0), currency: business_currency()) }}
|
||||
</td>
|
||||
</tr>
|
||||
@endif
|
||||
</table>
|
||||
Reference in New Issue
Block a user