@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
@if (auth()->user()->accessToMultiBranch()) @endif @foreach ($purchases as $purchase) @if (auth()->user()->accessToMultiBranch()) @endif @endforeach @if ($purchases->count() > 0) @if (auth()->user()->accessToMultiBranch()) @endif @endif
{{ __('SL') }}.{{ __('Branch') }}{{ __('Invoice No') }} {{ __('Party Name') }} {{ __('Total') }} {{ __('Discount') }} {{ __('Paid') }} {{ __('Due') }} {{ __('Vat') }} {{ __('Payment Type') }} {{ __('Purchase Date') }}
{{ ($purchases->currentPage() - 1) * $purchases->perPage() + $loop->iteration }}{{ $purchase->branch->name ?? '' }}{{ $purchase->invoiceNumber }} {{ $purchase->party?->name }} {{ currency_format($purchase->totalAmount, currency: business_currency()) }} {{ currency_format($purchase->discountAmount, currency: business_currency()) }} {{ currency_format($purchase->paidAmount, currency: business_currency()) }} {{ currency_format($purchase->dueAmount, currency: business_currency()) }} {{ currency_format($purchase->vat_amount, currency: business_currency()) }} @if ($purchase->transactions && $purchase->transactions->isNotEmpty()) {{ $purchase->transactions->map(function($transaction) { if ($transaction->transaction_type === 'bank_payment' && !empty($transaction->paymentType?->name)) { return $transaction->paymentType->name; } return $transaction->transaction_type ? ucfirst(explode('_', $transaction->transaction_type)[0]) : ''; })->unique()->implode(', ') }} @elseif ($purchase->payment_type_id) {{ $purchase->payment_type?->name }} @else {{ $purchase->paymentType }} @endif {{ formatted_date($purchase->purchaseDate) }}
{{ $purchases->links('vendor.pagination.bootstrap-5') }}