@if(!empty($for_pdf)) @endif
{{$contact->business->name}}
P.O BOX 17671-00100
NAIROBI, KENYA
TEL: +254 777 215 570
|
{!! $contact->contact_address !!}
@if(!empty($contact->email)) |
| Amount Due | Amount Enc. |
|---|---|
| @format_currency($ledger_details['balance_due']) |
| @lang('lang_v1.date') | @lang('lang_v1.transaction') | @lang('sale.amount') | @lang('lang_v1.balance') |
|---|---|---|---|
| {{ \Carbon\Carbon::parse($data['date'])->format('d/m/y') }} | @if(!empty($data['transaction_type']) && $data['transaction_type'] == 'ledger_discount') Credit Note @endif INV #{{$data['ref_no']}} {{-- Only show due/orig amount if not ledger_discount --}} @if(!empty($data['due_date']) && $data['payment_status'] != 'paid' && $data['transaction_type'] != 'ledger_discount') @lang('lang_v1.due') {{@format_date($data['due_date'])}}. Orig. Amount @format_currency($data['final_total']) @endif | @format_currency($data['final_total']) | @php // Default display_due $display_due = $data['total_due']; // If ledger_discount, always show 0 if (!empty($data['transaction_type']) && $data['transaction_type'] == 'ledger_discount') { $display_due = 0; } // Format negative values as 0 if ($display_due < 0) { $display_due = 0; } // Format number with commas and 2 decimal places $formatted_due = number_format($display_due, 2, '.', ','); // Get currency symbol from business settings if available $currency_symbol = !empty($contact->business->currency_symbol) ? $contact->business->currency_symbol : 'KSh'; @endphp {{ $currency_symbol }} {{ $formatted_due }} |