From 8860378757ea29259d37485bc252ab982c1772ba Mon Sep 17 00:00:00 2001 From: James Cole Date: Fri, 25 Nov 2016 19:06:06 +0100 Subject: [PATCH] Fix budget in split journals. --- public/js/ff/split/journal/from-store.js | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/public/js/ff/split/journal/from-store.js b/public/js/ff/split/journal/from-store.js index e8b99b09d4..2c5ef2c40c 100644 --- a/public/js/ff/split/journal/from-store.js +++ b/public/js/ff/split/journal/from-store.js @@ -69,13 +69,6 @@ function cloneRow() { source.removeClass('initial-row'); source.find('.count').text('#' + count); - // // get each input, change the name? - // $.each(source.find('input, select'), function (i, v) { - // var obj = $(v); - // var name = obj.attr('name').replace('[0]', '[' + index + ']'); - // obj.attr('name', name); - // }); - source.find('input[name$="][amount]"]').val("").on('input', calculateSum); if (destAccounts.length > 0) { console.log('Will be able to extend dest-accounts.'); @@ -158,7 +151,7 @@ function resetSplits() { console.log('amount is now ' + input.attr('name')); }); // ends with ][budget_id] - $.each($('input[name$="][budget_id]"]'), function (i, v) { + $.each($('select[name$="][budget_id]"]'), function (i, v) { var input = $(v); input.attr('name', 'transactions[' + i + '][budget_id]'); console.log('budget_id is now ' + input.attr('name'));