mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-18 06:22:12 +00:00
fix: ignore free item when qty is zero
(cherry picked from commit 7ae98f77ee)
This commit is contained in:
@@ -657,6 +657,9 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None):
|
|||||||
if pricing_rule.round_free_qty:
|
if pricing_rule.round_free_qty:
|
||||||
qty = math.floor(qty)
|
qty = math.floor(qty)
|
||||||
|
|
||||||
|
if not qty:
|
||||||
|
return
|
||||||
|
|
||||||
free_item_data_args = {
|
free_item_data_args = {
|
||||||
"item_code": free_item,
|
"item_code": free_item,
|
||||||
"qty": qty,
|
"qty": qty,
|
||||||
|
|||||||
Reference in New Issue
Block a user