RECOVERY PLAN {{ $start_date }} TO {{ $end_date }}

@if ($loading_order_items) @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @endif @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) @endforeach @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) @endforeach @endif @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @if($report_type != 'ALL') @endif @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @endif {{-- */ $total_cost_planned = 0 /* --}} {{-- */ $total_cost_recovered = 0 /* --}} {{-- */ $i = 0 /* --}} @foreach ($loading_order_items as $loading_order_item) @if (isset($loading_order_item['loss_amount'])) {{-- */ $total_recovery = $loading_order_item['loss_amount'] /* --}} {{-- */ $total_recovery_planned = 0 /* --}} @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) {{-- */ $total_recovery_planned += (isset($loading_order_item['recovery_plans'][$loan_recovery_method->type])) ? $loading_order_item['recovery_plans'][$loan_recovery_method->type] : 0 /* --}} {{-- */ $total_recovery_array[$loan_recovery_method->type][] = (isset($loading_order_item['recovery_plans'][$loan_recovery_method->type])) ? $loading_order_item['recovery_plans'][$loan_recovery_method->type] : 0 /* --}} @endforeach @endif {{-- */ $total_recovered = 0 /* --}} @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) @if($report_type != 'ALL') {{-- */ $total_recovery_planned += (isset($loading_order_item['recovery_plans'][$loan_recovery_method->type])) ? $loading_order_item['recovery_plans'][$loan_recovery_method->type] : 0 /* --}} {{-- */ $total_recovery_array[$loan_recovery_method->type][] = (isset($loading_order_item['recovery_plans'][$loan_recovery_method->type])) ? $loading_order_item['recovery_plans'][$loan_recovery_method->type] : 0 /* --}} @endif {{-- */ $total_recovered += (isset($loading_order_item['recoveries'][$loan_recovery_method->type])) ? $loading_order_item['recoveries'][$loan_recovery_method->type] : 0 /* --}} {{-- */ $total_recovered_array[$loan_recovery_method->type][] = (isset($loading_order_item['recoveries'][$loan_recovery_method->type])) ? $loading_order_item['recoveries'][$loan_recovery_method->type] : 0 /* --}} @endforeach @endif {{-- */ $total_cost_recovered += $total_recovered /* --}} {{-- */ $total_cost_planned += $total_recovery_planned /* --}} @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @if($report_type != 'ALL') @endif @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') {{-- */ $balance = $total_recovery - $total_recovered /* --}} $total_recovery - $total_recovered @if($report_type == 'RECOVERIES') @endif @endif @else @endif @endforeach @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) @endforeach @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) @endforeach @endif @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') {{-- */ $balance = $total_cost_planned - $total_cost_recovered /* --}} @if($report_type == 'RECOVERIES') @endif @endif
DESCRIPTIONSRECOVERY PLANRECOVERIESTOTAL
NO# DRIVER NAME DATE AMOUNT{{ $loan_recovery_method->type }}{{ $loan_recovery_method->type }} PLANNED UNPLANNED RECOVERED BALANCE %
{{ ++$i }} {{ $loading_order_item['driver'] }} {{ $loading_order_item['loading_date'] }}{{ number_format($loading_order_item['loss_amount']) }} {{ isset($loading_order_item['recovery_plans'][$loan_recovery_method->type]) ? number_format($loading_order_item['recovery_plans'][$loan_recovery_method->type]) : 0 }} {{ isset($loading_order_item['recoveries'][$loan_recovery_method->type]) ? number_format($loading_order_item['recoveries'][$loan_recovery_method->type]) : 0 }} {{ number_format($total_recovery_planned) }}{{ number_format($total_recovery-$total_recovery_planned) }}{{ number_format($total_recovered) }} {{ number_format($balance) }} {{ number_format(($total_recovered/$total_recovery)*100) }}
TOTAL {{ number_format(array_sum($total_recovery_array[$loan_recovery_method->type])) }} {{ number_format(array_sum($total_recovered_array[$loan_recovery_method->type])) }} {{ number_format($total_cost_planned) }}{{ number_format($total_cost_recovered) }} {{ number_format($balance) }}{{ number_format(($total_cost_recovered/$total_cost_planned)*100) }}
@else
No Data Found!
@endif