@extends('admin.layouts.app') @section('title', $customer ? 'Edit Customer' : 'Add Customer') @push('styles') @endpush @section('content') @php $isEdit = $customer !== null; $pkgAmount = (float) ($customer?->PkgAmount ?? 0); $paidAmount = (float) ($customer?->PaidAmount ?? 0); $balAmount = $pkgAmount - $paidAmount; @endphp

Customers

@if ($isWebsiteRegistration)
Website registration request. This customer registered from the website. Review package, payment, and executive details, then set Status to Active to approve. Back to Registration Request
@endif @if ($isEdit && ($customer?->Options2 ?? '') === 'registration_sms_sent')
Registration WhatsApp already sent to this customer (will not send again).
@elseif ($isEdit && (int) $customer?->Status === 0)
Registration WhatsApp will be sent once when you set Status to Active.
@endif
@csrf @if ($isEdit) @method('PUT') @endif
Select an address from the list, drag the marker, or click on the map to set location.
Paste a Google Maps link to auto-detect latitude and longitude on edit.
@if (!empty($resolvedLocationFromLink))
Location loaded from Google Location Link. Review the map marker and save to store latitude and longitude.
@endif
@if ($isEdit && !empty($customer?->Photo))
@csrf @method('DELETE')
@endif
@php $assignedPackageId = (int) old('PackageId', $customer?->PackageId ?? 0); @endphp
@endsection @push('scripts') @endpush