@extends('layouts.pdf') @section('title') {{ $extra['module_name'] }} @endsection @php $currency_code = $transaction->systemSettingCurrency(); $has_branch = request()->branch_id ?? null; $total_colspan = $has_branch ? 5 : 6; @endphp @section('content')
@include('admin.partials.header', ['extra' => $extra]) @if(!$has_branch) @endif @foreach ($ranges as $range_key => $range) @endforeach @php $grand_totals= []; @endphp @foreach ($aging_data as $sell_data) @php $sell = $sell_data['sell']; $aging = $sell_data['aging']; $sell_total = 0; @endphp @if(!$has_branch) @endif @foreach ($aging as $range_key=> $aging_amount) @php $sell_total += $aging_amount; $grand_totals[$range_key] += $aging_amount; @endphp @endforeach @endforeach @foreach ($grand_totals as $grand_total) @endforeach
{{__('lang.serial_no')}} {{__('lang.registration_no')}}{{__('lang.project')}}{{__('lang.customer')}} {{__('lang.phone')}} {{__('lang.address')}} {{ $range_key }}
{{ $currency_code }}
{{__('lang.total')}}
{{ $currency_code }}
{{ $loop->iteration }} {{ $sell->registration_no }} {{ $sell->branch->name ??'-' }}{{ $sell->customer->name ??'-' }} {{ $sell->customer->phone ??'-' }} {{ $sell->customer->mailing_address ??'-' }}{{ $transaction->convert_money_format($aging_amount) }} {{ $transaction->convert_money_format($sell_total) }}
{{__('lang.total')}} {{ $currency_code }}{{ $transaction->convert_money_format($grand_total) }}{{ $transaction->convert_money_format(collect($grand_totals)->sum()) }}

@stop