{{ __('From Date') }}: {{ $start_date }}
{{ __('To Date') }}: {{ $end_date }}
{{ Auth::user()->id ?? __('Guest') }}
| {{ __('Statement') }} | {{ __('Credit') }} | {{ __('Debit') }} | {{ __('Total') }} |
| {{ __('Sales') }} | @php $salesAmount = $sales * -1; $formattedSales = number_format($salesAmount, 3); $TotalCredit = 0; $TotalDebit = 0; $TotalCreditCheckSalary = 0; $TotalDebitSalary = 0; // Convert the formatted sales back to a numeric value for arithmetic operations $numericSalesAmount = (float) $salesAmount; if ($numericSalesAmount > 0) { $TotalCredit += $numericSalesAmount; } else { $TotalDebit += abs($numericSalesAmount); } @endphp{{ $sales > 0 ? number_format(abs($sales), 3) : '---' }} | {{ $sales < 0 ? number_format(abs($sales), 3) : '---' }} | |
| {{ __('Returns on sales allowances') }} | {{ $returnsAmount > 0 ? number_format(abs($returns_on_sales_allowances)) : '---' }} | {{ $returnsAmount < 0 ? number_format(abs($returns_on_sales_allowances), 3) : '---' }} | |
| {{ __('Discount allowed') }} | {{ $discountAmount > 0 ? number_format(abs($discountAmount), 3) : '---' }} | {{ $discountAmount < 0 ? number_format(abs($discountAmount), 3) : '---' }} | |
| {{ __('Net sales') }} | {{ number_format(abs($net_sales), 3) }} | ||
| {{ __('Cost of goods sold') }} | {{ $costofgoodssold > 0 ? number_format(abs($costofgoodssold), 3) : '---' }} | {{ $costofgoodssold < 0 ? number_format(abs($costofgoodssold), 3) : '---' }} | |
| {{ __('Gross profit') }} | --- | --- | {{ number_format(abs($gross_profit), 3) }} |
| {{ __('Administrative and general expenses') }} | |||
| {{ $item['name'] }} | {{ $adminAmount > 0 ? number_format(abs($adminAmount), 3) : '---' }} | {{ $adminAmount < 0 ? number_format(abs($adminAmount), 3) : '---' }} | {{ __('Salary Expanse') }} | @endif @foreach ($detailed_salary_accounts as $item) @if ($item['amount'] != 0) @php $adminAmount = $item['amount'] * -1; $formattedAdmin = number_format($adminAmount, 3); $numericAmount = (float) $adminAmount; if ($numericAmount > 0) { $TotalCredit += $numericAmount; } else { $TotalDebit += abs($numericAmount); } @endphp |
| {{ $item['name'] }} | {{ $adminAmount > 0 ? number_format(abs($adminAmount), 3) : '---' }} | {{ $adminAmount < 0 ? number_format(abs($adminAmount), 3) : '---' }} | |
| {{ __('Total expenses') }} | {{ number_format(abs($sum_of_administrative_and_general_expenses + $sum_of_employee_salaries), 3) }} | ||
| {{ __('Other income') }} | |||
| {{ $item['name'] }} | {{ $amount > 0 ? number_format(abs($numericAmount), 3) : '---' }} | {{ $amount < 0 ? number_format(abs($numericAmount), 3) : '---' }} | |
| {{ __('Total Other income') }} | --- | --- | {{ number_format(abs($sum_of_other_incomes), 3) }} |
| {{ __('Other expenses') }} | |||
| {{ $item['name'] }} | {{ $amount > 0 ? number_format(abs($numericAmount), 3) : '---' }} | {{ $amount <= 0 ? number_format(abs($numericAmount), 3) : '---' }} | |
| {{ __('Total Other expenses') }} | --- | --- | {{ number_format(abs($sum_of_other_expenses), 3) }} |
| {{ __('Net profit') }} | --- | --- | {{ number_format(abs($total), 3) }} |
| {{ __('Total') }} | {{ number_format(abs($TotalCredit), 3) }} | {{ number_format(abs($TotalDebit), 3) }} | {{ number_format(abs($total), 3) }} |