@extends('layouts.pdf') @section('title') {{ $extra['module_name'] }} @endsection @section('content')
{{ config('settings.company_name')}}
{{ config('settings.address_1')}}, {{ config('settings.address_2')}}, {{ config('settings.city')}}
{{$heading}}
@if($search_by['from'] && $search_by['to']) {{__('lang.from')}}: {{ $transaction->date_format($search_by['from']) }} {{__('lang.to')}}: {{ $transaction->date_format($search_by['to']) }} @else {{ 'Upto ' .$transaction->date_format(now()) }} @endif
@if($report_type == "detailed") @endif @php $net_profit = 0; @endphp @foreach ($data as $key => $group) {{-- Type --}} {{-- Expense, Revenue --}} @php $firstLevelTotal = 0; $secondLevelTotal = 0; $thirdLevelTotal = 0; $secondLeveldr = 0; $secondLevelcr = 0; @endphp @foreach ($group as $groupKey =>$groupValue) {{-- Group --}} @foreach ($groupValue as $subGroupKey => $subGroupValue) {{-- Sub Group --}} @php $code = reset($subGroupValue); $group_code = $code['group_code']; $sub_group_code = $code['type_code']; $subgroup_id = $code['subgroup_id']; $sub_total_text = "$subGroupKey ".__('lang.sub_total'); if($summary_group){ $sub_total_text = "$group_code.$sub_group_code $subGroupKey"; } $sub_total_text = strtoupper($sub_total_text); @endphp @php $secondLevelTotal_dr = 0; $secondLevelTotal_cr = 0; @endphp @foreach ($subGroupValue as $transactionsKey => $transactionsValue) {{-- Transactions --}} @php // dd($transactionsValue); $dr = $transactionsValue['dr']; $cr = $transactionsValue['cr']; $amount = $dr - $cr; $secondLevelTotal_dr += $dr; $secondLevelTotal_cr += $cr; $thirdLevelTotal_dr += $dr; $thirdLevelTotal_cr += $cr; $firstLevelTotal += $amount; $secondLevelTotal += $amount; $thirdLevelTotal += $amount; $parameters = ['income_expense_head_id'=> $transactionsValue['income_expense_head_id'] , 'branch_id' => $extra['branch']->id, 'from' => $search_by['from'], 'to' => $search_by['to'], 'action' => 'Show']; $route = route('reports_accounts_ledger.branch_wise.report',$parameters); @endphp @if($report_type == "detailed") @endif @endforeach {{-- End Transactions --}} @if($report_type == "detailed") @endif @php $secondLevelTotal = 0; $secondLevelTotal_dr = 0; $secondLevelTotal_cr = 0; @endphp @endforeach {{-- End Sub Group --}} @endforeach {{-- End Group --}} @if($report_type == "detailed") @endif @php $thirdLevelTotal = 0; $thirdLevelTotal_dr = 0; $thirdLevelTotal_cr = 0; @endphp @endforeach {{-- End Type --}}
{{__('lang.code')}} {{__('lang.heads')}}{{__('lang.total_amount')}}{{$transaction->systemSettingCurrency()}} {{__('lang.paid_amount')}}{{$transaction->systemSettingCurrency()}}{{__('lang.balance_amount')}}{{$transaction->systemSettingCurrency()}}
{{ strtoupper($key) }}
{{ strtoupper($groupKey) }}
{{$subGroupKey}}
{{$transactionsKey}} {{$transactionsValue['name']}} {{ $transaction->isNegative($dr) }} {{ $transaction->isNegative($cr) }} {{ $transaction->isNegative($amount)}}
{{ $sub_total_text }}{{ $transaction->isNegative($secondLevelTotal_dr) }} {{ $transaction->isNegative($secondLevelTotal_cr) }}{{ $transaction->isNegative($secondLevelTotal ) }}
{{__('lang.grand_total')}}{{ $transaction->isNegative($thirdLevelTotal_dr ) }} {{ $transaction->isNegative($thirdLevelTotal_cr ) }}{{ $transaction->isNegative($thirdLevelTotal ) }}
@stop