Fixed price detail autofill for min discount quantity.

This commit is contained in:
Jan Böhmer 2020-03-08 19:04:34 +01:00
parent a3c626d0ab
commit 502febb008

View file

@ -41,6 +41,10 @@
//Determine the new value for the min_discount_qty
var new_min_amount = $("input[id$='min_discount_quantity_value']" , $holder).last().val();
//Assign a valid value, if no price are existing yet
if (typeof new_min_amount == "undefined") {
new_min_amount = 0;
}
new_min_amount = parseInt(new_min_amount) + 1;
//Determine the next exponent, 10 -> 100 -> 1000
new_min_amount = Math.pow(10, Math.ceil(Math.log10(new_min_amount)));