Skip to content

Commit

Permalink
Fixes missing units calculation with minimum order quantity
Browse files Browse the repository at this point in the history
  • Loading branch information
lentschi committed Jul 22, 2022
1 parent fda2bb4 commit 354a0b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/group-order-form.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class GroupOrderForm {

calcMissingItems(packSize, quantity, tolerance, minimumOrderQuantity) {
if (quantity + tolerance < minimumOrderQuantity) {
return minimumOrderQuantity - quantity + tolerance;
return minimumOrderQuantity - quantity - tolerance;
}

var remainder = quantity % packSize
Expand Down

0 comments on commit 354a0b6

Please sign in to comment.