Merge pull request #97 from balkansalat/rails3-stockit-increase

Fix stockit increase formula in javascript
This commit is contained in:
bennibu 2013-03-17 11:34:16 -07:00
commit bd0c251313

View file

@ -49,7 +49,7 @@ function addData(orderArticleId, itemPrice, itemUnit, itemSubtotal, itemQuantity
function increaseQuantity(item) { function increaseQuantity(item) {
var value = Number($('#q_' + item).val()) + 1; var value = Number($('#q_' + item).val()) + 1;
if (!isStockit || (value <= (quantityAvailable[item] - quantityOthers[item]))) { if (!isStockit || (value <= (quantityAvailable[item] + itemsAllocated[item]))) {
update(item, value, $('#t_' + item).val()); update(item, value, $('#t_' + item).val());
} }
} }