sync(dev): fehlende Admin-Theme-Assets vom Live-Stand ergaenzt (nichts ueberschrieben)
This commit is contained in:
@@ -0,0 +1,65 @@
|
||||
/*
|
||||
* @package Easyway Shop
|
||||
* @copyright Copyright (C) 2005 - 2011 TA-EDV
|
||||
* @license proprietary
|
||||
* @author John T. Daly <jd@ta-edv.de>
|
||||
*
|
||||
* Easyway Shop is a web e-commerce system
|
||||
*/
|
||||
|
||||
var easywayShopFunctions = {
|
||||
|
||||
clean_number: function(num) {
|
||||
num = num.replace(/,/, '.');
|
||||
|
||||
return num;
|
||||
},
|
||||
|
||||
getNetPriceFromGrossPrice: function(grossPrice, taxRate) {
|
||||
var netPrice;
|
||||
|
||||
if (grossPrice > 0) {
|
||||
netPrice = (grossPrice / (100.0 + taxRate) * 100.0).toFixed(4);
|
||||
} else {
|
||||
netPrice = '';
|
||||
}
|
||||
|
||||
return netPrice;
|
||||
},
|
||||
|
||||
getTaxesFromGrossPrice: function(grossPrice, taxRate) {
|
||||
var taxes;
|
||||
|
||||
if (grossPrice > 0) {
|
||||
taxes = (grossPrice / (100.0 + taxRate) * taxRate).toFixed(4);
|
||||
} else {
|
||||
taxes = '';
|
||||
}
|
||||
|
||||
return taxes;
|
||||
},
|
||||
|
||||
getGrossPriceFromNetPrice: function(netPrice, taxRate) {
|
||||
var grossPrice;
|
||||
|
||||
if (netPrice > 0) {
|
||||
grossPrice = (netPrice * (100.0 + taxRate) / 100.0).toFixed(4);
|
||||
} else {
|
||||
grossPrice = '';
|
||||
}
|
||||
|
||||
return grossPrice
|
||||
},
|
||||
|
||||
getTaxesFromNetPrice: function(netPrice, taxRate) {
|
||||
var taxes;
|
||||
|
||||
if (netPrice > 0) {
|
||||
taxes = (netPrice * (taxRate) / 100.0).toFixed(4);
|
||||
} else {
|
||||
taxes = '';
|
||||
}
|
||||
|
||||
return taxes
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user