Allow editing of linked deliveries and orders at invoice
This commit is contained in:
parent
14e2fd179e
commit
efb929e64f
12 changed files with 72 additions and 34 deletions
14
app/views/finance/invoices/_form_js.html.haml
Normal file
14
app/views/finance/invoices/_form_js.html.haml
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
- content_for :javascript do
|
||||
:javascript
|
||||
$(function() {
|
||||
if ($('#invoice_delivery_ids').length)
|
||||
$('#invoice_delivery_ids').select2();
|
||||
$('#invoice_order_ids').select2();
|
||||
$('#invoice_supplier_id').change(function(e) {
|
||||
$.ajax({
|
||||
url: '#{form_on_supplier_id_change_finance_invoices_path}',
|
||||
type: 'get',
|
||||
data: {invoice_id: #{invoice_id}, supplier_id: $('#invoice_supplier_id').val()}
|
||||
});
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue