Optimising product category and category names
This commit is contained in:
@@ -26,11 +26,7 @@
|
||||
<div class="card-header bg-dark d-flex p-0">
|
||||
<ul class="nav nav-pills w-100 p-2">
|
||||
<li class="nav-item"><a class="nav-link active" href="#details" data-toggle="tab">Detail</a></li>
|
||||
{{--
|
||||
<li class="nav-item"><a class="nav-link" href="#products" data-toggle="tab">Products</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#offerings" data-toggle="tab">Offerings</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#connections" data-toggle="tab">Connections</a></li>
|
||||
--}}
|
||||
<li class="nav-item"><a class="nav-link" href="#services" data-toggle="tab">Services</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -40,19 +36,9 @@
|
||||
@include('a.product.widgets.detail')
|
||||
</div>
|
||||
|
||||
{{--
|
||||
<div class="tab-pane fade" id="products" role="tabpanel">
|
||||
@include('a.product.widgets.products')
|
||||
<div class="tab-pane fade" id="services" role="tabpanel">
|
||||
@include('a.product.widgets.services')
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="offerings" role="tabpanel">
|
||||
@include('a.product.widgets.offerings')
|
||||
</div>
|
||||
|
||||
<div class="tab-pane fade" id="connections" role="tabpanel">
|
||||
@include('a.product.widgets.connections')
|
||||
</div>
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -41,7 +41,7 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<input type="date" class="form-control" name="broadband[service_connect_date]" value="{{ $o->service_connect_date ? $o->service_connect_date->format('Y-m-d') : '' }}">
|
||||
<input type="date" class="form-control" name="broadband[connect_at]" value="{{ $o->connect_at ? $o->connect_at->format('Y-m-d') : '' }}">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,7 +53,10 @@
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
|
||||
</div>
|
||||
<!-- @todo We changed contract_date in the DB, what happened to it and how do we work it out now -->
|
||||
<!--
|
||||
<input type="date" class="form-control" name="broadband[service_contract_date]" value="{{ $o->service_contract_date ? $o->service_contract_date->format('Y-m-d') : '' }}">
|
||||
-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<!-- o = App\Models\Service\Email::class -->
|
||||
<!-- o = App\Models\Service\Host::class -->
|
||||
<div class="row">
|
||||
<!-- DOMAIN NAME -->
|
||||
<div class="col-6">
|
||||
|
@@ -3,54 +3,86 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th> </th>
|
||||
<th>{{ ($s=$o->supplied)->supplier_detail->supplier->name }}</th>
|
||||
@if (($s=$o->supplied) && $s->exists)
|
||||
<th>{{ $s->supplier_detail->supplier->name }}</th>
|
||||
@endif
|
||||
<th>Us</th>
|
||||
<th> </th>
|
||||
@if ($s->exists)
|
||||
<th> </th>
|
||||
@endif
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Product</th>
|
||||
<td>#{{ $s->id }}: {{ $s->name }}</td>
|
||||
@if ($s->exists)
|
||||
<td>#{{ $s->id }}: {{ $s->name }}</td>
|
||||
@endif
|
||||
<td>#{{ $o->product->id }}: {{ $o->product->name }}</td>
|
||||
<td>{{ $s->type }}</td>
|
||||
@if ($s->exists)
|
||||
<td>{{ $o->product->category_name }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup</th>
|
||||
@if ($s->exists)
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->setup_cost,$o->account->taxes),2) }}</td>
|
||||
<td>${{ number_format($b=\App\Models\Tax::tax_calc($o->product->setup_charge,$o->account->taxes),2) }}</td>
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@else
|
||||
<td>-</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Billed</th>
|
||||
<td>{{ $s->billing_interval_string }}</td>
|
||||
@if ($s->exists)
|
||||
<td>{{ $s->billing_interval_string }}</td>
|
||||
@endif
|
||||
<td>{{ $o->billing_interval_string }}</td>
|
||||
<td> </td>
|
||||
@if ($s->exists)
|
||||
<td> </td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Billing Price</th>
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,$o->product->billing_interval),$o->account->taxes),2) }}</td>
|
||||
@if ($s->exists)
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,$o->product->billing_interval),$o->account->taxes),2) }}</td>
|
||||
@endif
|
||||
<td>${{ number_format($b=$o->billing_charge,2) }}</td>
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@if ($s->exists)
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Monthly Price</th>
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,1),$o->account->taxes),2) }}</td>
|
||||
@if ($s->exists)
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->base_cost*\App\Models\Invoice::billing_change($s->billing_interval,1),$o->account->taxes),2) }}</td>
|
||||
@endif
|
||||
<td>${{ number_format($b=$o->billing_monthly_price,2) }}</td>
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@if ($s->exists)
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract</th>
|
||||
<td>{{ $s->contract_term }} months</td>
|
||||
@if ($s->exists)
|
||||
<td>{{ $s->contract_term }} months</td>
|
||||
@endif
|
||||
<td>{{ $o->contract_term }} months</td>
|
||||
<td> </td>
|
||||
@if ($s->exists)
|
||||
<td> </td>
|
||||
@endif
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Min Price</th>
|
||||
@if ($s->exists)
|
||||
<td>${{ number_format($a=\App\Models\Tax::tax_calc($s->min_cost,$o->account->taxes),2) }}</td>
|
||||
<td>${{ number_format($b=\App\Models\Tax::tax_calc($o->product->getMinChargeAttribute($o->billing_interval),$o->account->taxes),2) }}</td>
|
||||
<td>{!! markup($a,$b) !!}</td>
|
||||
@else
|
||||
<td>-</td>
|
||||
@endif
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@@ -5,7 +5,7 @@
|
||||
<form class="g-0 needs-validation" method="POST" action="{{ url('a/service/edit',[$o->id]) }}">
|
||||
@csrf
|
||||
|
||||
@includeIf('a.service.widgets.'.$o->type->type.'.update',['o'=>$o->type])
|
||||
@includeIf('a.service.widgets.'.$o->product->category.'.update',['o'=>$o->type])
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
|
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@includeIf('u.service.widgets.'.$o->type->type.'.order',['o'=>$o->type])
|
||||
@includeIf('u.service.widgets.'.$o->product->category.'.order',['o'=>$o->type])
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="notes" class="col-sm-2 col-form-label text-right">Notes</label>
|
||||
|
@@ -38,7 +38,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@includeIf('u.service.widgets.'.$o->type->type.'.order',['o'=>$o->type])
|
||||
@includeIf('u.service.widgets.'.$o->product->category.'.order',['o'=>$o->type])
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="notes" class="col-sm-2 col-form-label text-right">Notes</label>
|
||||
|
@@ -44,7 +44,7 @@
|
||||
</div>
|
||||
|
||||
{{--
|
||||
@includeIf('u.service.widgets.'.$o->type->type.'.order',['o'=>$o->type])
|
||||
@includeIf('u.service.widgets.'.$o->product->category.'.order',['o'=>$o->type])
|
||||
--}}
|
||||
|
||||
<div class="form-group row">
|
||||
|
@@ -43,7 +43,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@includeIf('u.service.widgets.'.$o->type->type.'.change',['o'=>$o->type])
|
||||
@includeIf('u.service.widgets.'.$o->product->category.'.change',['o'=>$o->type])
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="notes" class="col-2 col-form-label text-right">Notes</label>
|
||||
|
@@ -19,7 +19,7 @@
|
||||
|
||||
<!-- Service Details -->
|
||||
<div class="col-5">
|
||||
@includeIf('u.service.widgets.'.$o->type->type.'.details',['o'=>$o->type])
|
||||
@includeIf('u.service.widgets.'.$o->product->category.'.details',['o'=>$o->type])
|
||||
@include('u.service.widgets.information')
|
||||
</div>
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
@if ($o->hasUsage())
|
||||
<div class="tab-pane fade {{ (! $o->isBilled() && (! session()->has('service_update'))) ? 'active show' : '' }}" id="traffic" role="tabpanel">
|
||||
@if ($o->type->usage(30)->count())
|
||||
@include('u.service.widgets.'.$o->type->type.'.usagegraph',['o'=>$o->type])
|
||||
@include('u.service.widgets.'.$o->product->category.'.usagegraph',['o'=>$o->type])
|
||||
@endif
|
||||
</div>
|
||||
@endif
|
||||
|
@@ -11,7 +11,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Type</th>
|
||||
<th>Category</th>
|
||||
<th>Service</th>
|
||||
<th>Product</th>
|
||||
<th>Next Invoice</th>
|
||||
@@ -22,7 +22,7 @@
|
||||
@foreach ($o->services as $oo)
|
||||
<tr>
|
||||
<td><a href="{{ url('u/service',[$oo->id]) }}">{{ $oo->sid }}</a></td>
|
||||
<td>{{ $oo->category }}</td>
|
||||
<td>{{ $oo->product->category_name }}</td>
|
||||
<td>{{ $oo->name_short }}</td>
|
||||
<td>{{ $oo->product->name }}</td>
|
||||
<td>{{ $oo->external_billing ? '-' : $oo->invoice_next->format('Y-m-d') }}</td>
|
||||
|
@@ -1,9 +1,9 @@
|
||||
<!-- $o = Product::class [{{$o->product_type}}]-->
|
||||
@if(View::exists('order.widget.info.'.strtolower($o->product_type)))
|
||||
<!-- $o = Product::class [{{$o->category}}]-->
|
||||
@if(View::exists('order.widget.info.'.$o->category))
|
||||
<div class="box box-primary">
|
||||
<div class="box-body">
|
||||
{{-- Return Category Requirements --}}
|
||||
@include('order.widget.info.'.strtolower($o->product_type))
|
||||
@include('order.widget.info.'.$o->category)
|
||||
|
||||
{{-- Return Supplier Requirements --}}
|
||||
{{-- Return Product Requirements --}}
|
||||
|
@@ -6,7 +6,7 @@
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">{{ $o->product_type }}</td>
|
||||
<td class="text-right">{{ $o->category_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Charges <sup>*</sup></th>
|
||||
@@ -30,9 +30,13 @@
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
<tr><td colspan="2"><sup>
|
||||
* Additional setup charges may apply for complex installations.<br>
|
||||
+ Additional charges may apply for regional installations.
|
||||
</sup></td></tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<sup>
|
||||
* Additional setup charges may apply for complex installations.<br>
|
||||
+ Additional charges may apply for regional installations.
|
||||
</sup>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
@@ -0,0 +1,33 @@
|
||||
<!-- $o = Product::class -->
|
||||
<div class="col-md-12">
|
||||
<p>{!! $o->name_long !!}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">{{ $o->category_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Charges <sup>*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->setup_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cost <sup>+</sup></th>
|
||||
<td class="text-right">${{ number_format($o->base_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Default Billing</th>
|
||||
<td class="text-right">{{ $o->billing_interval_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract Term</th>
|
||||
<td class="text-right">{{ $o->contract_term }} mths</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Minimum Costs <sup>+*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->min_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
</table>
|
@@ -0,0 +1,33 @@
|
||||
<!-- $o = Product::class -->
|
||||
<div class="col-md-12">
|
||||
<p>{!! $o->name_long !!}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">{{ $o->category_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Charges <sup>*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->setup_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cost <sup>+</sup></th>
|
||||
<td class="text-right">${{ number_format($o->base_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Default Billing</th>
|
||||
<td class="text-right">{{ $o->billing_interval_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract Term</th>
|
||||
<td class="text-right">{{ $o->contract_term }} mths</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Minimum Costs <sup>+*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->min_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
</table>
|
@@ -0,0 +1,33 @@
|
||||
<!-- $o = Product::class -->
|
||||
<div class="col-md-12">
|
||||
<p>{!! $o->name_long !!}</p>
|
||||
</div>
|
||||
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">{{ $o->category_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Charges <sup>*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->setup_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Cost <sup>+</sup></th>
|
||||
<td class="text-right">${{ number_format($o->base_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Default Billing</th>
|
||||
<td class="text-right">{{ $o->billing_interval_string }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Contract Term</th>
|
||||
<td class="text-right">{{ $o->contract_term }} mths</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Minimum Costs <sup>+*</sup></th>
|
||||
<td class="text-right">${{ number_format($o->min_charge_taxable,2) }}</td>
|
||||
</tr>
|
||||
|
||||
<tfoot>
|
||||
</table>
|
@@ -6,7 +6,7 @@
|
||||
<table class="table table-condensed">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<td class="text-right">{{ $o->product_type }}</td>
|
||||
<td class="text-right">{{ $o->category_name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Setup Charges</th>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<!-- $o = Product::class -->
|
||||
@if(View::exists('order.widget.order.'.strtolower($o->product_type)))
|
||||
<!-- $o = Product::class [{{$o->category}}] -->
|
||||
@if(View::exists('order.widget.order.'.$o->category))
|
||||
<div class="box box-primary">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Order Configuration</h3>
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
<div class="box-body">
|
||||
{{-- Return Category Requirements --}}
|
||||
@include('order.widget.order.'.strtolower($o->product_type))
|
||||
@include('order.widget.order.'.$o->category)
|
||||
|
||||
{{-- Return Supplier Requirements --}}
|
||||
{{-- Return Product Requirements --}}
|
||||
|
Reference in New Issue
Block a user