@extends('layouts.business.pdf.pdf_layout') @section('pdf_title')
@include('business::print.header')

{{ __('Purchase Report List') }}

{{--

{{ __('Duration: 14-12-2025 to 24-12-2025') }}

--}}
@endsection @section('pdf_content') @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
{{ __('Branch') }}{{ __('Invoice No') }} {{ __('Date') }} {{ __('Party Name') }} {{ __('Payment Type') }} {{ __('Total') }} {{ __('Paid') }} {{ __('Due') }}
{{ $purchase->branch->name ?? '' }} {{ $purchase->invoiceNumber }} {{ formatted_date($purchase->purchaseDate) }} {{ $purchase->party?->name }} @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 {{ currency_format($purchase->totalAmount, currency: business_currency()) }} {{ currency_format($purchase->paidAmount, currency: business_currency()) }} {{ currency_format($purchase->dueAmount, currency: business_currency()) }}
{{ __('Total') }} {{ currency_format($purchases->sum('totalAmount'), currency: business_currency()) }} {{ currency_format($purchases->sum('paidAmount'), currency: business_currency()) }} {{ currency_format($purchases->sum('dueAmount'), currency: business_currency()) }}
@endsection