@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')

{{ __('lng.Print') }}

@include('PrintHeader.header')

{{ __('lng.BalanceSheet') }}

@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) @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) @endif @php $TotalAssets += $Asset->balance; @endphp @endif @endforeach {{-- Show Cash + Bank as one Current Assets row --}} @if ($currentAssetTotal > 0) @php $TotalAssets += $currentAssetTotal; @endphp @endif @if ($PLTotal < 0) @php $TotalAssets += abs($PLTotal); @endphp @endif
{{ __('lng.Assets') }} {{ __('lng.Amount') }}
{{ __('lng.AccountsReceivable') }} @currency($Asset->balance)
{{ App\Models\AccountGroup::find($Asset->GroupID)->title ?? '' }} @currency($Asset->balance)
Current Assets @currency($currentAssetTotal)
{{ __('lng.CurrentLoss') }} @currency(abs($PLTotal))
{{ __('lng.TotalCurrentAssets') }} @currency($TotalAssets)
@php $TotalLiabilities=0; @endphp @foreach ($Liabilities as $Liability) @if ($Liability->GroupID == PBConst::ACC_GROUP_SUNDRY_CREDITORS) @php $TotalLiabilities += abs($Liability->balance); @endphp @else @if ($Liability->balance > 0) @endif @php $TotalLiabilities+=$Liability->balance; @endphp @endif @endforeach @if ($currentAssetTotal < 0) @php $TotalLiabilities += abs($currentAssetTotal); @endphp @endif @if ($PLTotal > 0) @php $TotalLiabilities +=abs($PLTotal); @endphp @endif
{{ __('lng.Liabilities') }} {{ __('lng.Amount') }}
{{ __('lng.AccountsPayable') }} @currency($Liability->balance)
{{ App\Models\AccountGroup::find($Liability->GroupID)->title ?? '' }} @currency($Liability->balance)
current liabilities @currency(abs($currentAssetTotal))
{{ __('lng.CurrentProfit') }} @currency($PLTotal)
{{ __('lng.TotalCurrentLiabilities') }} @currency($TotalLiabilities)
{{ __('lng.Back') }}
@endsection