@if(count($schedule->invoices) > 0)
@lang('sale.invoice_no') | @lang('messages.date') | @lang('sale.total_amount') | @lang('sale.total_paid') | @lang('sale.total_remaining') |
---|---|---|---|---|
{{$schedule_invoice->invoice_no}} | {{@format_datetime($schedule_invoice->transaction_date)}} | @format_currency($schedule_invoice->final_total) | @php $paid = 0; foreach($schedule_invoice->payment_lines as $payment_line) { if ($payment_line->is_return) { $paid -= $payment_line->amount; } else { $paid += $payment_line->amount; } } @endphp @format_currency($paid) | @php $pending = $schedule_invoice->final_total - $paid; @endphp @format_currency($pending) |