{{ Form::open(['route' => 'Admin.Shop.InvoicePayments.store', 'id' => 'invoice_payment-form', 'autocomplete' => 'off']) }}
<input type="hidden" name="id" id="id" value="{{ $invoice_payment['id'] ?? false }}">
<input type="hidden" name="invoice_id" id="invoice_id" value="{{ $invoice_id ?? false }}">


<div class="row mb-3">
    <div class="col-12">
        @include('components.form.datepicker', [
            'label' => 'Date',
            'name' => 'date',
            'value' => $invoice_payment['date'] ?? null,
        ])
    </div>
</div>
<div class="row mb-3">
    <div class="col-12">
        @include('components.form.select', [
            'label' => 'Règlement',
            'name' => 'payment_type',
            'list' => $payment_types ?? [],
            'value' => $invoice_payment['payment_type'] ?? null,
            'class' => 'select2',
        ])
    </div>
</div>
<div class="row mb-3">
    <div class="col-12">
        @include('components.form.inputs.money', [
            'label' => 'Montant',
            'name' => 'amount',
            'value' => $invoice_payment['amount'] ?? null,
        ])
    </div>
</div>
<div class="row mb-3">
    <div class="col-12">
        @include('components.form.input', [
            'label' => 'Référence',
            'name' => 'reference',
            'value' => $invoice_payment['reference'] ?? null,
        ])
    </div>
</div>
</form>

<script>
    initDatepicker();
    initSaveForm('#invoice_payment-form', '.modal-content .bootbox-accept');
</script>
