Revision 33d579af
Von Moritz Bunkus vor etwa 7 Jahren hinzugefügt
js/kivi.BankTransaction.js | ||
---|---|---|
19 | 19 |
url: 'controller.pl?action=BankTransaction/ajax_payment_suggestion&bt_id=' + bank_transaction_id + '&prop_id=' + proposal_id, |
20 | 20 |
success: function(data) { |
21 | 21 |
$('#assigned_invoices_' + bank_transaction_id).append(data.html); |
22 |
ns.update_invoice_amount(bank_transaction_id); |
|
22 | 23 |
} |
23 | 24 |
}); |
24 | 25 |
}; |
... | ... | |
26 | 27 |
ns.delete_invoice = function(bank_transaction_id, proposal_id) { |
27 | 28 |
$( "#" + bank_transaction_id + "\\." + proposal_id ).remove(); |
28 | 29 |
$('[data-proposal-id=' + proposal_id + ']').show(); |
30 |
ns.update_invoice_amount(bank_transaction_id); |
|
29 | 31 |
}; |
30 | 32 |
|
31 | 33 |
ns.create_invoice = function(bank_transaction_id) { |
... | ... | |
59 | 61 |
success: function(new_html) { |
60 | 62 |
$('#assigned_invoices_' + bank_transaction_id).append(new_html); |
61 | 63 |
$('#assign_invoice_window').dialog('close'); |
64 |
ns.update_invoice_amount(bank_transaction_id); |
|
62 | 65 |
} |
63 | 66 |
}); |
64 | 67 |
} |
65 | 68 |
|
69 |
ns.update_invoice_amount = function(bank_transaction_id) { |
|
70 |
var $container = $('#invoice_amount_' + bank_transaction_id); |
|
71 |
var amount = $container.data('invoice-amount') * 1; |
|
72 |
|
|
73 |
$('[id^="' + bank_transaction_id + '."]').each(function(idx, elt) { |
|
74 |
amount += $(elt).data('invoice-amount'); |
|
75 |
}); |
|
76 |
|
|
77 |
$container.html(kivi.format_amount(amount, 2)); |
|
78 |
}; |
|
79 |
|
|
66 | 80 |
ns.init_list = function(ui_tab) { |
67 | 81 |
$('#check_all').checkall('INPUT[name^="proposal_ids"]'); |
82 |
|
|
68 | 83 |
$('.sort_link').each(function() { |
69 | 84 |
var _href = $(this).attr("href"); |
70 | 85 |
$(this).attr("href", _href + "&filter.fromdate=" + $('#filter_fromdate').val() + "&filter.todate=" + $('#filter_todate').val()); |
Auch abrufbar als: Unified diff
Kontoauszug verbuchen: Spalte »Zugewiesen« bei Zuweisungsänderung neu berechnen