Refactor orderfooter and quantity display
* Unit, others_quantitiy and other_tolerance is now in orderfooter * We display the missing units in the article row now.
This commit is contained in:
parent
646a6b11f5
commit
fd1eb8a1d7
5 changed files with 58 additions and 22 deletions
|
|
@ -109,6 +109,13 @@ function update(item, quantity, tolerance) {
|
|||
itemTotal[item] = price[item] * (Number(quantity));
|
||||
}
|
||||
$('price_' + item + '_display').update(asMoney(itemTotal[item]));
|
||||
|
||||
// update missing units
|
||||
missing_units = unit[item] - (((quantityOthers[item] + Number(quantity)) % unit[item]) + Number(tolerance) + toleranceOthers[item])
|
||||
if (missing_units < 0) {
|
||||
missing_units = 0;
|
||||
}
|
||||
$('missing_units_' + item).update(String(missing_units));
|
||||
|
||||
// update balance
|
||||
updateBalance();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue