STPH#31071 FIN: tijdens factuurinvoer is optelling ex BTW gewenst

svn path=/Website/trunk/; revision=25870
This commit is contained in:
Erik Groener
2015-08-07 07:43:35 +00:00
parent cd310cbd3d
commit 723f0ed626
2 changed files with 11 additions and 3 deletions

View File

@@ -1393,6 +1393,10 @@ fin = { func_enabled_factuur: // Wat mag ik zoal op deze specifieke factuur?
+ "<table>"
+ "<input type='hidden' id='rowIndex' name='rowIndex' value='" + rowIndex + "'>"
+ "<tr>"
+ "<td class='label'><label>" + L("lcl_fin_totaal_bedrag") + ":</label></td>"
+ "<td id='totalEXC_txt'>" + S("currency_pref") + " " + safe.curr(fin_factuur.fin_totaal) + " " + S("currency_suff") + "</td>"
+ "</tr>"
+ "<tr>"
+ "<td class='label'><label>" + L("lcl_fin_totaal_bedrag_btw") + ":</label></td>"
+ "<td id='totalBTW_txt'>" + S("currency_pref") + " " + safe.curr(fin_factuur.fin_totaal + fin_factuur.fin_totaal_btw) + " " + S("currency_suff") + "</td>"
+ "</tr>"

View File

@@ -463,11 +463,15 @@ function setPrice(obj)
}
// Nu totaal bijwerken
var totalBTW = 0;
$("table#sel_items input[id^=sumBTW]").each(function()
var totalEXC = 0;
$("table#sel_items input[id^=sum]").each(function()
{
totalBTW += myParseFloat($(this).val());
if (this.id.substr(0,6) == "sumBTW")
totalBTW += myParseFloat($(this).val());
else
totalEXC += myParseFloat($(this).val());
});
$("#totalEXC_txt").html(currency_pref + num2curr(totalEXC) + currency_suff);
$("#totalBTW_txt").html(currency_pref + num2curr(totalBTW) + currency_suff);
}