From: Peter Schulgin Date: Mon, 6 Jan 2014 10:34:52 +0000 (+0100) Subject: Merge branch 'master' of github.com:kivitendo/kivitendo-erp X-Git-Tag: release-3.1.0beta1~22^2~62 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/09e653517a73f8df4992a12dd0f995b72abe9977?hp=67b9c398c20060b6fc0ca5eec8e63f1a263571bf Merge branch 'master' of github.com:kivitendo/kivitendo-erp --- diff --git a/templates/webpages/gl/form_header.html b/templates/webpages/gl/form_header.html index ec175696d..98bb8f067 100644 --- a/templates/webpages/gl/form_header.html +++ b/templates/webpages/gl/form_header.html @@ -8,18 +8,15 @@ function updateTaxes(row) { var accno = document.getElementById('accno_' + row); var taxkey = accno.options[accno.selectedIndex].value; - var reg = /--([0-9]*)/; + var reg = /^(.*?)--(\d*)$/; var found = reg.exec(taxkey); - var index = found[1]; - index = parseInt(index); - var tax = 'taxchart_' + row; - var taxkeyposition = taxkey.lastIndexOf(found[0]); - var account = taxkey.substr(0, taxkeyposition); + var account = found[1]; + var default_tax_id = found[2]; $.ajax({ url: 'gl.pl?action=get_tax_dropdown', data: { accno: account, - selected_index: index}, + selected_tax_id: default_tax_id}, dataType: 'html', success: function (new_html) { $("#taxchart_" + row).html(new_html); diff --git a/templates/webpages/gl/update_tax_accounts.html b/templates/webpages/gl/update_tax_accounts.html index 940d34dfe..d3c9586b2 100644 --- a/templates/webpages/gl/update_tax_accounts.html +++ b/templates/webpages/gl/update_tax_accounts.html @@ -1,3 +1,4 @@ +[% USE L %] [% FOR row = TAX_ACCOUNTS %] - + [% END %]