{{ __('messages.payment.add_payment') }}

{{ Form::open(['id' => 'paymentForm']) }}
{{ Form::label('invoice', __('messages.invoice.invoice') . ':', ['class' => 'form-label required mb-3']) }} {{ Form::select('invoice_id', $invoice, null, ['id' => 'invoice_id', 'class' => 'form-select invoice ', 'placeholder' => __('messages.invoice.invoice'), 'required', 'data-control' => 'select2']) }}
{{ Form::label('due_amount', __('messages.invoice.due_amount') . ':', ['class' => 'form-label mb-3']) }}
{{ Form::text('due_amount', null, ['id' => 'due_amount', 'class' => 'form-control ', 'placeholder' => __('messages.invoice.due_amount'), 'readonly', 'disabled']) }} {{ getCurrencySymbol() }}
{{ Form::label('paid_amount', __('messages.invoice.paid_amount') . ':', ['class' => 'form-label mb-3']) }}
{{ Form::text('paid_amount', null, ['id' => 'paid_amount', 'class' => 'form-control ', 'placeholder' => __('messages.invoice.paid_amount'), 'readonly', 'disabled']) }} {{ getCurrencySymbol() }}
{{ Form::label('payment_date', __('messages.payment.payment_date') . ':', ['class' => 'form-label required mb-3']) }} {{ Form::text('payment_date', null, ['class' => 'form-control ', 'id' => 'payment_date', 'autocomplete' => 'off', 'required', 'data-focus' => 'false']) }}
{{ Form::label('amount', __('messages.invoice.amount') . ':', ['class' => 'form-label required mb-3']) }}
{{ Form::number('amount', null, ['id' => 'amount', 'class' => 'form-control amount d-flex', 'step' => 'any', 'oninput' => "validity.valid||(value=value.replace(/[e\+\-]/gi,''))", 'min' => '1', 'pattern' => "^\d*(\.\d{0,2})?$", 'required', 'placeholder' => __('messages.invoice.amount')]) }} {{ getCurrencySymbol() }}
{{ Form::label('payment_mode', __('messages.payment.payment_mode') . ':', ['class' => 'form-label required mb-3']) }} {{ Form::text('payment_mode', 'Cash', ['id' => 'adminPaymentMode', 'readonly', 'class' => 'form-control ']) }}
{{ Form::label('notes', __('messages.invoice.note') . ':', ['class' => 'form-label required mb-3']) }} {{ Form::textarea('notes', null, ['id' => 'payment_note', 'class' => 'form-control ', 'rows' => '5', 'required']) }}
{{ Form::button(__('messages.common.pay'), ['type' => 'submit', 'class' => 'btn btn-primary me-2', 'id' => 'btnPay', 'data-loading-text' => " Processing...", 'data-new-text' => __('messages.common.pay')]) }}
{{ Form::close() }}