Cosmetic code changes, no functional changes

This commit is contained in:
Deon George 2024-07-25 14:44:09 +10:00
parent 9277d42196
commit 756f550b43
16 changed files with 40 additions and 48 deletions

View File

@ -43,7 +43,6 @@
@section('page-styles')
@css(datatables,bootstrap4)
@append
@section('page-scripts')
@js(datatables,bootstrap4)

View File

@ -1,4 +1,4 @@
<!-- $o = Account::class -->
<!-- $o=Account::class -->
<!-- Show outstanding invoices -->
<div class="card card-warning">
<div class="card-header">

View File

@ -1,4 +1,4 @@
<!-- $o = Account::class -->
<!-- $o=Account::class -->
<!-- Show past 12 months invoices -->
<div class="card card-success">
<div class="card-header">
@ -40,12 +40,11 @@
@section('page-styles')
@css(datatables,bootstrap4|rowgroup)
@append
@section('page-scripts')
@js(datatables,bootstrap4|rowgroup)
<script type="text/javascript">
@if ($list->count())
@if($list->count())
$(document).ready(function() {
$('#invoices_past_{{ $o->id }}').DataTable({
order: [[2,'desc'],[0,'asc']],

View File

@ -1,4 +1,4 @@
<!-- $o = Account::class -->
<!-- $o=Account::class -->
@php
$o->load(['services_active.invoiced_service_items_active_recent']);
@endphp
@ -10,7 +10,7 @@
</div>
<div class="card-body">
@if (($x=$o->services_active)->count())
@if(($x=$o->services_active)->count())
<table class="table table-striped table-hover w-100" id="services_active_{{ $ao->id }}">
<thead>
<tr>
@ -50,7 +50,6 @@
@section('page-styles')
@css(datatables,bootstrap4|rowgroup)
@append
@section('page-scripts')
@js(datatables,bootstrap4|rowgroup)

View File

@ -1,7 +1,8 @@
@php
use App\Models\{Account,Service};
$acts = $o->accounts_all->pluck('id');
@endphp
<!-- $o=User::class -->
@php($acts=$o->accounts_all->pluck('id'))
@use(App\Models\Account)
@use(App\Models\Service)
@if($user->isReseller() && ($o->accounts->count() <= 2) && ($x=$o->accounts->pluck('providers')->flatten())->count())
<div class="col-12 col-sm-4 col-md-2">
@ -17,7 +18,7 @@
</div>
@endif
@if ($o->accounts_all->count() > 1)
@if($o->accounts_all->count() > 1)
<div class="col-12 col-sm-4 col-md-2">
<div class="info-box">
<span class="info-box-icon bg-primary elevation-1"><i class="fas fa-user"></i></span>

View File

@ -57,8 +57,10 @@
</div>
@endsection
@section('page-scripts')
@section('page-styles')
@css(datatables,bootstrap4)
@append
@section('page-scripts')
@js(datatables,bootstrap4)
<script type="text/javascript">

View File

@ -1,8 +1,7 @@
@php
use App\Models\{Checkout,Service};
@endphp
<!-- $o=Invoice::class -->
@use(App\Models\Checkout)
@use(App\Models\Service)
<!-- $o = Invoice::class -->
@extends('adminlte::layouts.app')
@section('htmlheader_title')

View File

@ -32,7 +32,6 @@
@section('page-styles')
@css(datatables,bootstrap4|rowgroup)
@append
@section('page-scripts')
@js(datatables,bootstrap4|rowgroup)

View File

@ -1,4 +1,4 @@
<!-- $list = Collection[Invoice::class] -->
<!-- $list=Collection[Invoice::class] -->
<!-- Show outstanding invoices -->
<table class="table table-bordered w-100" id="invoices_due_{{$type}}">
<thead>
@ -27,7 +27,6 @@
@section('page-styles')
@css(datatables,bootstrap4|rowgroup)
@append
@section('page-scripts')
@js(datatables,bootstrap4|rowgroup)

View File

@ -1,6 +1,6 @@
<!-- @todo These needs to be optimised, and change for $o = Account::class -->
<!-- Show next items for an invoice -->
@if (($x=$o->next_invoice_items($future))->count())
@if(($x=$o->next_invoice_items($future))->count())
<div class="card">
<div class="card-body">
<table class="table">

View File

@ -1,7 +1,4 @@
@php
use App\Models\Service;
@endphp
@use(App\Models\Service)
<!-- Show client movements -->
<div class="card card-dark">
<div class="card-header">
@ -9,7 +6,7 @@ use App\Models\Service;
</div>
<div class="card-body">
@if (($x=Service::movements($user))->count())
@if(($x=Service::movements($user))->count())
<table class="table table-striped table-hover" id="service_movements">
<thead>
<tr>
@ -62,7 +59,6 @@ use App\Models\Service;
@section('page-styles')
@css(datatables,bootstrap4|rowgroup)
@append
@section('page-scripts')
@js(datatables,bootstrap4|rowgroup)

View File

@ -28,7 +28,6 @@
@section('page-styles')
@css(datatables,bootstrap4)
@append
@section('page-scripts')
@js(datatables,bootstrap4)

View File

@ -22,19 +22,19 @@
<th>Status</th>
<td><x-button.status :status="$o->status" :substatus="$o->order_status"/></td>
</tr>
@if ($o->order_status == 'ORDER-SENT')
@if($o->order_status == 'ORDER-SENT')
<tr>
<th>Order Reference</th>
<td>{{ $o->order_info_reference ?? '' }}</td>
</tr>
@endif
@if ($o->start_at AND $o->isPending())
@if($o->start_at AND $o->isPending())
<tr>
<th>Pending Connection</th>
<td>{{ $o->start_at->format('Y-m-d') }}</td>
</tr>
@endif
@if (($o->active || $o->isPending()) && (! $o->external_billing))
@if(($o->active || $o->isPending()) && (! $o->external_billing))
<tr>
<th>Billed</th>
<td>{{ $o->billing_interval_string }}</td>
@ -42,7 +42,7 @@
<tr>
<th>Amount</th>
@if($o->isChargeOverridden())
<td>@if ($o->billing_charge < $o->charge_orig)<del>${{ number_format($o->charge_orig,2) }}</del> @endif${{ number_format($o->billing_charge,2) }}</td>
<td>@if($o->billing_charge < $o->charge_orig)<del>${{ number_format($o->charge_orig,2) }}</del> @endif${{ number_format($o->billing_charge,2) }}</td>
@else
<td>${{ number_format($o->billing_charge,2) }}</td>
@endif
@ -61,7 +61,7 @@
@endif
<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>
<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>
@ -69,7 +69,7 @@
</tr>
<tr>
<th>Payment Method</th>
<td>@if ($o->billing)Direct Debit @else Invoice @endif</td>
<td>@if($o->billing)Direct Debit @else Invoice @endif</td>
</tr>
@elseif($o->wasCancelled())

View File

@ -1,4 +1,4 @@
<!-- $o = Service::class, $p = Product::class -->
<!-- $o=Service::class, $p=Product::class -->
@php($c=$o->product)
<table class="table table-sm">
<thead>
@ -28,7 +28,7 @@
<tr>
<th>Product</th>
<td class="text-center" colspan="2"><a href="{{ url('a/product/details',$c->id) }}">#{{ $c->supplied->id }}: {{ $c->supplied->name_long }}</a></td>
@if ($p->exists)
@if($p->exists)
<th>&nbsp;</th>
<td class="text-center" colspan="2">#{{ $p->supplied->id }}: {{ $p->supplied->name_long }}</td>
@endif
@ -40,7 +40,7 @@
<td>${{ number_format($b=$o->account->taxed($c->setup_charge),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($c->setup_cost),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@if ($p->exists)
@if($p->exists)
<td>${{ number_format($b=$o->account->taxed($p->setup_charge),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($p->setup_cost),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@ -52,7 +52,7 @@
<td>{{ $o->billing_interval_string }}</td>
<td>{{ $c->type->billing_interval_string }}</td>
<td>&nbsp;</td>
@if ($p->exists)
@if($p->exists)
<td>{{ $o->billing_interval_string }}</td>
<td>{{ $p->type->billing_interval_string }}</td>
<td>&nbsp;</td>
@ -64,7 +64,7 @@
<td @if($o->isChargeOverridden())class="text-danger"@endif>${{ number_format($b=$o->billing_charge,2) }}</td>
<td>${{ number_format($a=$o->account->taxed($c->base_cost),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@if ($p->exists)
@if($p->exists)
<td @if($o->isChargeOverridden())class="text-danger"@endif>${{ number_format($b=$o->account->taxed($p->base_charge),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($p->base_cost),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@ -82,7 +82,7 @@
</td>
<td>${{ number_format($a=$o->account->taxed($c->base_cost)*\App\Models\Invoice::billing_change($o->billing_interval,\App\Models\Invoice::BILL_MONTHLY),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@if ($p->exists)
@if($p->exists)
<td @if($x=$o->isChargeOverridden()) class="text-danger" @endif>${{ number_format($b=$o->account->taxed($p->base_charge)*\App\Models\Invoice::billing_change($o->billing_interval,\App\Models\Invoice::BILL_MONTHLY),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($p->base_cost)*\App\Models\Invoice::billing_change($o->billing_interval,\App\Models\Invoice::BILL_MONTHLY),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@ -94,7 +94,7 @@
<td>{{ $o->contract_term }} months</td>
<td>{{ $c->supplied->contract_term }} months</td>
<td>&nbsp;</td>
@if ($p->exists)
@if($p->exists)
<td>{{ $p->contract_term }} months</td>
<td>{{ $p->supplied->contract_term }} months</td>
<td>&nbsp;</td>
@ -107,7 +107,7 @@
<td>${{ number_format($b=$o->account->taxed($o->product->min_charge),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($c->supplied->min_cost),2) }}</td>
<td>{!! markup($a,$b) !!}</td>
@if ($p->exists)
@if($p->exists)
<td>${{ number_format($a=$o->account->taxed($p->min_charge),2) }}</td>
<td>${{ number_format($a=$o->account->taxed($p->supplied->min_cost ?? 0),2) }}</td>
<td>{!! markup($a,$b) !!}</td>

View File

@ -9,7 +9,7 @@
<div class="container">
<div class="col-12">
<h1>Order Service</h1>
@if ($errors->count())<h4><span class="note-danger">There were errors with your order, please try again.</span></h4>@endif
@if($errors->count())<h4><span class="note-danger">There were errors with your order, please try again.</span></h4>@endif
<div class="order-page" id="order-page">
<div class="row">
<div class="col-3">
@ -29,7 +29,7 @@
<div id="accordion">
<!-- Reseller Choose Client -->
@if ($user && $user->exists && $user->isReseller())
@if($user && $user->exists && $user->isReseller())
<div class="panel panel-default">
<div class="panel-heading">
<h4 class="panel-title">Account</h4>
@ -201,7 +201,7 @@
</div>
<div class="col-sm-6" id="product_info">
@if (old('product_id'))
@if(old('product_id'))
@include('theme.frontend.metronic.order.widget.info',['o'=>$po])
@endif
</div>
@ -209,7 +209,7 @@
<div class="row">
<div class="col-sm-12" id="product_order">
@if (old('product_id'))
@if(old('product_id'))
@include('theme.frontend.metronic.order.widget.order',['o'=>$po])
@endif
</div>

View File

@ -45,7 +45,7 @@
</a>
<div class="dropdown-divider"></div>
@if ($user->switched)
@if($user->switched)
<a href="{{ url('/admin/switch/stop') }}" class="dropdown-item">
<i class="fas fa-sign-out-alt mr-2"></i> {{ trans('adminlte_lang::message.switchoff') }}
</a>