@if(($x=$o->invoices()->where('active',TRUE)->orderBy('due_date')->with(['items.taxes','paymentitems.payment','account'])->get()->where('due','>',0))->count()) @foreach ($x as $io) @endforeach
ID Date Issue Date Due Total Due Apply
{{ $io->sid }} {{ $io->invoice_date->format('Y-m-d') }} {{ $io->due_date->format('Y-m-d') }} {{ number_format($io->total,2) }} {{ number_format($io->due,2) }}
@else

No invoices due.

@endif