@include('backend.admin.report.header')
Period:
@if (request()->get('from_date') && request()->get('to_date'))
{{ \Carbon\Carbon::parse(request()->get('from_date'))->format('d M Y') }} – {{ \Carbon\Carbon::parse(request()->get('to_date'))->format('d M Y') }}
@else
—
@endif
| Income |
Expenditure |
@php
$sales_discount_monthly = $results['discount_sales']['monthly'] ?? 0;
$sales_discount_upto = $results['discount_sales']['upto_month'] ?? 0;
$item_discount_monthly = $results['total_item_discount']['monthly'] ?? 0;
$item_discount_upto = $results['total_item_discount']['upto_month'] ?? 0;
$profit_on_sale_monthly = max(0, $results['sales_profit']['monthly'] ?? 0) - $sales_discount_monthly - $item_discount_monthly;
$profit_on_sale_upto = max(0, $results['sales_profit']['upto_month'] ?? 0) - $sales_discount_upto - $item_discount_upto;
@endphp
| Particulars |
Monthly |
Up to Month |
| Profit on sale |
{{ number_format($profit_on_sale_monthly, 0) }} |
{{ number_format($profit_on_sale_upto, 0) }} |
@foreach ($results['incomes'] as $income)
| {{ $income['income_head'] }} |
{{ number_format($income['month_amount'] ?? 0, 0) }} |
{{ number_format($income['upto_month'] ?? 0, 0) }} |
@endforeach
|
| Particulars |
Monthly |
Up to Month |
@foreach ($results['expenses'] as $expense)
| {{ $expense['expense_head'] }} |
{{ number_format($expense['month_amount'], 0) }} |
{{ number_format($expense['upto_month'], 0) }} |
@endforeach
@php
$sales_profit_monthly = $results['sales_profit']['monthly'] ?? 0;
$sales_profit_upto = $results['sales_profit']['upto_month'] ?? 0;
$loss_monthly = $sales_profit_monthly < 0 ? abs($sales_profit_monthly) : 0;
$loss_upto_month = $sales_profit_upto < 0 ? abs($sales_profit_upto) : 0;
$income_total_monthly = max(0, $sales_profit_monthly) + $results['incomes']->sum('month_amount');
$income_total_upto_month = max(0, $sales_profit_upto) + $results['incomes']->sum('upto_month');
$expense_total_monthly = $results['expenses']->sum('month_amount') - $loss_monthly;
$expense_total_upto_month = $results['expenses']->sum('upto_month') - $loss_upto_month;
$income_minus_expenses_monthly = $income_total_monthly - $expense_total_monthly - $sales_discount_monthly - $item_discount_monthly;
$income_minus_expenses_upto_month = $income_total_upto_month - $expense_total_upto_month - $sales_discount_upto - $item_discount_upto;
@endphp
@if ($loss_monthly > 0 || $loss_upto_month > 0)
| (Less: Loss on sale) |
({{ number_format($loss_monthly, 0) }}) |
({{ number_format($loss_upto_month, 0) }}) |
@endif
| Profit / Loss |
{{ number_format($income_minus_expenses_monthly, 0) }} |
{{ number_format($results['profit_loss_upto_month'] ?? $income_minus_expenses_upto_month, 0) }} |
|
| Total |
{{ number_format($income_total_monthly - $sales_discount_monthly - $item_discount_monthly, 0) }} |
{{ number_format($income_total_upto_month - $sales_discount_upto - $item_discount_upto, 0) }} |
|
| Total |
{{ number_format($income_total_monthly - $sales_discount_monthly - $item_discount_monthly, 0) }} |
{{ number_format($income_total_upto_month - $sales_discount_upto - $item_discount_upto, 0) }} |
|