@extends('layouts.master') @section('title', $title) @section('page_js') @endsection @section('action-btn')
@endsection @section('content')

{{ __('Select dates') }}

{{ __('required_field') }} Start Date
{{ __('required_field') }} End Date
{{ __('Report') }}:
{{ __('Balance Sheet') }}
{{ __('Duration') }}:
{{ $filter['startDateRange'] . ' to ' . $filter['endDateRange'] }}
@foreach ($chartAccounts as $type => $accounts) @php $totalNetAmount=0; @endphp @foreach ($accounts as $accountData) @foreach ($accountData['account'] as $account) @php $totalNetAmount+=$account['netAmount']; @endphp @endforeach @endforeach
{{ __('Total' . ' ' . $type) }}
@if ($totalNetAmount < 0) {{ __('Dr') . '. ' . number_format(abs($totalNetAmount)) }} @elseif($totalNetAmount > 0) {{ __('Cr') . '. ' . number_format($totalNetAmount) }} @else {{ number_format(0) }} @endif
@endforeach

{{ __('Select data sheet') }}

@foreach ($chartAccounts as $type => $accounts)
@php $xyz = 0; @endphp
@foreach ($accounts as $account)

{{ $account['subType'] }}

{{ __('Account') }} {{ __('Amount') }}
@php $totalCredit = 0; $totalDebit = 0; @endphp @foreach ($account['account'] as $record) @php $totalCredit += $record['totalCredit']; $totalDebit += $record['totalDebit']; @endphp
{{ $record['account_name'] }} @if ($record['netAmount'] < 0) {{ __('Dr') . '. ' . number_format(abs($record['netAmount'])) }} @elseif($record['netAmount'] > 0) {{ __('Cr') . '. ' . number_format($record['netAmount']) }} @else {{ number_format(0) }} @endif
@endforeach
{{ __('Total') . ' ' . $account['subType'] }} @php $total= $totalCredit-$totalDebit; @endphp @if ($total < 0) {{ __('Dr') . '. ' . number_format(abs($total)) }} @elseif($total > 0) {{ __('Cr') . '. ' . number_format($total) }} @else {{ number_format(0) }} @endif
@endforeach
@endforeach
@endsection