Pick one Package
@foreach($dealer_openfile_package as $dop) @php $paid_amount= $dop->dealerPackagePaymentReceipt->where('dealerpackage_id',$dop->id)->where('is_approved',1)->sum('amount'); $remaining= $dop->package->total_price - $paid_amount; @endphp @if( $remaining > 0) @if(old('dealerpackage_id') == $dop->id) @else @endif @endif @endforeach
Package No. Project Package Name. Net Amount of Package Received Amount Remaining Amount Issue Date
{{ $dop->multiProject?$dop->multiProject->name:'None'}} {{ $dop->package->name}} {{number_format($dop->package->total_price)}} PKR {{number_format($paid_amount)}} PKR {{$remaining}} PKR {{ date('d-m-Y', strtotime($dop->issue_date)) }}