@php $i=1;@endphp @foreach($data as $result) @php $PaidAmount = 0; @endphp @php $i++;@endphp @endforeach @php $i2=$i;@endphp @foreach($data2 as $result2) @php $PaidAmount2 = $result2->PaidAmount; @endphp @php $i2++;@endphp @endforeach
# Bill No Sale Date Patient Name Total Bill Amount Received Amount
{{$i}} {{$result->BillNo}} {{date("d/m/Y", strtotime(str_replace('-', '/',$result->SaleDate)))}} {{$result->PatientName}} ₹{{number_format($result->SubTotal,2)}} ₹{{number_format($result->Advance,2)}}
{{$i}} Total Sale Bill Receipt ₹{{number_format($TotalSaleBill,2)}}
{{$i2}} {{$result2->BillNo}} {{date("d/m/Y", strtotime(str_replace('-', '/',$result2->SaleDate)))}} {{$result2->PatientName}} ₹{{number_format($result2->SubTotal,2)}} ₹{{number_format($PaidAmount2,2)}}
{{$i2}} Total Receipt Bill ₹{{number_format($TotalReceiptBill,2)}}
{{$i2+1}} Total Sale Bill Amount ₹{{number_format($TotalSaleBill,2)}}
{{$i2+2}} Total Amount Received ₹{{number_format($Total,2)}}