@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') - $total_sales->where('transaction_type', 4)->sum('manual_dc'), 2) }} | {{ number_format($total_sales->where('transaction_type', 4)->sum('total'), 2) }} | {{ number_format($totalSalesAmount, 2) }} |
{{ $configItem['title'] ?? '' }} |
|||
| Ledger | @if ($configItem['dc_show'] == 1)Debit | Credit | @endifClosing Balance |
|---|---|---|---|
| {{ $item->name }} | @if ($configItem['dc_show'] == 1){{ number_format($debit, 2) }} | {{ number_format($credit, 2) }} | @endif{{ 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) }} |