{{--

BATCH RECOVERY FROM {{ $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') @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 = 0 /* --}} @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @foreach ($loan_recovery_methods as $loan_recovery_method) {{-- */ $total_recovery += (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) {{-- */ $total_recovery += (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 /* --}} {{-- */ $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_planned += $total_recovery /* --}} {{-- */ $total_cost_recovered += $total_recovered /* --}} @if ($report_type == 'RECOVERY_PLAN' || $report_type == 'ALL') @endif @if ($report_type == 'RECOVERIES' || $report_type == 'ALL') @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') @endif
DESCRIPTIONSRECOVERY PLANRECOVERIESTOTAL
CK NO# DRIVER NAME DATE AMOUNT{{ $loan_recovery_method->type }}{{ $loan_recovery_method->type }} RECOVERY 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) }}{{ number_format($total_recovered) }} {{ number_format($total_recovery - $total_recovered) }}
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($total_cost_planned - $total_cost_recovered) }}
@else
No Data Found!
@endif