@php($calculate_credit = $booking->agreed_amount) @php($debit =$booking->agreed_amount) @php($credit = 0) @foreach($payment as $rows) @if($rows->status == "Approve" || $rows->status == "Unpprove") @php($calculate_credit = $calculate_credit - ($rows->amount)) @php($credit = $credit + ($rows->amount)) @elseif($rows->status == "Reversal") @php($calculate_credit = $calculate_credit + ($rows->amount)) @php($debit = $debit + ($rows->amount)) @else @endif @endforeach
Payment History
Sr. Description Debit Credit Balance Status Date
1 Opening Balance {{EF::numberFormat($booking->agreed_amount)}} {{EF::numberFormat(0)}} {{EF::numberFormat($booking->agreed_amount)}}
{{($loop->iteration)+(1)}} {{$rows->description}}{{EF::numberFormat(0)}} {{EF::numberFormat($rows->amount)}}{{EF::numberFormat($rows->amount)}} {{EF::numberFormat(0)}} {{EF::numberFormat($calculate_credit)}} {{$rows->status}} {{EF::dateFormat($rows->created_at)}}
Total {{EF::numberFormat($debit)}} {{EF::numberFormat($credit)}} Balance : {{EF::numberFormat($debit-$credit)}}