2024-07-29 13:12:53 +00:00
|
|
|
@use(App\Models\Service)
|
|
|
|
|
2020-02-18 11:35:20 +00:00
|
|
|
@extends('adminlte::layouts.app')
|
|
|
|
|
|
|
|
@section('htmlheader_title')
|
2023-05-09 07:31:44 +00:00
|
|
|
Service List
|
2020-02-18 11:35:20 +00:00
|
|
|
@endsection
|
|
|
|
@section('page_title')
|
2023-05-09 07:31:44 +00:00
|
|
|
Service List
|
2020-02-18 11:35:20 +00:00
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('contentheader_title')
|
2023-05-09 07:31:44 +00:00
|
|
|
Service List
|
2020-02-18 11:35:20 +00:00
|
|
|
@endsection
|
|
|
|
@section('contentheader_description')
|
|
|
|
@endsection
|
|
|
|
|
|
|
|
@section('main-content')
|
|
|
|
<div class="col-md-12">
|
2023-05-09 07:50:39 +00:00
|
|
|
<div class="card">
|
|
|
|
<div class="card-body">
|
|
|
|
<table class="table table-sm table-striped" id="table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th>ID</th>
|
|
|
|
<th>Service</th>
|
|
|
|
<th>Product</th>
|
|
|
|
<th class="text-right">Monthly</th>
|
|
|
|
<th class="text-right">Cost</th>
|
2024-07-29 13:12:53 +00:00
|
|
|
<th class="text-right">Usage</th>
|
2023-05-09 07:50:39 +00:00
|
|
|
<th>Supplier</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
2020-02-18 11:35:20 +00:00
|
|
|
|
2023-05-09 07:50:39 +00:00
|
|
|
<tbody>
|
2024-07-29 13:12:53 +00:00
|
|
|
@foreach (Service::ServiceActive()->with(['account.taxes','type','product.type.supplied.supplier_detail.supplier','product.translate','type.traffic'])->get() as $o)
|
2023-05-09 07:50:39 +00:00
|
|
|
<tr>
|
|
|
|
<td><a href="{{ url('u/service',[$o->id]) }}">{{ $o->id }}</a></td>
|
|
|
|
<td>{{ $o->name }}</td>
|
|
|
|
<td>{{ $o->product->name }}</td>
|
2024-07-29 13:12:53 +00:00
|
|
|
<td class="text-right">{{ number_format($o->billing_charge_normalised,2) }}</td>
|
2023-05-09 07:50:39 +00:00
|
|
|
<td class="text-right">{{ number_format($o->product->cost_normalized(),2) }}</td>
|
2024-07-29 13:12:53 +00:00
|
|
|
<td class="text-right">{{ $o->product->hasUsage() ? number_format($o->type->usage_summary(0)->sum()/1000,1) : '-' }}</td>
|
2023-05-09 07:50:39 +00:00
|
|
|
<td>{{ $o->product->supplier->name }}</td>
|
|
|
|
</tr>
|
|
|
|
@endforeach
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-02-18 11:35:20 +00:00
|
|
|
</div>
|
|
|
|
@endsection
|
|
|
|
|
2024-07-29 13:12:53 +00:00
|
|
|
@pa(datatables,rowgroup|conditionalpaging|select|searchpanes|searchpanes-left)
|
2020-02-18 11:35:20 +00:00
|
|
|
|
2024-07-29 13:12:53 +00:00
|
|
|
@section('page-scripts')
|
2020-02-18 11:35:20 +00:00
|
|
|
<script type="text/javascript">
|
2024-07-29 13:12:53 +00:00
|
|
|
$(document).ready(function() {
|
|
|
|
$('#table').DataTable({
|
|
|
|
//oSearch: { sSearch: searchString ? decodeURIComponent(searchString) : '' },
|
|
|
|
aLengthMenu: [
|
|
|
|
[25, 50, 100, 200, -1],
|
|
|
|
[25, 50, 100, 200, "All"]
|
|
|
|
],
|
|
|
|
paging: true,
|
|
|
|
pageLength: 25,
|
|
|
|
conditionalPaging: true,
|
|
|
|
lengthChange: true,
|
|
|
|
searching: true,
|
|
|
|
ordering: true,
|
|
|
|
info: true,
|
|
|
|
autoWidth: false,
|
|
|
|
fixedHeader: true,
|
|
|
|
order: [
|
|
|
|
[2,'asc'],
|
|
|
|
[1,'asc'],
|
|
|
|
],
|
|
|
|
rowGroup: {
|
|
|
|
dataSrc: [2],
|
|
|
|
},
|
|
|
|
columnDefs: [
|
|
|
|
{
|
|
|
|
targets: [2],
|
|
|
|
visible: false,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
targets: [0,1,3,4,5],
|
|
|
|
searchPanes: {
|
|
|
|
show: false,
|
|
|
|
}
|
|
|
|
},
|
|
|
|
],
|
|
|
|
language: {
|
|
|
|
searchPanes: {
|
|
|
|
title: 'Filters: %d',
|
|
|
|
collapse: 'Filter',
|
|
|
|
}
|
|
|
|
},
|
|
|
|
searchPanes: {
|
|
|
|
cascadePanes: true,
|
|
|
|
viewTotal: true,
|
|
|
|
layout: 'columns-1',
|
|
|
|
dataLength: 20,
|
|
|
|
controls: false,
|
|
|
|
},
|
|
|
|
dom: '<"dtsp-verticalContainer"<"dtsp-verticalPanes"P><"dtsp-dataTable"Bfrtip>>',
|
|
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
2020-02-18 11:35:20 +00:00
|
|
|
@append
|