@php $total_receipt_amount = 0 ; $total_payment_amount = 0 ; @endphp @foreach ($voucher_data as $voucher_type => $voucher_type_data )

{{ $voucher_type }}

@php $total_amount = 0; @endphp @foreach($voucher_type_data as $group_id => $group_data) @php $group_name = Common::group_code_with_parent_code($group_id); $group_total = 0 ; @endphp @foreach ($group_data as $sub_group_id => $sub_group_head_data ) @php $sub_group_name = Common::sub_group_code_with_parent_code($sub_group_id); $sub_group_total = 0; @endphp @foreach ($sub_group_head_data as $transaction) @php $head_data = $transaction->head; $head_id = $head_data->id; $name = $head_data->name; $type = $head_data->reference_type; $type_name = ""; if($type == 'work_item'){ $type_name = " (".$head_data->work_item->work->name.")"; } $head_name = Common::head_code_with_parent_code($head_id) . ' ' . $name . $type_name; $bf = $transaction->bf; $amount = $transaction->amount; $total_amount += $amount; $group_total += $amount; $sub_group_total += $amount; $parameters=[ 'action' =>'Show', 'income_expense_head_id' => $head_data->id, 'from' => request()->from, 'to' => request()->to , 'branch_id' => request()->branch_id, 'is_official' => 'combine', // 'voucher_type' => $voucher_type == 'Receipts' ? 'RV' : '', ]; $route = route('reports_accounts_ledger.new.list',$parameters); @endphp @endforeach @endforeach @endforeach
{{ __('lang.head_name') }} {{ __('lang.amount') }} {{ $currency_code }}
{{ $group_name }}
{{ $sub_group_name }}
{{ $head_name }} {{ Transaction::convert_money_format($amount) }}
Sub Group Total {{ Transaction::convert_money_format($sub_group_total) }}
Group Total {{ Transaction::convert_money_format($group_total) }}
Total {{ $voucher_type }} Amount {{ Transaction::convert_money_format($total_amount) }}

@php if($voucher_type == 'Receipts'){ $total_receipt_amount = $total_amount ; } else if ($voucher_type == 'Expenses'){ $total_payment_amount = $total_amount ; } @endphp @endforeach
@php $params = request()->except('_token'); $params['report_type'] = 'detailed'; @endphp
Previouse Balance : {{Transaction::isNegative($previous_balance)}}
Total Receipt Amount : {{Transaction::convert_money_format($total_receipt_amount)}} Total Payment Amount : {{Transaction::convert_money_format($total_payment_amount)}} Balance Amount : {{Transaction::isNegative(($total_receipt_amount - $total_payment_amount) + $previous_balance)}}