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

Edit Customer

Update the details for {{ $customer->CustomerName }}

@csrf @method('PUT')

Personal Information

@error('CustomerName')

{{ $message }}

@enderror
@error('TenantName')

{{ $message }}

@enderror
@error('TelNo')

{{ $message }}

@enderror
@error('Email')

{{ $message }}

@enderror
@error('Address1')

{{ $message }}

@enderror

Account Information

@error('AccountNo')

{{ $message }}

@enderror
@error('AccountType')

{{ $message }}

@enderror
@error('ContractDate')

{{ $message }}

@enderror
@error('AccountStatus')

{{ $message }}

@enderror

Deposit Information

Ksh
@error('Deposit')

{{ $message }}

@enderror
@error('DepositDate')

{{ $message }}

@enderror

Unit Assignment

You can assign this customer to a unit now or do it later from the unit management section.

@if($customer->unit) @endif

Meter Information

UnitID ? 'readonly' : '' }}>
UnitID ? 'readonly' : '' }}>

Services Assignment

@if($customer->UnitID && $customer->unit && $customer->unit->property) @php $propertyId = $customer->unit->property->PropID; $services = \App\Models\PropService::where('PropID', $propertyId) ->where('CompanyID', $customer->CompanyID) ->orderBy('ServiceName') ->get(); $customerServices = $customer->propServices->keyBy('IDService'); @endphp @forelse($services as $service) @php $isChecked = $customerServices->has($service->IDService); $pivot = $customerServices->get($service->IDService); $price = $isChecked ? $pivot->pivot->Price : $service->Price; $quantity = $isChecked ? $pivot->pivot->Quantity : 1; $startDate = $isChecked ? $pivot->pivot->StartDate : now()->format('Y-m-d'); @endphp
@empty
No services available for this property.
@endforelse @else
Please select a unit to view available services.
@endif
Cancel
@push('styles') @endpush @push('scripts') @endpush @endsection