@extends('layouts.portal.app') @section('content')
@if($servicePlan != "")
Active {{ number_format($activeCompanyCustomerServicePlans) }} Inactive {{ number_format($inactiveCompanyCustomerServicePlans) }} Expired {{ number_format($expiredCompanyCustomerServicePlans) }} Online Offline
@endif @if(Session::has('errorResponse'))
@endif
Download @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.edit')) Add Client @endif
@if(Auth::user()->hasRole('Administrator') || Auth::user()->hasRole('Client')) @endif @foreach($companyCustomerServicePlans as $companyCustomerServicePlan) @if(Auth::user()->hasRole('Administrator') || Auth::user()->hasRole('Client')) @endif @include('portal.companies.customers.service-plans.summary') @endforeach
A/c No Customer Credentials Plan Expiry Date Date Purchased Actions
{{ $companyCustomerServicePlan->ref_no }}
@if($companyCustomerServicePlan->online_status == 1) @else @endif @if($companyCustomerServicePlan->companyServicePlan && $companyCustomerServicePlan->companyServicePlan->service_plan_id != 1) @endif
{{ $companyCustomerServicePlan->profile_name }}
@php $phone = $companyCustomerServicePlan->companyCustomer->phone ?? null; $voucherCode = $companyCustomerServicePlan->companyPrepaidVoucher->voucher_code ?? null; @endphp @if($phone != "") {{ $phone }} @elseif($voucherCode != "") Voucher Code {{ $voucherCode }} @endif
@if($companyCustomerServicePlan->companyServicePlan->service_plan_id == 1) Username: {{ $companyCustomerServicePlan->username?? preg_replace('/[^A-Za-z0-9 ]/', '', $companyCustomerServicePlan->profile_name) }}
Password: {{ $companyCustomerServicePlan->password }}
@endif
{{ $companyCustomerServicePlan->companyServicePlan? $companyCustomerServicePlan->companyServicePlan->name: '' }}
@if($companyCustomerServicePlan->status == 0) inactive @elseif($companyCustomerServicePlan->status == 1) active @elseif($companyCustomerServicePlan->status == 2) expired @endif @if($companyCustomerServicePlan->static_ip_address != "") | {{ $companyCustomerServicePlan->static_ip_address }} @endif
{{ \Carbon\Carbon::parse($companyCustomerServicePlan->subscription_expiry_date)->format('d M Y') }} at
{{ \Carbon\Carbon::parse($companyCustomerServicePlan->subscription_expiry_date)->format('h:i A') }}
@if($companyCustomerServicePlan->companyServicePlan && $companyCustomerServicePlan->companyServicePlan->service_plan_id != 1) Sub. Amnt: Ksh {{ number_format($companyCustomerServicePlan->monthly_sub_amount) }}
Bal: Ksh {{ number_format($companyCustomerServicePlan->Summary['totalBalance']) }} @else {{ \Carbon\Carbon::parse($companyCustomerServicePlan->created_at)->format('d M Y') }}
at {{ \Carbon\Carbon::parse($companyCustomerServicePlan->created_at)->format('h:i A') }} @endif
@if($companyCustomerServicePlan->companyServicePlan && $companyCustomerServicePlan->companyServicePlan->service_plan_id != 1) @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.edit')) @endif @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Invoices.record_payments')) @endif @if(($companyCustomerServicePlan->status == 0 || $companyCustomerServicePlan->status == 2) && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.activate'))) @elseif($companyCustomerServicePlan->status == 1 && (Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.deactivate'))) @endif @endif @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.delete')) @endif
{{ $companyCustomerServicePlans->render() }}
@include('portal.companies.customers.create') @include('portal.companies.customers.service-plans.edit') @include('portal.companies.customers.service-plans.activate') @include('portal.companies.customers.service-plans.deactivate') @include('portal.companies.customers.service-plans.delete') @include('portal.companies.customers.service-plans.create') @include('portal.companies.customers.service-plans.change-expiry-date') @include('portal.companies.service-plans.record-payment') @endsection