Initial refactoring work
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
<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>
|
@@ -0,0 +1,37 @@
|
||||
<div class="box box-danger small">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Payment History</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->payment_history->count())
|
||||
<table class="table table-bordered table-striped table-hover" id="table">
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Amount</th>
|
||||
</tr>
|
||||
@php
|
||||
$c=0;
|
||||
@endphp
|
||||
@foreach ($user->payment_history as $o)
|
||||
@if(! isset($limit) OR $c++ > $limit)
|
||||
@break;
|
||||
@endif
|
||||
<tr>
|
||||
<td>{{ $o->payment_date }}</td>
|
||||
{{-- @todo Number format should configured by currency --}}
|
||||
<td class="right">{{ number_format($o->total_amt,2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
@else
|
||||
<p>No payments recorded</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
@@ -0,0 +1,45 @@
|
||||
<div class="box box-success small">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Services</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->services_active->count())
|
||||
<table class="table table-bordered table-striped table-hover" id="table">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Service</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Next Invoice</th>
|
||||
</tr>
|
||||
@foreach ($user->services_active as $o)
|
||||
<tr>
|
||||
<td>{{ $o->category }}</td>
|
||||
<td>{{ $o->service_number }}</td>
|
||||
<td>{{ $o->service_name }}</td>
|
||||
<td><span class="label
|
||||
@switch($o->active)
|
||||
@case(1) label-success">Active @break
|
||||
@default label-warning">Unknown
|
||||
@endswitch
|
||||
</span></td>
|
||||
<td>{{ $o->next_invoice }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<th>Count {{ $user->services_active->count() }}</th>
|
||||
<th colspan="4"> </th>
|
||||
</tr>
|
||||
</table>
|
||||
@else
|
||||
<p>No services active</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
Reference in New Issue
Block a user