Skip to content

Commit 837fa29

Browse files
committed
fix: properly applying kit discounts on subtotal with proportional quantity
1 parent 318f093 commit 837fa29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

functions/lib/helpers.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ const getValidDiscountRules = (discountRules, params, itemsForKit) => {
126126
return item.quantity + acc
127127
}, 0)
128128
if (totalQuantity > rule.min_quantity) {
129-
value *= (totalQuantity / rule.min_quantity)
129+
value *= (rule.min_quantity / totalQuantity)
130130
}
131131
}
132132
}

0 commit comments

Comments
 (0)