@php $i=1;@endphp @foreach($data as $result) @if($result->Roll == 1) @php $PaidAmount = 0; @endphp @else @php $PaidAmount = $result->PaidAmount; @endphp @endif @php $i++;@endphp @endforeach
Sr.No Bill No Sale Date Patient Name Subtotal Advance Paid Payment Mode
{{$i}} {{$result->BillNo}} {{date("d/m/Y", strtotime(str_replace('-', '/',$result->SaleDate)))}} {{$result->PatientName}} ₹{{$result->SubTotal}} ₹{{$result->Advance}} ₹{{$PaidAmount}} {{$result->PayMode}}