RECOVERY PLAN

@foreach($loan_recovery_methods as $loan_recovery_method) @endforeach @foreach($loan_recovery_methods as $loan_recovery_method) @endforeach {{--*/ $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 /*--}} @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 {{--*/ $total_recovered = 0 /*--}} @foreach($loan_recovery_methods as $loan_recovery_method) {{--*/ $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 {{--*/ $total_cost_planned += $total_recovery /*--}} {{--*/ $total_cost_recovered += $total_recovered /*--}} @else @endif @endforeach @foreach($loan_recovery_methods as $loan_recovery_method) @endforeach @foreach($loan_recovery_methods as $loan_recovery_method) @endforeach
DESCRIPTIONS RECOVERY PLAN RECOVERIES TOTAL
NO# DRIVER NAME AMOUNT{{$loan_recovery_method->type}}{{$loan_recovery_method->type}} RECOVERY RECOVERED BALANCE
{{++$i}} {{$loading_order_item['driver']}}{{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)}}