Improvements for service_change and service_cancel
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 37s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s

This commit is contained in:
2024-08-16 08:20:58 +10:00
parent 5f66987a3e
commit 3b40e92c48
12 changed files with 186 additions and 327 deletions

View File

@@ -1,31 +1,11 @@
<div class="form-group row">
<label for="reference" class="col-sm-2 col-form-label text-right">Product</label>
<div class="col-sm-6">
<div class="input-group">
<select class="form-control" id="product_id" name="product_id">
<option value="">&nbsp;</option>
@php
$po = $selected = NULL;
@endphp
@foreach (\App\Models\Product::active()->get()->filter(function($item) { return get_class($item->type) === \App\Models\Product\Broadband::class; })->sortBy('name') as $o)
@php
if ($o->id == old('product_id')) {
$selected = 'selected';
$po = $o;
} else {
$selected = NULL;
}
@endphp
<option value="{{ $o->id }}" {{ $selected }}>{{ $o->name }}</option>
@endforeach
</select>
</div>
</div>
@use(App\Models\Product)
@use(App\Models\Product\Broadband)
<div class="offset-2 col-10">
<strong>NOTE</strong>: A plan setup fee is normally not applicable to Broadband changes, but a plan change fee normally is.
</div>
</div>
<x-leenooks::form.select id="product_id" name="product_id" icon="fa-list" label="Product" :helper="$o->category_name"
:value="$o->id"
:options="Product::active()->get()->filter(fn($item)=>get_class($item->type) === Broadband::class)->sortBy('name')->sortByDesc('active')->transform(fn($item)=>['id'=>$item->id,'active'=>$item->active,'value'=>$item->name])" required/>
<strong>NOTE</strong>: A plan setup fee is normally not applicable to Broadband changes, but a plan change fee normally is.
@section('page-scripts')
<script>

View File

@@ -62,12 +62,14 @@
@if($o->status !== 'cancel-pending')
<tr>
<th>Next Invoice</th>
<td>@if($o->suspend_billing)<del>@endif{{ $o->invoice_next->format('Y-m-d') }}@if($o->suspend_billing)</del> <strong>SUSPENDED</strong>@endif</td>
</tr>
<tr>
<th>Next Estimated Invoice</th>
<td>${{ number_format($o->next_invoice_items()->sum('total'),2) }} <sup>*</sup></td>
<td>@if($o->suspend_billing)<del>@endif{{ $o->invoice_next?->format('Y-m-d') }}@if($o->suspend_billing)</del> <strong>SUSPENDED</strong>@endif</td>
</tr>
@if($o->invoice_next)
<tr>
<th>Next Estimated Invoice</th>
<td>${{ number_format($o->next_invoice_items()->sum('total'),2) }} <sup>*</sup></td>
</tr>
@endif
@endif
<tr>
<th>Payment Method</th>