@if(count($invoices_using_deduction) > 0)

Invoices Using This Down Payment For Deduction

@php $is_foreign_currency_invoice = $invoice->isForeignCurrency(); @endphp @foreach ($invoices_using_deduction as $invoiceUD) {{-- invoice number --}} {{-- deducted amount --}} {{-- invoice total --}} {{-- due date --}} {{-- status --}} @endforeach
Invoice Deducted Amount Invoice Total Due Date Status
{{ $invoiceUD->invoice_number }} @cMoney($invoiceUD->totalDeductedAmount($invoice->id), $invoiceUD->currency, true) @cMoney($invoiceUD->total, $invoiceUD->currency, true) {{ formatDateTime($invoiceUD->due_date) }}{{ $invoiceUD->status }}
{{-- deducted amount --}} @php $deductable_remaining_amount = $invoice->getDownpaymentAmountRemainingAttribute(); @endphp {{-- deductable remaining amount --}}
{{tafqeetMoney($invoice->total)}}
{{spellNumber($invoice->total, 'en', $invoice->currency, 'halala')}}
Total Deductable Amount: @cMoney($invoice->total, $invoice->currency, true)
{{tafqeetMoney($total_deducted = $invoice->total - $deductable_remaining_amount)}}
{{spellNumber($total_deducted, 'en', $invoice->currency, 'halala')}}
Total Deducted Amount: @cMoney($total_deducted, $invoice->currency, true)
{{tafqeetMoney($deductable_remaining_amount)}}
{{spellNumber($deductable_remaining_amount, 'en', $invoice->currency, 'halala')}}
Deductable Remaining Amount: @cMoney($deductable_remaining_amount, $invoice->currency, true)
@endif