@php $editPermission = user()->permission('edit_vendor_payment'); $deletePermission = user()->permission('delete_vendor_payment'); @endphp

{{$vendorPayment->vendor->primary_name }}

@if ($editPermission == 'all' || ($editPermission == 'added' && $vendorPayment->added_by == user()->id) || ($deletePermission == 'all' || ($deletePermission == 'added' && $vendorPayment->added_by == user()->id))) @endif
@php $bankName = isset($vendorPayment->bank_account_id) && $vendorPayment->bankAccount->bank_name ? $vendorPayment->bankAccount->bank_name.' |' : ''; $currencyId = (isset($vendorPayment->vendor->currency)) ? $vendorPayment->vendor->currency->id : ''; @endphp

@lang('app.addedBy')

@lang('purchase::modules.vendor.billDetails')

@lang('app.date') @lang('app.bill') @lang('purchase::app.menu.purchaseOrder') @lang('purchase::modules.vendorPayment.billAmount') @lang('purchase::modules.vendorPayment.amountDue') @lang('app.payment') @forelse ($bills as $bill) {{ $bill->bill->bill_date }} {{ $bill->bill->id }} {{ $bill->bill->order->purchase_order_number }} {{ currency_format($bill->bill->total, $currencyId) }} @php $due = ($bill->bill->total) - ($billArray[$bill->id]); @endphp {{currency_format(($due),$currencyId)}} {{currency_format($bill->total_paid, $currencyId)}} @empty @endforelse