@extends('layouts.pdf') @section('title') {{__('lang.sale_aging_report')}} @endsection @section('content')
@include('admin.partials.header', ['extra' => $extra]) @php $total_unit = 0; @endphp @foreach($product_count as $count) @php if($count->status == "SOLD"){ $colour = "#dc3545"; }elseif($count->status == "AVAILABLE"){ $colour = "#28a745"; }elseif($count->status == "HOLD"){ $colour = "#ffc107"; } @endphp @php $total_unit += $count->total_inventory; @endphp @endforeach
{{__('lang.product_summary')}}
{{ $count->status }} {{ $count->total_inventory }}
{{__('lang.total')}} {{ $total_unit }}
@foreach($td_head as $key => $td) @endforeach @php if(isset($schedule1[0])){ $my_schedule = $schedule1; }else{ $my_schedule = $schedules; } $payable_count= []; $count= 1; @endphp @foreach($my_schedule as $key_sch => $schedule) @if(isset($schedule)) @foreach($td_head as $key => $td) @php $check_array = []; @endphp @foreach($schedule as $key_sch_sub => $value) @php $month_year = $value->month.'-'.$value->year; @endphp @if($td == $month_year) @php array_push($check_array,$month_year); @endphp @if(isset($schedule1[$key_sch][$key_sch_sub])) @if($value->schedule_id != $schedules[$key_sch][$key_sch_sub]->schedule_id) @php $payable_count[$month_year] += $schedule[$key_sch_sub]->payable_amount; @endphp @else @endif @else @php $payable_count[$month_year] += $schedule[$key_sch_sub]->payable_amount; @endphp @endif @else @php continue; @endphp @endif @endforeach @if (count($check_array) === 0) @endif @endforeach @else @endif @php ++$count; @endphp @endforeach @foreach($td_head as $key => $td) @endforeach
{{__('lang.serial_no')}} {{__('lang.unit_no')}} {{__('lang.customer')}} {{__('lang.booking_date')}}{{ $td }}
{{ $count }} {{ $sells[$key_sch]->product_name }} {{ $sells[$key_sch]->customer_name }} {{ $transaction->date_format($sells[$key_sch]->booking_date) }}{{ number_format($value->payable_amount) }}0{{ number_format($value->payable_amount) }}00
{{__('lang.total')}}{{ number_format($payable_count[$td]) }}
@stop