2024-07-07 05:02:02 +00:00
|
|
|
<!-- $o=Service::class -->
|
2024-07-28 11:33:30 +00:00
|
|
|
<table class="table table-sm table-striped" id="svc_bill_hist">
|
2024-07-05 02:04:08 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>Invoice</th>
|
|
|
|
<th>Start</th>
|
|
|
|
<th>Stop</th>
|
|
|
|
<th>Service</th>
|
|
|
|
<th>Extras</th>
|
|
|
|
<th class="text-right">Total</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
|
|
|
@foreach($o->invoiced_items_active->groupBy('invoice_id') as $oo)
|
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url('u/invoice',($x=$oo->first())->invoice_id) }}">{{ $x->invoice_id }}</a></td>
|
|
|
|
<td>{{ ($y=$oo->where('item_type',0))->min('start_at')->format('Y-m-d') }}</td>
|
|
|
|
<td>{{ $y->max('stop_at')->format('Y-m-d') }}</td>
|
|
|
|
<th>{{ number_format($y->sum('total'),2) }}</th>
|
|
|
|
<th>{{ number_format($oo->where('item_type','<>',0)->sum('total'),2) }}</th>
|
|
|
|
<td class="text-right">{{ number_format($oo->sum('total'),2) }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
2024-07-28 11:33:30 +00:00
|
|
|
@pa(datatables,conditionalpaging)
|
2024-07-05 02:04:08 +00:00
|
|
|
|
2024-07-28 11:33:30 +00:00
|
|
|
@section('page-scripts')
|
2024-07-05 02:04:08 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
|
|
|
$('#svc_bill_hist').DataTable({
|
2024-07-28 11:33:30 +00:00
|
|
|
conditionalPaging: true,
|
2024-07-05 02:04:08 +00:00
|
|
|
language: {
|
|
|
|
emptyTable: "No Invoices"
|
|
|
|
},
|
|
|
|
order: [1,'desc'],
|
|
|
|
pageLength: 10
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|