@extends('layouts.portal.app') @section('content')
Home / {{ $servicePlan? $servicePlan->name: '' }} Clients - {{ $companyCustomerServicePlans->total() }} records fetched
@if($servicePlan && $servicePlan->id != "" && $expiredCompanyCustomerServicePlans != "" && $inactiveCompanyCustomerServicePlans != "" && $expiredCompanyCustomerServicePlans != "") @endif @if(Session::has('errorResponse'))
@endif
Download @if(Auth::user()->hasRole('Administrator') || Auth::user()->can('Administer Company') || Auth::user()->can('Clients.create')) Add Client @endif
@if($servicePlan != "" && $servicePlan->id == 1) @endif @if($servicePlan != "" && $servicePlan->id != 1) @else @endif @if(Auth::user()->hasRole('Administrator') || Auth::user()->hasRole('Client')) @endif @foreach($companyCustomerServicePlans as $companyCustomerServicePlan) @if($servicePlan != "" && $servicePlan->id == 1) @endif @if($servicePlan != "" && $servicePlan->id != 1) @else @endif @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 Amount Date Purchased Actions
{{ $companyCustomerServicePlan->ref_no }}
@if($companyCustomerServicePlan->online_status == 1) @else @endif
{{ $companyCustomerServicePlan->companyCustomer->names?? '' }}
@php $phone = $companyCustomerServicePlan->companyCustomer->phone ?? null; $voucherCode = $companyCustomerServicePlan->companyPrepaidVoucher->voucher_code ?? null; @endphp @if($voucherCode != "") Voucher Code {{ $voucherCode }} @elseif($phone != "") @if($companyCustomerServicePlan->companyServicePlan->service_plan_id == 1) {{ $phone }} @else @php if(substr($phone, 0, 1) === '+') { $phone = substr($phone, 1); }else { if(substr($phone, 0, 1) === '0') { $phone = '254'.substr($phone, 1); }else { $phone = $phone; } } $message = "Greetings $companyCustomerServicePlan->profile_name, "; @endphp @endif @endif
Username: {{ $companyCustomerServicePlan->username?? preg_replace('/[^A-Za-z0-9 ]/', '', $companyCustomerServicePlan->profile_name) }}
Password: {{ $companyCustomerServicePlan->password }}
{{ $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') }}
Sub. Amnt: Tsh {{ number_format($companyCustomerServicePlan->monthly_sub_amount) }}
Bal: Tsh {{ number_format($companyCustomerServicePlan->Summary['totalBalance']) }}
{{ \Carbon\Carbon::parse($companyCustomerServicePlan->created_at)->format('d M Y') }}
at {{ \Carbon\Carbon::parse($companyCustomerServicePlan->created_at)->format('h:i A') }}
@if(Auth::user()->hasRole('Administrator')) @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.customers.service-plans.globally-change-expiry-date') @include('portal.companies.service-plans.record-payment') @endsection