@php $amountContainer = [ 'total_expense' => 0, 'cost_of_goods_sold' => 0, ]; $startDate = date('Y-m-d 00:00:00', strtotime(request()->date_from)); $endDate = date('Y-m-d 23:59:59', strtotime(request()->date_to)); @endphp
Sales |
|||
| Sales | Discount | Return | Total Sales |
|---|---|---|---|
| {{ number_format($total_sales->where('transaction_type', 3)->sum('sub_total') + $total_sales->where('transaction_type', 3)->sum('vat_amount'), 2) }} | {{ number_format($total_sales->where('transaction_type', 3)->sum('manual_dc'), 2) }} | {{ number_format($total_sales->where('transaction_type', 4)->sum('total'), 2) }} | {{ number_format($totalSalesAmount, 2) }} |
Cash Bank |
|||
| Ledger | Debit | Credit | Closing Balance |
|---|---|---|---|
| {{ $cashBank->name }} | {{ number_format($debit, 2) }} | {{ number_format($credit, 2) }} | {{ number_format($closingBalance, 2) }} |
Supplier Balance |
|||
| Group | Debit | Credit | Closing Balance |
|---|---|---|---|
| {{ $supplier->name }} | {{ number_format($debit, 2) }} | {{ number_format($credit, 2) }} | {{ number_format($closingBalance, 2) }} |
Payable |
|||
| Ledger | Debit | Credit | Closing Balance |
|---|---|---|---|
| {{ $pay->name }} | {{ number_format($debit, 2) }} | {{ number_format($credit, 2) }} | {{ number_format($closingBalance, 2) }} |
Customer Balance |
|||
| Group | Debit | Credit | Closing Balance |
|---|---|---|---|
| {{ $customer->name }} | {{ number_format($debit, 2) }} | {{ number_format($credit, 2) }} | {{ number_format($closingBalance, 2) }} |
Daily Expenses |
|
| Ledger | Closing Balance |
|---|---|
| {{ $dailyExpense->name }} | {{ number_format($closingBalance, 2) }} |
Profit |
|
|---|---|
| Total Sales | {{ number_format($totalSalesAmount, 2) }} |
| (-) Cost Of Goods Sold | {{ number_format(floatval($amountContainer['cost_of_goods_sold']), 2) }} |
| (-) Expenses | {{ number_format(floatval($amountContainer['total_expense']), 2) }} |
| Profit = | @php $minusCostFromTotalSales = floatval($totalSalesAmount) - floatval($amountContainer['cost_of_goods_sold']); @endphp {{ number_format($minusCostFromTotalSales - $amountContainer['total_expense'], 2) }} |