fix - kaufmaenisch runden
This commit is contained in:
parent
e938adbcdc
commit
18370bbe58
1 changed files with 9 additions and 8 deletions
|
|
@ -182,7 +182,7 @@
|
|||
if (!isNaN(amount) ) {
|
||||
|
||||
// round
|
||||
amount = Math.round(amount * 100) / 100;
|
||||
amount=runden(amount)
|
||||
|
||||
// is tax a number?
|
||||
if (!isNaN(inputtax.val())) {
|
||||
|
|
@ -194,14 +194,14 @@
|
|||
brutto=amount;
|
||||
}
|
||||
// round brutto
|
||||
brutto = Math.round(brutto * 100) / 100;
|
||||
brutto=runden(brutto);
|
||||
total = total + brutto;
|
||||
// round total
|
||||
total = Math.round(total * 100) / 100;
|
||||
total=runden(total);
|
||||
|
||||
netto = netto + amount;
|
||||
// round net
|
||||
netto = Math.round(netto * 100) / 100;
|
||||
netto = runden(netto);
|
||||
|
||||
|
||||
// update netto column
|
||||
|
|
@ -223,7 +223,7 @@
|
|||
|
||||
// compute total tax
|
||||
var total_tax=total-netto;
|
||||
total_tax = Math.round(total_tax * 100) / 100;
|
||||
total_tax = runden(total_tax);
|
||||
|
||||
// update total netto and tax
|
||||
netto=convertToCurrency(netto);
|
||||
|
|
@ -238,9 +238,10 @@
|
|||
$("[data-id='orderlist_summary']", ".imixs-orderitems").append(total);
|
||||
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").empty();
|
||||
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").append(netto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
function runden(x) {
|
||||
return Math.round((x*100).toFixed(2))/100;
|
||||
}
|
||||
|
||||
function convertToNumber(currency) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue