Adding billing history - still WIP
This commit is contained in:
parent
f9ce4a6978
commit
87a4b946ee
@ -88,6 +88,9 @@
|
||||
Email.
|
||||
</div>
|
||||
@can('wholesaler')
|
||||
<div class="tab-pane fade" id="billing" role="tabpanel">
|
||||
@include('service.widget.billinghistory',['o'=>$o])
|
||||
</div>
|
||||
<div class="tab-pane fade" id="internal" role="tabpanel">
|
||||
@if(($x=$o->changes()->where('service__change.active',TRUE)->where('complete',FALSE)->get()->pop()))
|
||||
@include('service.widget.internal',['o'=>$o,'p'=>$x])
|
||||
|
@ -0,0 +1,51 @@
|
||||
<table class="table table-sm" id="svc_bill_hist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Invoice</th>
|
||||
<th>Due</th>
|
||||
{{--
|
||||
<th>Start</th>
|
||||
<th>Stop</th>
|
||||
--}}
|
||||
<th class="text-right">Total</th>
|
||||
<th class="text-right">Balance</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach($o->account->invoiceSummary($o->invoices->pluck('id')) as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('u/invoice',$oo->id) }}">{{ $oo->id }}</a></td>
|
||||
<td>{{ $oo->due_at->format('Y-m-d') }}</td>
|
||||
{{--
|
||||
<td>{{ $oo->_start_at->format('Y-m-d') }}</td>
|
||||
<td>{{ $oo->_stop_at->format('Y-m-d') }}</td>
|
||||
--}}
|
||||
<td class="text-right">{{ number_format($oo->_xtotal,2) }}</td>
|
||||
<th class="text-right">{{ number_format($oo->_xbalance,2) }}</th>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
||||
{{--
|
||||
@dump($oo->getAttributes())
|
||||
@dump($o->invoices()->get())
|
||||
--}}
|
||||
</table>
|
||||
|
||||
@section('page-scripts')
|
||||
@css(datatables,bootstrap4)
|
||||
@js(datatables,bootstrap4)
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#svc_bill_hist').DataTable({
|
||||
language: {
|
||||
emptyTable: "No Invoices"
|
||||
},
|
||||
order: [1,'desc'],
|
||||
pageLength: 10
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
Loading…
Reference in New Issue
Block a user