Files
kulakpos_web/Modules/Business/resources/views/bill-wise-profits/excel-csv.blade.php

43 lines
1.7 KiB
PHP
Raw Normal View History

2026-03-15 17:08:23 +07:00
<table class="table">
<thead>
<tr>
<th>{{ __('SL') }}.</th>
<th>{{ __('Date') }}</th>
<th>{{ __('Invoice') }}</th>
<th>{{ __('Party Name') }}</th>
<th>{{ __('Sale Amount') }}</th>
<th>{{ __('Profit') }}</th>
<th>{{ __('Loss') }}</th>
</tr>
</thead>
<tbody>
@foreach ($profits as $profit)
<tr>
<td>{{ $loop->iteration }}</td>
<td>{{ formatted_date($profit->saleDate) }}</td>
<td>{{ $profit->invoiceNumber }}</td>
<td>{{ $profit->party->name ?? '' }}</td>
<td>{{ currency_format($profit->totalAmount, currency: business_currency()) }}</td>
<td>
{{ $profit->lossProfit > 0 ? currency_format($profit->lossProfit, currency: business_currency()) : '' }}
</td>
<td class="text-danger">
{{ $profit->lossProfit < 0 ? currency_format(abs($profit->lossProfit), currency: business_currency()) : '' }}
</td>
</tr>
@endforeach
</tbody>
@if ($profits->count() > 0)
<tr>
<td>{{__('Total')}}</td>
<td></td>
<td></td>
<td></td>
<td>{{ currency_format($profits->sum('totalAmount'), currency: business_currency()) }}</td>
<td>{{ currency_format($profits->where('lossProfit', '>', 0)->sum('lossProfit'), currency: business_currency()) }}</td>
<td>{{ currency_format(abs($profits->where('lossProfit', '<', 0)->sum('lossProfit')), currency: business_currency()) }}</td>
<td></td>
</tr>
@endif
</table>