Rework service, removed redundant code, service invoicing improvements

This commit is contained in:
2024-07-29 23:12:53 +10:00
parent 5f10175b35
commit 0b5bc9e012
29 changed files with 474 additions and 523 deletions

View File

@@ -8,11 +8,11 @@
</div>
@endif
<div class="card-header bg-light">
<div class="card-header bg-light p-2">
<h3 class="card-title">Service Information</h3>
</div>
<div class="card-body bg-light">
<div class="card-body p-2">
<table class="table table-sm">
<tr>
<th>Account</th>
@@ -28,7 +28,7 @@
<td>{{ $o->order_info_reference ?? '' }}</td>
</tr>
@endif
@if($o->start_at AND $o->isPending())
@if($o->start_at && $o->isPending())
<tr>
<th>Pending Connection</th>
<td>{{ $o->start_at->format('Y-m-d') }}</td>
@@ -47,10 +47,10 @@
<td>${{ number_format($o->billing_charge,2) }}</td>
@endif
</tr>
@if($o->active && $o->invoice_to)
@if($o->isActive() && $o->invoiced_to)
<tr>
<th>Invoiced To</th>
<td>{{ $o->invoice_to->format('Y-m-d') }}</td>
<td>{{ $o->invoiced_to->format('Y-m-d') }}</td>
</tr>
@if($o->paid_to)
<tr>
@@ -59,14 +59,16 @@
</tr>
@endif
@endif
@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(TRUE)->sum('total'),2) }} <sup>*</sup></td>
<td>${{ number_format($o->next_invoice_items()->sum('total'),2) }} <sup>*</sup></td>
</tr>
@endif
<tr>
<th>Payment Method</th>
<td>@if($o->billing)Direct Debit @else Invoice @endif</td>