@extends('admin.layouts.app') @section('title', 'Profit & Loss Report') @section('page_title', 'Profit & Loss Report') @section('content')
| 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).')' }} | |
| No transactions found | ||||||||
| Grand Total | {{ number_format($totalPurchase, 2) }} | {{ number_format($totalSales, 2) }} | {{ number_format(array_sum(array_column($reportData, 'tds_vds_other')), 2) }} | {{ $totalProfit >= 0 ? number_format($totalProfit, 2) : '('.number_format(abs($totalProfit), 2).')' }} | ||||
| Category | Amount |
|---|---|
| {{ $exp['category'] ?: 'Other' }} | {{ number_format($exp['total'], 2) }} |
| No expenses found | |
| Total Expenses | {{ number_format($totalExpenses, 2) }} |
| 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).')' }} |