@extends('layouts.master') @section('css') @endsection @section('title') Profit & Loss Account @endsection @section('content')
Detailed Profit & Loss Account
Current Financial Year :- {{ \Carbon\Carbon::parse($currentFinancial->fy_from)->format('d M y') }} - {{ \Carbon\Carbon::parse($currentFinancial->fy_to)->format('d M y') }}
@php $monthStartDate = Carbon\Carbon::now()->startOfMonth()->format('Y-m-d'); $monthEndDate = Carbon\Carbon::now()->endOfMonth()->format('Y-m-d'); $startDate = app('request')->input('from_date') ?? $monthStartDate; $endDate = app('request')->input('to_date') ?? $monthEndDate; @endphp
Dr
Cr
Gross Profit & Loss
@if ($openingStockDrCr == 'Dr') @endif @foreach ($groups as $group) @if ($group->closing_dr_cr == 0 && $group->amount != 0) @endif @endforeach @if ($closingStockDrCr == 'Dr') @endif @if ($isProfit) @endif
Particulars Amount
Opening Stock {{ number_format($openingStock, 2) }}
{{ $group->name }}
@foreach ($group->descendantsAndSelf as $subGroup) @if ($subGroup->amount != 0) @if ($subGroup->name !== $group->name)
{{ $subGroup->name }} {{ number_format($subGroup->amount, 2) }}
@endif @endif @endforeach @foreach ($group->ledgers as $ledger) @if ($ledger->balance != 0)
{{ $ledger->name }} {{ $ledger->closing_dr_cr == 0 ? number_format($ledger->balance, 2) : number_format(-1 * $ledger->balance, 2) }}
@endif @endforeach
{{ number_format($group->amount, 2) }}
Closing Stock {{ number_format($closingStock, 2) }}
Gross Profit {{ number_format($grossProfitOrLoss, 2) }}
@if ($openingStockDrCr == 'Cr') @endif @foreach ($groups as $group) @if ($group->closing_dr_cr == 1 && $group->amount != 0) @endif @endforeach @if ($closingStockDrCr == 'Cr') @endif @if (!$isProfit) @endif
Particulars Amount
Opening Stock {{ number_format($openingStock, 2) }}
{{ $group->name }}
@foreach ($group->descendantsAndSelf as $subGroup) @if ($subGroup->name !== $group->name && $subGroup->amount != 0)
{{ $subGroup->name }} {{ number_format($subGroup->amount, 2) }}
@endif @endforeach @foreach ($group->ledgers as $ledger) @if ($ledger->balance != 0)
{{ $ledger->name }} {{ $ledger->closing_dr_cr == 1 ? number_format($ledger->balance, 2) : number_format(-1 * $ledger->balance, 2) }}
@endif @endforeach
{{ number_format($group->amount, 2) }}
Closing Stock {{ number_format($closingStock, 2) }}
Gross Loss {{ number_format($grossProfitOrLoss, 2) }}
Total {{ number_format($debitTotal, 2) }} Total {{ number_format($creditTotal, 2) }}
Net Profit & Loss
@if (!$isProfit) @endif @foreach ($netProfitGroups as $netProfitGroup) @if ($netProfitGroup->amount != 0) @if ($netProfitGroup->closing_dr_cr == 0) @endif @endif @endforeach @if ($isNetProfit) @endif
Particulars Amount
Gross Loss {{ number_format($grossProfitOrLoss, 2) }}
{{ $netProfitGroup->name }} @foreach ($netProfitGroup->descendantsAndSelf as $subGroup) @if ($subGroup->name !== $netProfitGroup->name && $subGroup->amount != 0)
{{ $subGroup->name }} {{ number_format($subGroup->amount, 2) }}
@endif @endforeach @foreach ($netProfitGroup->ledgers as $ledger) @if ($ledger->balance != 0)
{{ $ledger->name }} {{ $ledger->closing_dr_cr == 0 ? number_format($ledger->balance, 2) : number_format(-1 * $ledger->balance, 2) }}
@endif @endforeach
{{ number_format($netProfitGroup->amount, 2) }}
Net Profit {{ number_format($netProfitOrLoss, 2) }}
@if ($isProfit) @endif @foreach ($netProfitGroups as $netProfitGroup) @if ($netProfitGroup->amount != 0) @if ($netProfitGroup->closing_dr_cr == 1) @endif @endif @endforeach @if (!$isNetProfit) @endif
Particulars Amount
Gross Profit {{ number_format($grossProfitOrLoss, 2) }}
{{ $netProfitGroup->name }} @foreach ($netProfitGroup->descendantsAndSelf as $subGroup) @if ($subGroup->name !== $netProfitGroup->name && $subGroup->amount != 0)
{{ $subGroup->name }} {{ number_format($subGroup->amount, 2) }}
@endif @endforeach @foreach ($netProfitGroup->ledgers as $ledger) @if ($ledger->balance != 0)
{{ $ledger->name }} {{ $ledger->closing_dr_cr == 1 ? number_format($ledger->balance, 2) : number_format(-1 * $ledger->balance, 2) }}
@endif @endforeach
{{ number_format($netProfitGroup->amount, 2) }}
Net Loss {{ number_format($netProfitOrLoss, 2) }}
Total {{ number_format($netProfitDebitTotal, 2) }} Total {{ number_format($netProfitCreditTotal, 2) }}
{{-- Print Modal --}}
@csrf
@endsection @section('script') @endsection