fixes
This commit is contained in:
@@ -1 +0,0 @@
|
||||
@include('Admin.Shop.InvoicePayments.form')
|
||||
@@ -1,5 +1,7 @@
|
||||
f{{ Form::open(['route' => 'Admin.Shop.InvoicePayments.store', 'id' => 'invoice_payment-form', 'autocomplete' => 'off']) }}
|
||||
{{ 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">
|
||||
@@ -43,4 +45,5 @@ f{{ Form::open(['route' => 'Admin.Shop.InvoicePayments.store', 'id' => 'invoice_
|
||||
|
||||
<script>
|
||||
initDatepicker();
|
||||
initSaveForm('#invoice_payment-form', '.modal-content .bootbox-accept');
|
||||
</script>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@extends('layout.index', [
|
||||
'title' => 'Factures',
|
||||
'subtitle' => 'Edition d\'une facture',
|
||||
'breadcrumb' => ['Articles'],
|
||||
'breadcrumb' => ['Factures'],
|
||||
])
|
||||
|
||||
@section('content')
|
||||
|
||||
@@ -67,3 +67,4 @@
|
||||
</form>
|
||||
|
||||
@include('load.layout.modal')
|
||||
@include('load.form.save')
|
||||
|
||||
@@ -21,6 +21,10 @@
|
||||
<td>{{ $payment_types[$payment['payment_type']] }}</td>
|
||||
<td class="text-right font-weight-bold">{{ sprintf('%01.2f', $payment['amount']) }} €</td>
|
||||
<td>{{ $payment['reference'] }}</td>
|
||||
<td class="text-right">
|
||||
<x-form.buttons.edit :dataId="$payment['id']" class="payment-edit btn-xs" />
|
||||
<x-form.buttons.delete :dataId="$payment['id']" class="payment-delete btn-xs" />
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
@@ -34,9 +38,15 @@
|
||||
$('#add_payment').click(function() {
|
||||
InvoicePaymentCreate();
|
||||
});
|
||||
$('.payment-edit').click(function() {
|
||||
InvoicePaymentEdit($(this).data('id'));
|
||||
});
|
||||
$('.payment-delete').click(function() {
|
||||
InvoicePaymentDelete($(this).data('id'));
|
||||
});
|
||||
|
||||
function InvoicePaymentCreate() {
|
||||
var url_open = "{{ route('Admin.Shop.InvoicePayments.create') }}";
|
||||
var url_open = "{{ route('Admin.Shop.InvoicePayments.create') }}/{{ $invoice['id'] }}";
|
||||
var url_save = "{{ route('Admin.Shop.InvoicePayments.store') }}";
|
||||
openModal("Ajouter un paiement", '#invoice_payment-form', url_open, url_save,
|
||||
"InvoicePaymentRefresh();", 'sm');
|
||||
@@ -49,8 +59,11 @@
|
||||
"InvoicePaymentRefresh();", 'sm');
|
||||
}
|
||||
|
||||
function InvoicePaymentRefresh() {
|
||||
|
||||
function InvoicePaymentDelete(id) {
|
||||
var url = "{{ route('Admin.Shop.InvoicePayments.destroy') }}/" + id;
|
||||
$.get(url, function() {
|
||||
window.location = "{{ route('Admin.Shop.Invoices.edit') }}/{{ $invoice['id'] }}";
|
||||
});
|
||||
}
|
||||
</script>
|
||||
@endpush
|
||||
|
||||
Reference in New Issue
Block a user