@extends('layouts.business.pdf.pdf_layout') @section('pdf_title')
{{ __('Duration: 14-12-2025 to 24-12-2025') }}
--}}| {{ __('Date') }} | {{ __('Invoice No') }} | @if (Request::get('type') == 'sales'){{ __('Customer') }} | @else{{ __('Supplier') }} | @endif{{ __('Payment Type') }} | {{ __('Total Amount') }} | {{ __('Discount') }} | @foreach ($vats as $vat){{ $vat->name }} | @endforeach
|---|---|---|---|---|---|---|---|
| {{ formatted_date($sale->saleDate) }} | {{ $sale->invoiceNumber }} | {{ $sale->party?->name }} | @if ($sale->transactions && $sale->transactions->isNotEmpty()) {{ $sale->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 ($sale->payment_type_id) {{ $sale->payment_type?->name }} @else {{ $sale->paymentType }} @endif | {{ currency_format($sale->totalAmount, currency: business_currency()) }} | {{ currency_format($sale->discountAmount, currency: business_currency()) }} | @foreach ($vats as $vat){{ $sale->vat_id == $vat->id ? currency_format($sale->vat_amount, currency: business_currency()) : '0' }} | @endforeach|
| {{ __('Total') }} | {{ currency_format($sales->sum('totalAmount'), currency: business_currency()) }} | {{ currency_format($sales->sum('discountAmount'), currency: business_currency()) }} | @foreach ($vats as $vat){{ currency_format($salesVatTotals[$vat->id] ?? 0, currency: business_currency()) }} | @endforeach||||
| {{ formatted_date($purchase->purchaseDate) }} | {{ $purchase->invoiceNumber }} | {{ $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->discountAmount, currency: business_currency()) }} | @foreach ($vats as $vat){{ $purchase->vat_id == $vat->id ? currency_format($purchase->vat_amount, currency: business_currency()) : '0' }} | @endforeach|
| {{ __('Total') }} | {{ currency_format($purchases->sum('totalAmount'), currency: business_currency()) }} | {{ currency_format($purchases->sum('discountAmount'), currency: business_currency()) }} | @foreach ($vats as $vat){{ currency_format($purchasesVatTotals[$vat->id] ?? 0, currency: business_currency()) }} | @endforeach