@extends('layouts.app') @section('style') @endsection @section('content')
{{ strtoupper(substr($customer->name, 0, 1)) }}
Edit Customer: {{ $customer->name }}

Customer ID: {{ $customer->customer_code }}

@if($customer->customer_type == 'walk-in') Walk-in Customer @elseif($customer->customer_type == 'regular') Regular Customer @else Business Customer @endif
@if($errors->any())
Please fix the following errors:
    @foreach($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if(session('success'))
Success
{{ session('success') }}
@endif
@csrf @method('PUT')
Basic Information
@error('name')
{{ $message }}
@enderror
@error('customer_type')
{{ $message }}
@enderror
@error('company_name')
{{ $message }}
@enderror
@error('contact_person')
{{ $message }}
@enderror
Contact Information
@error('email')
{{ $message }}
@enderror
@error('phone')
{{ $message }}
@enderror
@error('address')
{{ $message }}
@enderror
VAT Information
is_vat_registered) ? 'checked' : '' }}>
Enable if customer is VAT registered
Format: VAT- followed by numbers
@error('vat_number')
{{ $message }}
@enderror
Business Information
@error('website')
{{ $message }}
@enderror
@error('tax_id')
{{ $message }}
@enderror
Account Settings
@error('status')
{{ $message }}
@enderror
KES @error('credit_limit')
{{ $message }}
@enderror
Current Balance: KES{{ number_format($customer->balance, 2) }} @if($customer->credit_limit) | Available Credit: KES{{ number_format($customer->available_credit, 2) }} @endif
% @error('discount_percent')
{{ $message }}
@enderror
Percentage discount on all purchases (0-100%)
Customer Statistics (Read-only)
Total Spent
KES{{ number_format($customer->total_spent, 2) }}
Total Orders
{{ $customer->total_orders }}
Avg. Order
KES{{ number_format($customer->average_order_value, 2) }}
Loyalty Points
{{ $customer->loyalty_points }}
Taxable Sales
KES{{ number_format($customer->taxable_sales, 2) }}
VAT Collected
KES{{ number_format($customer->vat_collected, 2) }}
Last Purchase: @if($customer->last_purchase_date) {{ $customer->last_purchase_date->format('M d, Y H:i') }} @else Never @endif
Additional Information
@error('notes')
{{ $message }}
@enderror
@endsection @section('script') @endsection