Add validation to service cancellation, and displaying cancellation costs if any
This commit is contained in:
@@ -1,17 +1,19 @@
|
||||
@use(Carbon\Carbon)
|
||||
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
{{ $o->sid }}
|
||||
{{ $so->sid }}
|
||||
@endsection
|
||||
@section('page_title')
|
||||
{{ $o->sid }}
|
||||
{{ $so->sid }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Service: {{ $o->sid }} <strong>{{ $o->product->name }}</strong>
|
||||
Service: {{ $so->sid }} <strong>{{ $so->product->name }}</strong>
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $o->name }}
|
||||
{{ $so->name }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
@@ -27,14 +29,27 @@
|
||||
|
||||
<div class="card-body">
|
||||
<div class="row">
|
||||
<div class="col-8 col-sm-5 col-md-12 col-lg-6">
|
||||
<x-leenooks::form.date name="stop_at" icon="fa-calendar" label="Cancel Date" :value="($x=$o->stop_at) ? $x->format('Y-m-d') : '' "/>
|
||||
<div class="col-8 col-sm-6 col-md-12 col-lg-6">
|
||||
<x-leenooks::form.date name="stop_at" icon="fa-calendar" label="Cancel Date" :helper="sprintf('After %s',$so->cancel_date->format('Y-m-d'))" :value="($x=$so->stop_at) ? $x->format('Y-m-d') : ''"/>
|
||||
</div>
|
||||
<div class="col-8 col-sm-6 col-md-12 col-lg-6">
|
||||
<x-leenooks::form.date name="paid_to" icon="fa-money" label="Paid To" :value="$so->invoiced_to->format('Y-m-d')" readonly/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(old('stop_at') && Carbon::now()->lessThan(old('stop_at')))
|
||||
<div class="row">
|
||||
<div class="col-5 col-md-10 col-lg-6 col-xl-5">
|
||||
<x-leenooks::form.text class="text-right" name="extra_charges_amount" icon="fa-dollar-sign" label="Estimated Extra Charges" :value="number_format($so->billing_charge_to(Carbon::create(old('stop_at'))),2)" :old="false" readonly/>
|
||||
</div>
|
||||
<div class="col-1">
|
||||
<x-leenooks::form.checkbox name="extra_charges" label="Accept" value="1"/>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<x-leenooks::form.textarea name="notes" label="Notes" placeholder="Please let us know why you are cancelling" :value="$o->order_info_notes ?? ''"/>
|
||||
<x-leenooks::form.textarea name="notes" label="Notes" placeholder="Please let us know why you are cancelling" :value="$so->order_info_notes ?? ''"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@@ -64,7 +64,7 @@
|
||||
|
||||
<div class="card-body p-2">
|
||||
<div class="tab-content">
|
||||
@if($x=! ($o->suspend_billing || $o->external_billing) && $o->next_invoice)
|
||||
@if(($x=! ($o->suspend_billing || $o->external_billing)) && $o->invoice_next)
|
||||
<div @class(['tab-pane','fade','show active'=>! (session()->has('service_update') || session()->has('charge_add'))]) id="pending_items">
|
||||
@include('theme.backend.adminlte.service.widget.invoice')
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user