{{ $settings['company_address'] ?? '' }}
Phone: {{ $settings['company_phone'] ?? '' }} | Email: {{ $settings['company_email'] ?? '' }}
{{ $selectedCustomer ? $selectedCustomer->name : 'All Customers' }} | {{ $startDate }} to {{ $endDate }}
| Date | Invoice No | Customer | Sales | Discount | TDS | VDS | Sales Return | Payment | Balance | Payment Method |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ date('d-m-Y', strtotime($entry->date)) }} | {{ $entry->invoice_no ?: $entry->reference_id }} | {{ $entry->customer->name ?? 'N/A' }} | {{ number_format($salesAmount, 2) }} | {{ number_format($discount, 2) }} | {{ number_format($tds, 2) }} | {{ number_format($vds, 2) }} | {{ number_format($salesReturnAmount, 2) }} | {{ number_format($paymentAmount, 2) }} | @php $_pm = '-'; $_voucher = $vouchers[$entry->reference_id] ?? null; if($entry->reference_type == 'Voucher' && $_voucher) { if(preg_match('/\(([^)]+)\)/', $_voucher->description ?? '', $_m)) { $_pm = $_m[1]; } } else { $_pd = $entry->description ?? ''; if(preg_match('/Method:\s*([^,]+)/', $_pd, $_m)) { $_pm = trim($_m[1]); } elseif(preg_match_all('/\(([^)]+)\)/', $_pd, $_ms)) { $_last = end($_ms[1]); if(!preg_match('/^(Disc|TDS|VDS)/', $_last)) { $_pm = $_last; } } } @endphp{{ number_format($balance, 2) }} | {{ $_pm }} |
| No records found | ||||||||||
| Total: | {{ number_format($totalSales, 2) }} | {{ number_format($totalDiscount, 2) }} | {{ number_format($totalTDS, 2) }} | {{ number_format($totalVDS, 2) }} | {{ number_format($totalSalesReturn, 2) }} | {{ number_format($totalPayment, 2) }} | {{ number_format($balance, 2) }} | |||