@if($invoice->payments->where('type', '!=', 1)->count())
@php $is_foreign_currency_invoice = $invoice->isForeignCurrency(); @endphp @foreach ($invoice->payments->where('type', '!=', 1) as $payment) @endforeach
Payment Details Date Transaction ID Gross Amount VAT Amount Net Amount (Included VAT)
{{ runtimePaymentIdFormat($payment->id) }} {{ formatDateTime($payment->payment_date) }} {{ $payment->transaction_id}} @cMoney($payment->totalExcludingVatPaidAmount(true), null, true) @if($is_foreign_currency_invoice)
@cMoney($payment->totalExcludingVatPaidAmount(), $invoice->currency, true)
@endif
@cMoney($payment->totalVatPaidAmount(true), null, true) @if($is_foreign_currency_invoice)
@cMoney($payment->totalVatPaidAmount(), $invoice->currency, true)
@endif
@cMoney($payment->amount, null, true) @if($is_foreign_currency_invoice)
@cMoney($payment->amount / $payment->conversion_rate, $invoice->currency, true)
@endif @can('update payment') @endcan @can('delete payment') @endcan
@php $invoice->setIsBaseCurrency(true); $invoice_base_gross_paid_amount = $invoice->grossPaidAmount('base', 'invoice-payment'); $invoice_base_vat_paid_amount = $invoice->totalVatPaidAmount(); $invoice_base_total_paid_amount = $invoice->totalPaidAmount('base', 'invoice-payment'); $invoice->setIsBaseCurrency(false); @endphp
{{tafqeetMoney($invoice_base_gross_paid_amount)}}
{{spellNumber($invoice_base_gross_paid_amount, 'en', 'SAR', 'halala')}}
Excluding VAT Paid Amount: @cMoney($invoice_base_gross_paid_amount, null, true) @if($is_foreign_currency_invoice)
@cMoney($invoice->grossPaidAmount('foriegn', 'invoice-payment') ?? 0, $invoice->currency, true)
@endif
{{tafqeetMoney($invoice_base_vat_paid_amount)}}
{{spellNumber($invoice_base_vat_paid_amount, 'en', 'SAR', 'halala')}}
VAT Paid Amount: @cMoney($invoice_base_vat_paid_amount, null, true) @if($is_foreign_currency_invoice)
@cMoney($invoice->totalVatPaidAmount() ?? 0, $invoice->currency, true)
@endif
{{tafqeetMoney($invoice_base_total_paid_amount)}}
{{spellNumber($invoice_base_total_paid_amount, 'en', 'SAR', 'halala')}}
Total Paid Amount: @cMoney($invoice_base_total_paid_amount, null, true) @if($is_foreign_currency_invoice)
@cMoney($invoice->totalPaidAmount('foreign', 'invoice-payment'), $invoice->currency, true)
@endif
{{-- {{tafqeetMoney($invoice_payable_amount = $invoice->payableAmount())}} --}} Remaining Payable Amount: {{ cMoney($invoice_payable_amount ?? 0, $invoice->currency, true) }}
@endif