Fix old products report
This commit is contained in:
@@ -21,9 +21,10 @@
|
||||
<th>ID</th>
|
||||
<th>Service</th>
|
||||
<th>Product</th>
|
||||
<th>Monthly</th>
|
||||
<th>Cost</th>
|
||||
<th>Traffic</th>
|
||||
<th class="text-right">Monthly</th>
|
||||
<th class="text-right">Cost</th>
|
||||
<th class="text-right">Traffic (GB)</th>
|
||||
<th>Supplier</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -31,11 +32,12 @@
|
||||
@foreach (\App\Models\Service::active()->get() as $o)
|
||||
<tr>
|
||||
<td><a href="{{ url('u/service',[$o->id]) }}">{{ $o->id }}</a></td>
|
||||
<td>{{ $o->sname }}</td>
|
||||
<td>{{ $o->name }}</td>
|
||||
<td>{{ $o->product->name }}</td>
|
||||
<td>{{ number_format($o->billing_monthly_price,2) }}</td>
|
||||
<td>{{ $o->product->type ? number_format($o->product->type->cost,2) : 'NO TYPE' }}</td>
|
||||
<td>{{ $o->product->type ? $o->product->type->allowance_string() : '-' }}</td>
|
||||
<td class="text-right">{{ number_format($o->billing_monthly_price,2) }}</td>
|
||||
<td class="text-right">{{ number_format(\App\Models\Tax::tax_calc(($s=$o->supplied)->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,1),$o->account->taxes),2) }}</td>
|
||||
<td class="text-right">{{ $o->category == 'broadband' ? number_format($o->type->usage_summary(0)->sum()/1000,1) : '-' }}</td>
|
||||
<td>{{ $o->product->supplier->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
|
@@ -1,32 +1,25 @@
|
||||
<div class="card">
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Broadband Traffic</h3>
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Period</th>
|
||||
<th class="text-right">Traffic <small>(GB)</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($o->usage_summary(6) as $key => $oo)
|
||||
<tr>
|
||||
<td>{{ $key }}</td>
|
||||
<td class="text-right">{{ number_format($oo/1024,2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<table class="table table-sm">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Period</th>
|
||||
<th class="text-right">Traffic <small>(GB)</small></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach ($o->usage_summary(6) as $key => $oo)
|
||||
<tr>
|
||||
<td>{{ $key }}</td>
|
||||
<td class="text-right">{{ number_format($oo/1024,2) }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div id="graph"></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-9">
|
||||
<div id="graph"></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
Reference in New Issue
Block a user