2023-05-09 10:28:51 +00:00
|
|
|
<!-- $o = Account::class -->
|
2021-06-29 06:36:34 +00:00
|
|
|
<!-- Show outstanding invoices -->
|
2024-07-05 06:38:31 +00:00
|
|
|
<table class="table table-bordered w-100" id="invoices_due_{{ $o->id }}">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Account</th>
|
|
|
|
<th>#</th>
|
|
|
|
<th>Due</th>
|
|
|
|
<th class="text-right">Total</th>
|
|
|
|
<th class="text-right">Outstanding</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2021-06-29 06:36:34 +00:00
|
|
|
|
2024-07-05 06:38:31 +00:00
|
|
|
<tbody>
|
|
|
|
@foreach ($list as $oo)
|
|
|
|
<tr @if ($oo->due_at->isPast()) class="table-danger" @endif>
|
|
|
|
<td>{{ $oo->account->name }}</td>
|
|
|
|
<td><a href="{{ url('u/invoice',$oo->id) }}">{{ $oo->lid }}</a></td>
|
|
|
|
<td>{{ $oo->due_at->format('Y-m-d') }}</td>
|
|
|
|
<td class="text-right">${{ number_format($oo->_total,2) }}</td>
|
|
|
|
<td class="text-right">${{ number_format($oo->_balance,2) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2021-06-29 06:36:34 +00:00
|
|
|
|
2024-07-05 06:38:31 +00:00
|
|
|
@section('page-styles')
|
|
|
|
@css(datatables,bootstrap4|rowgroup)
|
|
|
|
@append
|
2021-06-29 06:36:34 +00:00
|
|
|
|
|
|
|
@section('page-scripts')
|
2021-12-20 03:08:00 +00:00
|
|
|
@js(datatables,bootstrap4|rowgroup)
|
2021-06-29 06:36:34 +00:00
|
|
|
|
|
|
|
<script type="text/javascript">
|
2024-07-05 06:38:31 +00:00
|
|
|
@if ($list->count())
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#invoices_due_{{ $o->id }}').DataTable({
|
|
|
|
// If we have more than 1 account id, order by account
|
|
|
|
order: [[0,'asc'],[2,'asc'],[1,'desc']],
|
|
|
|
rowGroup: {
|
|
|
|
dataSrc: 0,
|
|
|
|
},
|
|
|
|
columnDefs: [
|
|
|
|
{
|
|
|
|
targets: [0],
|
|
|
|
visible: false,
|
|
|
|
}
|
|
|
|
],
|
2021-06-29 06:36:34 +00:00
|
|
|
});
|
2024-07-05 06:38:31 +00:00
|
|
|
});
|
2023-05-09 10:28:51 +00:00
|
|
|
@endif
|
2021-06-29 06:36:34 +00:00
|
|
|
</script>
|
|
|
|
@append
|