2024-07-25 04:44:09 +00:00
|
|
|
<!-- $o=Account::class -->
|
2024-07-28 11:33:30 +00:00
|
|
|
@php($o->load(['services_active.invoiced_service_items_active_recent']))
|
2024-07-09 10:17:30 +00:00
|
|
|
|
2021-06-29 06:36:34 +00:00
|
|
|
<!-- Show active services -->
|
2023-05-09 08:08:31 +00:00
|
|
|
<div class="card card-light">
|
2024-07-28 11:33:30 +00:00
|
|
|
<div class="card-header p-2">
|
2021-06-29 06:36:34 +00:00
|
|
|
<h3 class="card-title">Active Services</h3>
|
|
|
|
</div>
|
|
|
|
|
2024-07-28 11:33:30 +00:00
|
|
|
<div class="card-body p-2">
|
2024-07-25 04:44:09 +00:00
|
|
|
@if(($x=$o->services_active)->count())
|
2024-07-28 11:33:30 +00:00
|
|
|
<table class="table table-sm table-striped table-hover" id="services_active_{{ $ao->id }}">
|
2021-06-29 06:36:34 +00:00
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
2022-06-12 01:21:20 +00:00
|
|
|
<th>Category</th>
|
2021-06-29 06:36:34 +00:00
|
|
|
<th>Service</th>
|
|
|
|
<th>Product</th>
|
|
|
|
<th>Next Invoice</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
|
|
|
|
<tbody>
|
2023-05-09 10:28:51 +00:00
|
|
|
@foreach ($x as $so)
|
2024-07-05 06:38:31 +00:00
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url('u/service',[$so->id]) }}">{{ $so->sid }}</a></td>
|
|
|
|
<td>{{ $so->product->category_name }}</td>
|
|
|
|
<td>{{ $so->name_short }}</td>
|
|
|
|
<td>{{ $so->product->name }}</td>
|
|
|
|
<td>{{ $so->external_billing ? '-' : $so->invoice_next->format('Y-m-d') }}</td>
|
|
|
|
</tr>
|
2021-06-29 06:36:34 +00:00
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
2023-05-09 10:28:51 +00:00
|
|
|
<th>Count {{ $x->count() }}</th>
|
2021-06-29 06:36:34 +00:00
|
|
|
<th colspan="4"> </th>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
@else
|
|
|
|
<p>No services active</p>
|
|
|
|
@endif
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-07-28 11:33:30 +00:00
|
|
|
@pa(datatables,rowgroup|conditionalpaging)
|
2021-06-29 06:36:34 +00:00
|
|
|
|
2024-07-28 11:33:30 +00:00
|
|
|
@section('page-scripts')
|
2021-06-29 06:36:34 +00:00
|
|
|
<script type="text/javascript">
|
|
|
|
$(document).ready(function() {
|
2024-07-28 11:33:30 +00:00
|
|
|
@if($x->count())
|
|
|
|
$('#services_active_{{ $ao->id }}').DataTable({
|
|
|
|
conditionalPaging: true,
|
|
|
|
order: [[1,'asc'],[2,'asc']],
|
|
|
|
rowGroup: {
|
|
|
|
dataSrc: 1,
|
|
|
|
endRender: function (rows,group) {
|
|
|
|
return rows.count()+' x '+group;
|
|
|
|
},
|
2023-05-09 08:08:31 +00:00
|
|
|
},
|
2024-07-28 11:33:30 +00:00
|
|
|
columnDefs: [
|
|
|
|
{
|
|
|
|
targets: [1],
|
|
|
|
visible: false,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
});
|
|
|
|
@endif
|
2021-06-29 06:36:34 +00:00
|
|
|
});
|
|
|
|
</script>
|
|
|
|
@append
|