@php $payment = $payment ?? null; $isEdit = (bool) $payment; $formAction = $isEdit ? route('admin.payments.update', $payment) : route('admin.payments.store'); @endphp
@csrf @if($isEdit) @method('PUT') @endif
{{ $isEdit ? 'Edit' : 'Add New' }} {{ $typeLabel }}

Enter payment details{{ $isAdvance ? '' : ' and apply to unpaid documents' }}.

@if($isReceived) @include('partials.admin.client-picker', [ 'selectedCustomerId' => old('customer_id', $payment?->customer_id), 'customers' => $customers, 'placeholder' => 'Select Client', ]) @else
    @endif

    Select {{ $isReceived ? 'a client' : 'a vendor' }} to view billing address.

    GSTIN:

    {{ $isReceived ? 'Amount received' : 'Amount paid' }}: ₹ 0.00
    @if(! $isAdvance)
    Unpaid documents
    Date Number Amount Amount due Payment value
    Select {{ $isReceived ? 'a client' : 'a vendor' }} to load unpaid documents.
    {{ $isReceived ? 'Amount received' : 'Amount paid' }} ₹ 0.00
    Amount used for payments ₹ 0.00
    Amount in excess ₹ 0.00
    @else
    {{ $isReceived ? 'Amount received' : 'Amount paid' }}: ₹ 0.00
    @endif
    @push('scripts') @if($isReceived) @php $clientsJson = $customersJson ?? []; $clientEditPattern = str_replace('/0/edit', '/__ID__/edit', route('admin.customers.edit', ['customer' => 0])); @endphp @endif @endpush