44 lines
1.9 KiB
PHP
44 lines
1.9 KiB
PHP
|
<div class="box box-danger small">
|
||
|
<div class="box-header">
|
||
|
<h3 class="box-title">Invoices Due</h3>
|
||
|
<div class="box-tools pull-right">
|
||
|
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||
|
<i class="fa fa-minus"></i></button>
|
||
|
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||
|
<i class="fa fa-times"></i></button>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<div class="box-body">
|
||
|
@if ($user->invoices_due->count())
|
||
|
<table class="table table-bordered table-striped table-hover" id="table">
|
||
|
<tr>
|
||
|
<th>Invoice</th>
|
||
|
<th>Total</th>
|
||
|
<th>Due</th>
|
||
|
<th>Date</th>
|
||
|
</tr>
|
||
|
@foreach ($user->invoices_due as $o)
|
||
|
@php
|
||
|
$co = $o->currency();
|
||
|
@endphp
|
||
|
<tr>
|
||
|
<td>{{ $o->invoice_number }}</td>
|
||
|
<td class="right">{{ number_format($o->total,$co->rounding) }}</td>
|
||
|
<td class="right">{{ number_format($o->due,$co->rounding) }}</td>
|
||
|
<td>{{ $o->date_due }}</td>
|
||
|
</tr>
|
||
|
@endforeach
|
||
|
<tr>
|
||
|
<th>Count {{ $user->invoices_due->count() }}</th>
|
||
|
{{-- @todo Number format should configured by currency --}}
|
||
|
<th class="right">{{ number_format($user->invoices_due->sum('total'),2) }}</th>
|
||
|
<th class="right">{{ number_format($user->invoices_due->sum('due'),2) }}</th>
|
||
|
<th> </th>
|
||
|
</tr>
|
||
|
</table>
|
||
|
@else
|
||
|
<p>No invoices due</p>
|
||
|
@endif
|
||
|
</div>
|
||
|
</div>
|