@if($lead->subscriptions->count() > 0)
@foreach($lead->subscriptions as $sub)
@if(empty($sub->package()))
No internet package
@else
{!! $sub->package()->title !!}
@endif
ID
{!! $sub->id !!}
@if(!empty($sub->stripe_id))
Stripe ID
{!! $sub->stripe_id !!}
@endif()
@if(!empty($sub->package()))
Speed
{!! $sub->package()->getDownSpeedUnit() !!}
{!! $sub->package()->getUpSpeedUnit() !!}
Start
{!! $sub->start !!}
End
{!! $sub->end !!}
Internet
{!! $sub->packagePrice() !!}
@endif
@if(!empty($sub->products()))
@foreach($sub->products() as $product)
{!! $product->title !!} {!! $product->price() !!}
@endforeach
@endif
@if(!empty($sub->discount_amount))
Discount
£{!! $sub->discount_amount !!}
@if(!empty($sub->discount_months))
for {!! $sub->discount_months !!} months
@endif
@endif
Total
{!! $sub->priceSymboled() !!}
State
{!! $sub->stateLong() !!}
@if(auth()->user() && auth()->user()->isPermitted("super"))
Action
@endif
@if($sub->requiresPayment())
Requires payment
@endif
@if(!empty($sub->getStripeSub()->ended_at))
Payments ended
{!! \Carbon\Carbon::parse($sub->getStripeSub()->ended_at)->format('jS M y') !!}
@endif
@if($sub->state() != 1 && !empty($sub->overDueCost()))
Overdue amount {!! $sub->overDueCost() !!}
@endif
@if(!empty($sub->unpaidInvoiceTotal()) && $sub->unpaidInvoiceTotal() != 0)
Unpaid invoice total amount £{!! $sub->unpaidInvoiceTotal() !!}
@endif
@if(!empty($sub->getInvoices()))
@php
$invoice_list_title = 'Show subscription invoices';
$stripe_invoices = $sub->getInvoices();
@endphp
@include('admin.customers.invoice_list')
@endif
@endforeach
@endif
@if(!empty($lead->getAllStripeInvoices()))
@php
$invoice_list_title = 'Show all invoices';
$stripe_invoices = $lead->getAllStripeInvoices();
@endphp
@include('admin.customers.invoice_list')
@endif
@if(!empty($lead->getCreditTransactions()))
Credit transactions
Amount
Reason
Date
@foreach($lead->getCreditTransactions() as $tra)
{{ abs($tra['amount']) }}
{{ $tra['description'] }}
{{ $tra['created'] }}
@endforeach
@endif
{!! Form::model($lead,
['route' => ['lead.update', $lead->id],
'id' => 'customer_change_package', 'class' => 'my-3'
]) !!}
@method('PATCH')
@if(empty($lead->package))
Customer has not selected a package
@endif
@if(empty($lead->package))
{!! Form::select('package_id',
$availablePackages, null) !!}
@else
{!! Form::select('package_id',
$availablePackages, $lead->package->id) !!}
@endif
Save
{!! Form::close() !!}
{!! Form::model($lead,
['route' => ['lead.update', $lead->id],
'id' => 'customer_start_quote_form', 'class' => 'my-3'
]) !!}
@method('PATCH')
Subscription:
{!! Form::text('discount_subscription', null) !!}
Sub discount length (months):
{!! Form::number('discount_sub_length', null) !!}
@foreach($lead->getAdminNotifications() as $notification)
@if(!empty($notification['id']) && $notification['id'] == 'live_coupon')
{!! $notification['title'] !!}
@endif
@endforeach
Installation:
{!! Form::number('discount_install', null) !!}
Activation:
{!! Form::number('discount_activation', null) !!}
Exempt from billing reason:
{!! Form::text('billing_exempt', null) !!}
Exempt expire date
@if(empty($lead->exempt_expire_date))
{!! Form::datetimeLocal('exempt_expire_date', null) !!}
@else
{!! Form::datetimeLocal(
'exempt_expire_date',
(\Carbon\Carbon::parse($lead->exempt_expire_date)
->format('Y-m-d\TH:m') ?? null)) !!}
@endif
Service end reason:
{!! Form::text('service_end_reason', null) !!}
Service end date
@if(empty($lead->service_end_date))
{!! Form::datetimeLocal('service_end_date', null) !!}
@else
{!! Form::datetimeLocal(
'service_end_date',
(\Carbon\Carbon::parse($lead->service_end_date)
->format('Y-m-d\TH:m') ?? null)) !!}
@endif
{!! Form::close() !!}
{!! Form::model($lead,
['route' => ['lead.update', $lead->id],
'id' => 'customer_start_quote_form', 'class' => 'my-3'
]) !!}
@method('PATCH')
Package start date quote
Setting this date will allow the customer to commit to a subscription with this date set for the first payment. The customer should have a live connection on or before this date.
Allow commitment without payment details
{!! Form::select('commit_without_bank',
[0=>'no',1=>'yes'], null) !!}
@if(empty($lead->start_date_quote))
{!! Form::datetimeLocal('start_date_quote', null) !!}
@else
{!! Form::datetimeLocal('start_date_quote',
\Carbon\Carbon::parse($lead->start_date_quote)->format('Y-m-d\TH:m')) !!}
@endif
Save
{!! Form::close() !!}
@if(!empty($lead->package))
@if(!empty($lead->products))
@foreach($lead->products as $product)
{!! Form::open(
['route' => ['product.lead_attachment'],
'id' => 'product_lead_attachment', 'class' => 'my-3'
]) !!}
@method('POST')
{!! Form::hidden('lead_id', $lead->id) !!}
{!! Form::hidden('product_id', $product->id) !!}
{!! $product->title !!} {!! $product->price() !!}
Remove
{!! Form::close() !!}
@endforeach
@else
Customer currently has no extra products
@endif
{!! Form::open(
['route' => ['product.lead_attachment'],
'id' => 'product_lead_attachment', 'class' => 'my-3'
]) !!}
@method('POST')
{!! Form::hidden('lead_id', $lead->id) !!}
{!! Form::hidden('attach', true) !!}
Add product:
{!! Form::select('product_id', $products, null, ['id' => 'product-select']) !!}
Add
{!! Form::close() !!}
@if(!empty($lead->gpon_sn))
@if(!empty($ontDetails))
@if($ontDetails['active'])
@if(empty($lead->getProvisioningFile()['error']))
{!! Form::model($lead,
['route' => ['lead.activate_ont', $lead->id],
'id' => 'set_provisioning_form',
]) !!}
@method('PATCH')
Apply provisioning file
{!! Form::close() !!}
@endif
@endif
@endif
@endif
Package selected
{!! $lead->package->title !!}
[ID: {!! $lead->package->id !!}]
Speed
{!! $lead->package->getDownSpeedUnit() !!}
{!! $lead->package->getUpSpeedUnit() !!}
Length
{!! $lead->package->length !!}
Internet
{!! $lead->package->priceMonthly() !!}
@if(!empty($lead->products))
@foreach($lead->products as $product)
+{!! $product->title !!} {!! $product->price() !!}
@endforeach
@endif
@if(!empty($lead->getPreSubscription()) && !empty($lead->getPreSubscription()->discount_amount))
Discount
£{!! $lead->getPreSubscription()->discount_amount !!}
@if(!empty($lead->getPreSubscription()->discount_months))
for {!! $lead->getPreSubscription()->discount_months !!} months
@endif
@if(!empty($lead->getPreSubscription()->getCoupon()))
(coupon: {!! $lead->getPreSubscription()->getCoupon() !!})
@endif
Monthly total
{!! $lead->getPreSubscription()->priceSymboled() !!}
@endif
Installation
{!! $lead->package->getInstallationPrice($lead->isVoucher()) !!}
Activation
{!! $lead->package->getActivationPrice($lead->isVoucher()) !!}
@if(!empty($lead->stripeMatchReport()))
@foreach($lead->stripeMatchReport()['report'] as $key => $r)
@if(!$r['match'])
Stripe missmatch for {!! $key !!} notify senior technical staff member immediately, this could cause problems with customer billing.
@php dump($r); @endphp
@endif
@endforeach
@endif
@if(auth()->user() && auth()->user()->isPermitted("super"))
{!! Form::open(
['route' => ['create_sub'],
'id' => 'create_sub', 'class' => 'my-3'
]) !!}
@method('POST')
{!! Form::hidden('package_id', $lead->package->id) !!}
{!! Form::hidden('lead_id', $lead->id) !!}
Initiate subscription
Use this to forcefully start a subscription on behalf of a customer. A common reason for using this function is when a customer has been installed without going through the usual website flow.
Start date:
{!! Form::datetimeLocal('start', null, ['id' => 'sub-start']) !!}
End date:
{!! Form::datetimeLocal('end', null, ['id' => 'sub-end']) !!}
auto set
{!! Form::checkbox('notify_lead', 1, null,
['id' => 'notify_lead', 'class' => 'p-0']) !!}
{!! Form::label('notify_lead', 'Notify customer by email ('.$lead->getEmail().')') !!}
{!! Form::close() !!}
@endif
@endif
View direct debit setup form (preview it then print to save as PDF)
Send Billing reminder email