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) ) {
|
if (!isNaN(amount) ) {
|
||||||
|
|
||||||
// round
|
// round
|
||||||
amount = Math.round(amount * 100) / 100;
|
amount=runden(amount)
|
||||||
|
|
||||||
// is tax a number?
|
// is tax a number?
|
||||||
if (!isNaN(inputtax.val())) {
|
if (!isNaN(inputtax.val())) {
|
||||||
|
|
@ -194,14 +194,14 @@
|
||||||
brutto=amount;
|
brutto=amount;
|
||||||
}
|
}
|
||||||
// round brutto
|
// round brutto
|
||||||
brutto = Math.round(brutto * 100) / 100;
|
brutto=runden(brutto);
|
||||||
total = total + brutto;
|
total = total + brutto;
|
||||||
// round total
|
// round total
|
||||||
total = Math.round(total * 100) / 100;
|
total=runden(total);
|
||||||
|
|
||||||
netto = netto + amount;
|
netto = netto + amount;
|
||||||
// round net
|
// round net
|
||||||
netto = Math.round(netto * 100) / 100;
|
netto = runden(netto);
|
||||||
|
|
||||||
|
|
||||||
// update netto column
|
// update netto column
|
||||||
|
|
@ -223,7 +223,7 @@
|
||||||
|
|
||||||
// compute total tax
|
// compute total tax
|
||||||
var total_tax=total-netto;
|
var total_tax=total-netto;
|
||||||
total_tax = Math.round(total_tax * 100) / 100;
|
total_tax = runden(total_tax);
|
||||||
|
|
||||||
// update total netto and tax
|
// update total netto and tax
|
||||||
netto=convertToCurrency(netto);
|
netto=convertToCurrency(netto);
|
||||||
|
|
@ -238,11 +238,12 @@
|
||||||
$("[data-id='orderlist_summary']", ".imixs-orderitems").append(total);
|
$("[data-id='orderlist_summary']", ".imixs-orderitems").append(total);
|
||||||
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").empty();
|
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").empty();
|
||||||
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").append(netto);
|
$("[data-id='orderlist_summary_net']", ".imixs-orderitems").append(netto);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function runden(x) {
|
||||||
|
return Math.round((x*100).toFixed(2))/100;
|
||||||
|
}
|
||||||
|
|
||||||
function convertToNumber(currency) {
|
function convertToNumber(currency) {
|
||||||
// has ,?
|
// has ,?
|
||||||
if (currency && currency.indexOf(',')>-1) {
|
if (currency && currency.indexOf(',')>-1) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue