@php $TotalDebit=$TotalCredit=$CashInHand=0; @endphp
{{ __('lng.OpeningBalance') }} |
@if ($OpeningBalance >= 0)
@currency($OpeningBalance) {{ __('lng.DR') }}
@else
@currency(abs($OpeningBalance)) {{ __('lng.CR') }}
@endif
|
@if ($Incomes->count())
{{ __('lng.TotalIncome') }} |
@foreach ($Incomes as $Income)
{{ App\Models\AccountGroup::find($Income->GroupID)->title ?? '' }} |
@currency($Income->credited) |
@php $TotalCredit+=$Income->credited; @endphp
@endforeach
{{ __('lng.Total') }} |
@currency($TotalCredit) |
@php $CashInHand=$TotalCredit; @endphp
@endif
@if ($Assets->count())
{{ __('lng.Assets') }} |
{{ __('lng.AccountGroup') }} |
{{ __('lng.Debit') }} |
{{ __('lng.Credit') }} |
{{ __('lng.Balance') }} |
@php $AssetTotalDebit=$AssetTotalCredit=0; @endphp
@foreach ($Assets as $Asset)
{{ App\Models\AccountGroup::find($Asset->GroupID)->title ?? '' }} |
@currency($Asset->debited) |
@currency($Asset->credited) |
@if ($Asset->credited - $Asset->debited > 0)
@currency($Asset->credited - $Asset->debited) {{ __('lng.CR') }}
@else
@currency(abs($Asset->credited - $Asset->debited)) {{ __('lng.DR') }}
@endif
|
@php
$AssetTotalCredit += $Asset->credited;
$AssetTotalDebit += $Asset->debited;
@endphp
@endforeach
{{ __('lng.Total') }} |
@currency($AssetTotalDebit) |
@currency($AssetTotalCredit) |
@if ($AssetTotalCredit - $AssetTotalDebit > 0)
@currency($AssetTotalCredit - $AssetTotalDebit) {{ __('lng.CR') }}
@php $CashInHand+=$AssetTotalCredit - $AssetTotalDebit; @endphp
@else
@currency(abs($AssetTotalCredit - $AssetTotalDebit)) {{ __('lng.DR') }}
@php $CashInHand-=abs($AssetTotalCredit - $AssetTotalDebit); @endphp
@endif
|
@endif
@if ($Liabilities->count())
{{ __('lng.Liabilities') }} |
{{ __('lng.AccountGroup') }} |
{{ __('lng.Debit') }} |
{{ __('lng.Credit') }} |
{{ __('lng.Balance') }} |
@php $LiabilityTotalCredit=$LiabilityTotalDebit=0; @endphp
@foreach ($Liabilities as $Liability)
{{ App\Models\AccountGroup::find($Liability->GroupID)->title ?? '' }} |
@currency($Liability->debited) |
@currency($Liability->credited) |
@if ($Liability->credited - $Liability->debited > 0)
@currency($Liability->credited - $Liability->debited) {{ __('lng.CR') }}
@else
@currency(abs($Liability->credited - $Liability->debited)) {{ __('lng.DR') }}
@endif
|
@php
$LiabilityTotalCredit += $Liability->credited;
$LiabilityTotalDebit += $Liability->debited;
@endphp
@endforeach
{{ __('lng.Total') }} |
@currency($LiabilityTotalDebit) |
@currency($LiabilityTotalCredit) |
@if ($LiabilityTotalCredit - $LiabilityTotalDebit > 0)
@currency($LiabilityTotalCredit - $LiabilityTotalDebit) {{ __('lng.CR') }}
@php $CashInHand+=$LiabilityTotalCredit - $LiabilityTotalDebit; @endphp
@else
@currency(abs($LiabilityTotalCredit - $LiabilityTotalDebit)) {{ __('lng.DR') }}
@php $CashInHand-=abs($LiabilityTotalCredit - $LiabilityTotalDebit); @endphp
@endif
|
@endif
@if ($Expenses->count())
{{ __('lng.TotalExpense') }} |
@foreach ($Expenses as $Expense)
{{ App\Models\AccountGroup::find($Expense->GroupID)->title ?? '' }} |
@currency($Expense->debited) |
@php $TotalDebit+=$Expense->debited; @endphp
@endforeach
{{ __('lng.Total') }} |
@currency($TotalDebit) |
@php $CashInHand-=abs($TotalDebit); @endphp
@endif
{{ __('lng.CashInHand') }} |
@if ($OpeningBalance >= 0)
@php $CashInHand-=abs($OpeningBalance); @endphp
@else
@php $CashInHand+=abs($OpeningBalance); @endphp
@endif
@if ($CashInHand >= 0)
@currency($CashInHand) {{ __('lng.CR') }}
@else
@currency(abs($CashInHand)) {{ __('lng.DR') }}
@endif
|