@extends('layouts.'.env('THEME')) @section('moreStyle') @include('staff.schedule.style') @endsection @section('content')
@foreach($info_count as $key => $tc)
{{ $key }}
{{ $tc }}
@endforeach
Est over due
@php $hide_toggels[] = [ 'title' => 'Hide active billing', 'name' => 'billing_active', 'id' => 'hide_ab', 'for' => 'btncheck1', ]; $hide_toggels[] = [ 'title' => 'Hide installed but offline', 'name' => 'installed_offline', 'id' => 'hide_io', 'for' => 'btncheck6', ]; $hide_toggels[] = [ 'title' => 'Hide canceled vouchers', 'name' => 'voucher_canceled', 'id' => 'hide_cv', 'for' => 'btncheck7', ]; $hide_toggels[] = [ 'title' => 'Hide in trial', 'name' => 'trialing', 'id' => 'hide_t', 'for' => 'btncheck5', ]; $hide_toggels[] = [ 'title' => 'Hide billing exempt', 'name' => 'billing_exempt', 'id' => 'hide_be', 'for' => 'btncheck2', ]; $hide_toggels[] = [ 'title' => 'Hide service canceled', 'name' => 'service_ended', 'id' => 'hide_se', 'for' => 'btncheck3', ]; $hide_toggels[] = [ 'title' => 'Hide subscriptions', 'name' => 'lead_subs', 'id' => 'hide_ls', 'for' => 'btncheck4', ]; @endphp @foreach($hide_toggels as $toggel)
@endforeach @foreach($results as $uprn => $uprn_results) @foreach($uprn_results as $r) @php $uprn_style = ''; if(sizeof($uprn_results) > 1) $uprn_style = 'style="background-color: #4FC3F7;"'; $display_classes = ''; if($r['lead']->billing_state() == 1){ $display_classes .= 'billing_active '; } if($r['lead']->install_state == 3){ $display_classes .= 'installed_offline '; } if($r['lead']->voucher_state == 7){ $display_classes .= 'voucher_canceled '; } if(!empty($r['lead']->activeSubscription()) && $r['lead']->activeSubscription()->state() == 7){ $display_classes .= 'trialing '; } if($r['lead']->billingExempt()){ $display_classes .= 'billing_exempt '; } if(!empty($r['lead']->service_end_date)){ $display_classes .= 'service_ended '; } @endphp @foreach($r['lead']->subscriptions as $sub) @endforeach @endforeach @endforeach
UPRN ID Name Stripe ID Billing state Install state Install date Last paid inv Months installed Est over due Est total service fee
{{ $uprn }} {{ $r['lead']->id }} {{ $r['lead']->fullname ?? ''}} {{ $r['lead']->stripe_id }} @if($r['lead']->billing_state() == 1) Active @else {{ $r['lead']->billing_state_text() }}
{{ $r['lead']->billing_exempt }}
@if(!empty($r['lead']->exempt_expire_date)) {{ $r['lead']->exempt_expire_date }} @endif @endif
@php $badge = 'warning'; if($r['lead']->install_state == 2){ $badge = 'success'; }else if($r['lead']->install_state == 3){ $badge = 'info'; } @endphp {{ config('enum.install_states')[$r['lead']->install_state] }} @if(!empty($r['lead']->install_date)) {{ $r['lead']->install_date->format('d-m-Y') }} @endif @php if($r['lead']->billing_state() == 1){ echo('Up to date'); }else{ $last_paid = $r['lead']->getLastPaidInvoice(); if(!empty($last_paid)){ echo( \Carbon\Carbon::parse($last_paid->period_end)->format('d-m-Y') .'
'.\Carbon\Carbon::parse($last_paid->period_end)->diffInMonths(\Carbon\Carbon::now()).' months ago
'.$last_paid->id.' ' ); } } @endphp
@if(!empty($r['lead']->install_date)) {{ $r['lead']->install_date->diffInMonths(\Carbon\Carbon::now()) }} @endif {{ number_format((float)$r['over_due_est'], 2, '.', '') }} £{{ number_format((float)$r['lead']->estimatedServicFeeTotal(), 2, '.', '') }}
Subscription @if(!empty($sub->stripe_id)) {!! $sub->stripe_id !!} @endif {!! \Carbon\Carbon::parse($sub->start)->format('d-m-Y') !!} to {!! \Carbon\Carbon::parse($sub->end)->format('d-m-Y') !!} @if(!empty($sub->discount_amount)) Discount: £{!! $sub->discount_amount !!} @if(!empty($sub->discount_months)) for {!! $sub->discount_months !!} months @endif @else No discount @endif {!! $sub->stateLong() !!} @if(!empty($sub->getStripeSub()->ended_at))
Payments ended: £{!! $sub->overDueCost() !!} overdue
@endif

Stripe customers not matched to local customer

@foreach($stripe_customers_not_local as $sc) @endforeach
Stripe ID Stripe UUID Name Email
{{ $sc['stripe_customer']->id }} @if(!empty($sc['stripe_customer']->metadata->uuid)) {{ $sc['stripe_customer']->metadata->uuid }} @endif {{ $sc['stripe_customer']->name }} {{ $sc['stripe_customer']->email }}

Stripe subscriptions not matched to local subscription

@foreach($stripe_subs_not_local_no_lead as $sr) @endforeach
Subscription ID Customer ID Name Email
{{ $sr['stripe_sub']->id }} {{ $sr['stripe_customer']->id }} {{ $sr['stripe_customer']->name }} {{ $sr['stripe_customer']->email }}
@endsection @section('script') @endsection