{{ $loop->iteration }} |
CID:
{{ $row->id }}
|
{{ $row->userid ?? '' }} |
{{ $row->clientsinfo->clients_name ?? '' }} |
{{ $row->pop->popname ?? '' }} |
@php
$bill = 0;
@endphp
@foreach ($row->generatedBill as $item)
@if ($item->created_at >= $from && $item->created_at <= $to)
@php
$bill += $item->bill_amount ?? 0;
@endphp
@endif
@endforeach
{{ number_format((float) $bill, 2, '.', '') }}
|
@php
$payment = 0;
@endphp
@foreach ($row->paymentBill as $item)
@if ($item->created_at >= $from && $item->created_at <= $to)
@php
$payment += $item->paid_amount ?? 0;
@endphp
@endif
@endforeach
{{ number_format((float) $payment, 2, '.', '') }}
|
@php
$discount = 0;
@endphp
@foreach ($row->paymentBill as $item)
@if ($item->created_at >= $from && $item->created_at <= $to)
@php
$discount += $item->discount_amount ?? 0;
@endphp
@endif
@endforeach
{{ number_format((float) $discount, 2, '.', '') }}
|
@php
$totalBill += $bill;
$totalPayment += $payment;
$totalDiscount += $discount;
@endphp
@endif
@endforeach
@if ($type != 'Zero Payment')
Total |
{{ number_format((float) $totalBill, 2, '.', '') }}
|
{{ number_format((float) $totalPayment, 2, '.', '') }}
|
{{ number_format((float) $totalDiscount, 2, '.', '') }}
|
@endif