mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Fixed price detail autofill for min discount quantity.
This commit is contained in:
parent
a3c626d0ab
commit
502febb008
1 changed files with 4 additions and 0 deletions
|
@ -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)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue