@extends('layouts.adminapp')
@section('title') {{ __('lng.BalanceSheet') }} - {{ __('lng.Print') }} @endsection
@section('active_report', 'active')
@section('open_report', 'open')
@section('open_account', 'open')
@section('active_account', 'active')
@section('balance_sheet', 'active')
@section('content')
@include('PrintHeader.header')
{{ __('lng.BalanceSheet') }}
| {{ __('lng.Assets') }} |
{{ __('lng.Amount') }} |
@php
$TotalAssets = 0;
$currentAssetTotal = 0;
// Calculate Cash in Hand + Bank Account total
foreach ($Assets as $Asset) {
if (
$Asset->GroupID == PBConst::ACC_GROUP_CASH_IN_HAND ||
$Asset->GroupID == PBConst::ACC_GROUP_BANK_ACCOUNT
) {
$currentAssetTotal += $Asset->balance;
}
}
@endphp
@foreach ($Assets as $Asset)
@if ($Asset->GroupID == PBConst::ACC_GROUP_SUNDRY_DEBTORS)
| {{ __('lng.AccountsReceivable') }} |
@currency($Asset->balance) |
@php
if ($Asset->balance > 0) {
$TotalAssets += $Asset->balance;
}
@endphp
@elseif ($Asset->GroupID == PBConst::ACC_GROUP_CASH_IN_HAND || $Asset->GroupID == PBConst::ACC_GROUP_BANK_ACCOUNT)
{{-- Skip individual Cash and Bank rows --}}
{{-- Current Assets will be displayed once below --}}
@else
@if ($Asset->balance > 0)
| {{ App\Models\AccountGroup::find($Asset->GroupID)->title ?? '' }}
|
@currency($Asset->balance) |
@endif
@php
$TotalAssets += $Asset->balance;
@endphp
@endif
@endforeach
{{-- Show Cash + Bank as one Current Assets row --}}
@if ($currentAssetTotal > 0)
| Current Assets |
@currency($currentAssetTotal) |
@php
$TotalAssets += $currentAssetTotal;
@endphp
@endif
@if ($PLTotal < 0)
| {{ __('lng.CurrentLoss') }} |
@currency(abs($PLTotal)) |
@php
$TotalAssets += abs($PLTotal);
@endphp
@endif
|
{{ __('lng.TotalCurrentAssets') }}
|
@currency($TotalAssets)
|
| {{ __('lng.Liabilities') }} |
{{ __('lng.Amount') }} |
@php $TotalLiabilities=0; @endphp
@foreach ($Liabilities as $Liability)
@if ($Liability->GroupID == PBConst::ACC_GROUP_SUNDRY_CREDITORS)
| {{ __('lng.AccountsPayable') }} |
@currency($Liability->balance) |
@php
$TotalLiabilities += abs($Liability->balance);
@endphp
@else
@if ($Liability->balance > 0)
| {{ App\Models\AccountGroup::find($Liability->GroupID)->title ?? '' }}
|
@currency($Liability->balance) |
@endif
@php $TotalLiabilities+=$Liability->balance; @endphp
@endif
@endforeach
@if ($currentAssetTotal < 0)
| current liabilities |
@currency(abs($currentAssetTotal)) |
@php
$TotalLiabilities += abs($currentAssetTotal);
@endphp
@endif
@if ($PLTotal > 0)
| {{ __('lng.CurrentProfit') }} |
@currency($PLTotal) |
@php $TotalLiabilities +=abs($PLTotal); @endphp
@endif
| {{ __('lng.TotalCurrentLiabilities') }} |
@currency($TotalLiabilities) |
@endsection