@extends('customers.layout') @section('customer-content')

Customer Information

Detailed customer profile and account information

View Statement Edit @if($customer->AccountStatus === 'A')
@csrf @method('POST')
@else @endif

{{ $customer->CustomerName }}

{{ $customer->AccountStatus === 'A' ? 'Active' : 'Inactive' }} {{ ucfirst(strtolower($customer->AccountType)) }}
@if($customer->TenantName)

Tenant: {{ $customer->TenantName }}

@endif
Account Details
  • AccountNo
    {{ $customer->AccountNo }}
  • @if($customer->ClientCode)
  • ClientCode
    {{ $customer->ClientCode }}
  • @endif
Contact Information
Address
@if($customer->Address1)
Address1
{{ $customer->Address1 }}
@endif @if($customer->Address2)
Address2
{{ $customer->Address2 }}
@endif @if($customer->Address3)
Address3
{{ $customer->Address3 }}
@endif @if($customer->PostCode)
PostCode
{{ $customer->PostCode }}
@endif
@if($customer->unit)
Current Unit
{{ $customer->unit->property->PropName }}

Unit {{ $customer->unit->UnitIdentity }}

{{ $customer->unit->property->City }}

@endif
Contract
Contract Date {{ $customer->ContractDate ? $customer->ContractDate->format('M d, Y') : 'Not specified' }}
Deposit {{ $customer->Deposit ? 'Ksh ' . number_format($customer->Deposit, 2) : 'None' }}
@if($customer->DepositDate)
Paid on {{ $customer->DepositDate->format('M d, Y') }}
@endif
Meter Information
@if($customer->WMeterNo || $customer->EMeterNo)
@if($customer->WMeterNo)
Water Meter {{ $customer->WMeterNo }}
@if($customer->WInitialReading)
Initial: {{ $customer->WInitialReading }}
@endif @endif
@if($customer->EMeterNo)
Electricity Meter {{ $customer->EMeterNo }}
@if($customer->EInitialReading)
Initial: {{ $customer->EInitialReading }}
@endif @endif
@else

No meter information available

@endif
Customer Services
Assign Service
@if($customer->propServices->count() > 0)
@foreach($customer->propServices as $service)
{{ $service->ServiceName }}
@if($service->pivot->IsActive) Active @else Inactive @endif
{{ number_format($service->pivot->Price, 2) }} {{ config('app.currency', 'Ksh.') }}
Quantity: {{ $service->pivot->Quantity ?? 1 }}
{{ \Carbon\Carbon::parse($service->pivot->StartDate)->format('M d, Y') }} @if($service->pivot->EndDate) - {{ \Carbon\Carbon::parse($service->pivot->EndDate)->format('M d, Y') }} @else - No end date @endif
Total: {{ number_format(($service->pivot->Price * ($service->pivot->Quantity ?? 1)), 2) }} {{ config('app.currency', 'Ksh.') }}
@if($service->pivot->Notes)

Notes: {{ $service->pivot->Notes }}

@endif
Edit
@endforeach
@else
No services assigned

Get started by assigning a new service to this customer.

Assign Service
@endif
Billing History

View and manage customer bills and invoices

@if($customer->bills->count() > 0)
@foreach($customer->bills as $bill) @endforeach
Bill # Billing Date Period Amount (Ksh) Due Date Actions
{{ $bill->BillNo ?: $bill->BillID }} {{ $bill->BillingDate ? \Carbon\Carbon::parse($bill->BillingDate)->format('M d, Y') : 'N/A' }} {{ $bill->formatted_billing_period }} {{ number_format($bill->TotalBill, 2) }} @if($bill->DueDate < now()) Overdue @else {{$bill->DueDate}} @endif
@else
No Bills Found

There are no bills for this customer yet. Create a new bill to get started.

@endif
Payment History
@if($customer->payments->count() > 0)
@foreach($customer->payments as $payment) @endforeach
Receipt # Date Payment Method Amount Reference Actions
{{ $payment->ReceiptNo }} {{ \Carbon\Carbon::parse($payment->PaymentDate)->format('M d, Y') }} {{ $payment->PaymentMethod }} Ksh {{ number_format($payment->Amount, 2) }} {{ $payment->ReferenceNo ?? 'N/A' }}
@else
No payments found

Get started by recording a new payment.

@endif

Unit Assignment History

@if($customer->unitAssignments->count() > 0)
    @foreach($customer->unitAssignments as $index => $assignment)
  • @if($index !== $customer->unitAssignments->count() - 1) @endif
    @if($assignment->status === 'active') @elseif($assignment->status === 'terminated') @else @endif

    @if($assignment->status === 'active') Assigned to @elseif($assignment->status === 'terminated') Unassigned from @else Transferred from @endif {{ $assignment->unit->UnitIdentity }} @if($assignment->status === 'active') on {{ $assignment->start_date->format('M d, Y') }} @else on {{ $assignment->end_date?->format('M d, Y') ?? 'N/A' }} @endif

    @if($assignment->notes)

    {{ $assignment->notes }}

    @endif
    @if($assignment->status === 'active') @else @endif
  • @endforeach
@else

No assignment history

This customer has not been assigned to any units yet.

@endif
@push('scripts') @endpush @endsection