{{ $settings['company_name'] ?? 'Flagship' }}

Profit & Loss Report - Shipment Wise

From: {{ \Carbon\Carbon::parse($from_date)->format('d-M-Y') }}
To: {{ \Carbon\Carbon::parse($to_date)->format('d-M-Y') }}
Generated: {{ now()->format('d-M-Y H:i') }}
@php $sl = 1; @endphp @foreach($reportData as $row) @php $rowProfit = $row['sales_amount'] - $row['purchase_amount'] - $row['tds_vds_other']; @endphp @endforeach
Sl Date Shipment Supplier Purchase Sales TDS/VDS Profit/Loss
{{ $sl++ }} {{ $row['purchase_date'] ? \Carbon\Carbon::parse($row['purchase_date'])->format('d-M-Y') : '-' }} {{ $row['shipment_number'] }} {{ $row['supplier_name'] }} {{ number_format($row['purchase_amount'], 2) }} {{ number_format($row['sales_amount'], 2) }} {{ number_format($row['tds_vds_other'], 2) }} {{ $rowProfit >= 0 ? number_format($rowProfit, 2) : '('.number_format(abs($rowProfit), 2).')' }}
Grand Total {{ number_format($totalPurchase, 2) }} {{ number_format($totalSales, 2) }} {{ number_format($totalTdsVds, 2) }} {{ $totalProfit >= 0 ? number_format($totalProfit, 2) : '('.number_format(abs($totalProfit), 2).')' }}

Expenses Summary

@foreach($expensesByCategory as $exp) @endforeach
Category Amount
{{ $exp['category'] ?: 'Other' }} {{ number_format($exp['total'], 2) }}
Total Expenses {{ number_format($totalExpenses, 2) }}
@php $netProfit = $totalProfit - $totalExpenses; @endphp
Net Profit Calculation
Gross Profit (Total Profit/Loss) {{ $totalProfit >= 0 ? number_format($totalProfit, 2) : '('.number_format(abs($totalProfit), 2).')' }}
Less: Total Expenses (-) {{ number_format($totalExpenses, 2) }}
{{ $netProfit >= 0 ? 'Net Profit' : 'Net Loss' }} {{ $netProfit >= 0 ? number_format($netProfit, 2) : '('.number_format(abs($netProfit), 2).')' }}