From 32083213198072e55e2291acb580b90467c40e7d Mon Sep 17 00:00:00 2001 From: Julius Date: Thu, 14 Mar 2013 21:55:10 +0100 Subject: [PATCH] Fix stockit increase formula for present behavior --- app/assets/javascripts/ordering.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/ordering.js b/app/assets/javascripts/ordering.js index ac61155a..a75d0541 100644 --- a/app/assets/javascripts/ordering.js +++ b/app/assets/javascripts/ordering.js @@ -49,7 +49,7 @@ function addData(orderArticleId, itemPrice, itemUnit, itemSubtotal, itemQuantity function increaseQuantity(item) { 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()); } }