{{date('d/m/Y',strtotime($dd))}} |
{{-- For Deposit --}}
@foreach ($sub_category as $sub_cat)
@php
$deposit_data = $deposit_fs->where('date',$dd)->where('sub_category_id',$sub_cat->id)->first();
if (!empty($deposit_data)) {
$total += $deposit_data->amount;
if ($deposit_data->bank_statement != null) {
$bank_amount += $deposit_data->bank_statement->amount;
}
}
@endphp
{{$deposit_data->amount ?? ''}}
@if ($deposit_data != null)
@if ($deposit_data->bank_statement != null)
Credit : {{$deposit_data->bank_statement->amount}}
@endif
@endif
|
@endforeach
{{-- Deposit Balance --}}
{{number_format($bank_amount - $total,2)}} |
{{-- Cheque --}}
@php
$cheque1_total = 0;
@endphp
@foreach ($cheque_sub_category as $fnb_cheque)
@php
$data = $deposit_fs->where('date',$dd)->where('sub_category_id',$fnb_cheque->id);
$cheque1_total += $data->sum('amount');
$fnb_bank += $data->sum('bank_statement.amount');
@endphp
@endforeach
{{number_format($cheque1_total,2)}}
@if ($fnb_bank != 0)
Credit : {{number_format($fnb_bank,2)}}
@endif
|
@php
$cheque2_total = 0;
@endphp
@foreach ($non_cheque_sub_category as $non_fnb_cheque)
@php
$cheque2_data = $deposit_fs->where('date',$dd)->where('sub_category_id',$non_fnb_cheque->id);
$cheque2_total += $cheque2_data->sum('amount');
$non_fnb_bank += $cheque2_data->sum('bank_statement.amount');
@endphp
@endforeach
{{number_format($cheque2_total,2)}}
@if ($non_fnb_bank != 0)
Credit : {{number_format($non_fnb_bank,2)}}
@endif
|
{{number_format($cheque1_total + $cheque2_total,2)}}
|
{{-- For EFT --}}
@if ($eft_sub_category != null)
@foreach ($eft_sub_category as $eft)
@php
$eft_data = $deposit_fs->where('date',$dd)->where('sub_category_id',$eft->id)->first();
if (!empty($eft_data)) {
$eft_total += $eft_data->amount;
if ($eft_data->bank_statement != null) {
$eft_bank += $eft_data->bank_statement->amount;
}
}
@endphp
{{$eft_data->amount ?? ''}}
@if ($eft_data != null)
@if ($eft_data->bank_statement != null)
Credit : {{$eft_data->bank_statement->amount}}
@endif
@endif
|
@endforeach
{{-- EFT Balance --}}
{{number_format($eft_bank - $eft_total,2)}} |
@endif
{{-- Speed Point --}}
@foreach ($machine as $id => $m)
@php
$speed_point_total = $speed_point->where('date',$dd)->where('type',$m)->sum('amount');
$speed_point_all += $speed_point_total;
@endphp
@if ($speed_point_total != 0)
{{number_format($speed_point_total,2)}}
@endif
|
@endforeach
@if ($rand_sub_category != null)
@foreach ($rand_sub_category as $rand)
@php
$rand_data = $deposit_fs->where('date',$dd)->where('sub_category_id',$rand->id)->first();
if (!empty($rand_data)) {
$total_rand += $rand_data->amount;
}
@endphp
@endforeach
@if ($total_rand != 0)
{{number_format($total_rand,2)}}
@endif
@endif
|
@endforeach