X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/69e03937db84180c261015cedb3a97c01c017477..6c0095f1ec3bff00c172cc2c7649e757960da9fd:/js/kivi.BankTransaction.js diff --git a/js/kivi.BankTransaction.js b/js/kivi.BankTransaction.js index 0c1346340..a0a0f0fe4 100644 --- a/js/kivi.BankTransaction.js +++ b/js/kivi.BankTransaction.js @@ -140,4 +140,20 @@ namespace('kivi.BankTransaction', function(ns) { } }); }; + ns.update_skonto = function(caller, bt_id, prop_id, formatted_amount_with_skonto_pt) { + if (caller.value === 'free_skonto') { + $('#free_skonto_amount_' + bt_id + '_' + prop_id).val(""); + $('#free_skonto_amount_' + bt_id + '_' + prop_id).prop('disabled', false); + $('#free_skonto_amount_' + bt_id + '_' + prop_id).focus(); + } + if (caller.value === 'without_skonto') { + $('#free_skonto_amount_' + bt_id + '_' + prop_id).val(kivi.format_amount(0,2)); + $('#free_skonto_amount_' + bt_id + '_' + prop_id).prop('disabled', true); + } + if (caller.value === 'with_skonto_pt') { + $('#free_skonto_amount_' + bt_id + '_' + prop_id).val(formatted_amount_with_skonto_pt); + $('#free_skonto_amount_' + bt_id + '_' + prop_id).prop('disabled', true); + } + }; + });