@if ($filter_from_date && $filter_to_date)
{{ __('Duration:') }} @if ($duration === 'today') {{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }} @elseif ($duration === 'yesterday') {{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }} @else {{ Carbon\Carbon::parse($filter_from_date)->format('d-m-Y') }} {{ __('to') }} {{ Carbon\Carbon::parse($filter_to_date)->format('d-m-Y') }} @endif
@endif
@foreach ($profits as $profit) @endforeach @if ($profits->count() > 0) @endif
{{ __('SL') }}. {{ __('Date') }} {{ __('Invoice') }} {{ __('Party Name') }} {{ __('Sale Amount') }} {{ __('Profit') }} {{ __('Loss') }} {{ __('Action') }}
{{ ($profits->currentPage() - 1) * $profits->perPage() + $loop->iteration }} {{ formatted_date($profit->saleDate) }} {{ $profit->invoiceNumber }} {{ $profit->party->name ?? '' }} {{ currency_format($profit->totalAmount, currency: business_currency()) }} {{ $profit->lossProfit > 0 ? currency_format($profit->lossProfit, currency: business_currency()) : '' }} {{ $profit->lossProfit < 0 ? currency_format(abs($profit->lossProfit), currency: business_currency()) : '' }}
{{__('Total')}} {{ currency_format($profits->sum('totalAmount'), currency: business_currency()) }} {{ currency_format($profits->where('lossProfit', '>', 0)->sum('lossProfit'), currency: business_currency()) }} {{ currency_format(abs($profits->where('lossProfit', '<', 0)->sum('lossProfit')), currency: business_currency()) }}
{{ $profits->links('vendor.pagination.bootstrap-5') }}