close #600 Fixed: Erratic behavior of payment amount
This commit is contained in:
parent
adcc68991f
commit
80c5803da8
7
public/js/jquery/jquery.maskMoney.js
vendored
7
public/js/jquery/jquery.maskMoney.js
vendored
@ -616,12 +616,19 @@
|
||||
function maskValueStandard(value, settings) {
|
||||
var negative = (value.indexOf("-") > -1 && settings.allowNegative) ? "-" : "",
|
||||
onlyNumbers = value.replace(/[^0-9]/g, ""),
|
||||
valueWithoutSymbol = value.replace(settings.prefix, "").replace(settings.suffix, ""),
|
||||
input_precision = value.length - value.lastIndexOf(settings.decimal) - 1,
|
||||
integerPart = onlyNumbers.slice(0, onlyNumbers.length - input_precision),
|
||||
newValue,
|
||||
decimalPart,
|
||||
leadingZeros;
|
||||
|
||||
if (settings.suffix != '' && value.length != valueWithoutSymbol.length) {
|
||||
input_precision = valueWithoutSymbol.length - valueWithoutSymbol.lastIndexOf(settings.decimal) - 1;
|
||||
|
||||
integerPart = onlyNumbers.slice(0, onlyNumbers.length - input_precision);
|
||||
}
|
||||
|
||||
newValue = buildIntegerPart(integerPart, negative, settings);
|
||||
|
||||
if (settings.precision > 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user