Aged Receivables
{{ucfirst($business_name)}}
{{ucfirst($show_by)}} Balance as on {{date("d M Y",strtotime($date))}}
@php $total_30_days = 0; $total_60_days = 0; $total_90_days = 0; $total_older_days = 0; $total_current = 0; $total_current_sum = 0; $percentage_30_days = 0; $percentage_60_days = 0; $percentage_90_days = 0; $percentage_older = 0; @endphp @foreach($aged_receivables_data as $key => $receivables_data) @php $age_by_day_30 = ($receivables_data->age_by_day_30) ? $receivables_data->age_by_day_30 : '0'; $age_by_day_60 = ($receivables_data->age_by_day_60) ? $receivables_data->age_by_day_60 : '0'; $age_by_day_90 = ($receivables_data->age_by_day_90) ? $receivables_data->age_by_day_90 : '0'; $age_by_before_90 = ($receivables_data->age_by_before_90) ? $receivables_data->age_by_before_90 : '0'; @endphp @php($total_30_days += $age_by_day_30) @php($total_60_days += $age_by_day_60) @php($total_90_days += $age_by_day_90) @php($total_older_days += $age_by_before_90) @php($total_current = ($receivables_data->current_total) ? $receivables_data->current_total : '0') @php($total_current_sum += $total_current ) @endforeach @php($percentage_30_days = !empty($total_30_days) ?($total_30_days / $total_current_sum)*100 :0) @php($percentage_60_days = !empty($total_60_days) ?($total_60_days / $total_current_sum)*100 :0) @php($percentage_90_days = !empty($total_90_days) ?($total_90_days / $total_current_sum)*100 :0) @php($percentage_older = !empty($total_older_days) ?($total_older_days / $total_current_sum)*100 :0)
Receivables 30 Days 60 Days 90 Days Older Current
@if(isset($receivables_data->invoice_no)) {{$receivables_data->invoice_no}} @else {{$receivables_data->display_name}} @endif {{!empty(number_format($age_by_day_30,4))? number_format($age_by_day_30,$decimal_point): number_format(0,$decimal_point)}} {{!empty(number_format($age_by_day_60,4))? number_format($age_by_day_60,$decimal_point): number_format(0,$decimal_point)}} {{!empty(number_format($age_by_day_90,4))?number_format($age_by_day_90,$decimal_point) : number_format(0,$decimal_point) }} {{!empty(number_format($age_by_before_90,4))? number_format($age_by_before_90,$decimal_point): number_format(0,$decimal_point)}} {{!empty( number_format($total_current,4))? number_format($total_current,$decimal_point): number_format(0,$decimal_point)}}
Total {{!empty($total_30_days) ? number_format($total_30_days,$decimal_point) : number_format(0,$decimal_point)}} {{!empty($total_60_days) ? number_format($total_60_days,$decimal_point) : number_format(0,$decimal_point)}} {{!empty($total_90_days) ? number_format($total_90_days,$decimal_point) : number_format(0,$decimal_point)}} {{!empty($total_older_days)? number_format($total_older_days,$decimal_point) : number_format(0,$decimal_point)}} {{!empty($total_current_sum) ? number_format($total_current_sum,$decimal_point) : number_format(0,$decimal_point)}}
  {{!empty($percentage_30_days)?number_format($percentage_30_days,$decimal_point): number_format(0,$decimal_point)}}% {{!empty($percentage_60_days)?number_format($percentage_60_days,$decimal_point): number_format(0,$decimal_point)}} % {{!empty($percentage_90_days)?number_format($percentage_90_days,$decimal_point): number_format(0,$decimal_point)}} % {{!empty($percentage_older)?number_format($percentage_older,$decimal_point): number_format(0,$decimal_point)}} %