mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 03:29:16 +00:00
Fix : None handling in pricing rule free item quantity calculation (#54375)
* fix(pricing_rule): handle None qty in transaction_qty calculation
* Update erpnext/accounts/doctype/pricing_rule/utils.py
---------
(cherry picked from commit 82438d6c72)
Co-authored-by: Jaganath-Tridots <jaganath@tridotstech.com>
Co-authored-by: Jagan <jagan@DESKTOP-HPDMQ06.localdomain>
Co-authored-by: Mihir Kandoi <kandoimihir@gmail.com>
This commit is contained in:
@@ -658,7 +658,7 @@ def get_product_discount_rule(pricing_rule, item_details, args=None, doc=None):
|
|||||||
if pricing_rule.is_recursive:
|
if pricing_rule.is_recursive:
|
||||||
transaction_qty = sum(
|
transaction_qty = sum(
|
||||||
[
|
[
|
||||||
row.qty
|
flt(row.qty)
|
||||||
for row in doc.items
|
for row in doc.items
|
||||||
if not row.is_free_item
|
if not row.is_free_item
|
||||||
and row.item_code == args.item_code
|
and row.item_code == args.item_code
|
||||||
|
|||||||
Reference in New Issue
Block a user