fix: ignore pricing rule in all transactions
diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py
index d86b6c7..994b903 100644
--- a/erpnext/controllers/accounts_controller.py
+++ b/erpnext/controllers/accounts_controller.py
@@ -407,11 +407,19 @@
if item_qty != len(get_serial_nos(item.get('serial_no'))):
item.set(fieldname, value)
- elif ret.get("pricing_rule_removed") and value is not None \
- and fieldname in [
- 'discount_percentage', 'discount_amount', 'rate',
- 'margin_rate_or_amount', 'margin_type', 'remove_free_item'
- ]:
+ elif (
+ ret.get("pricing_rule_removed")
+ and value is not None
+ and fieldname
+ in [
+ "discount_percentage",
+ "discount_amount",
+ "rate",
+ "margin_rate_or_amount",
+ "margin_type",
+ "remove_free_item",
+ ]
+ ):
# reset pricing rule fields if pricing_rule_removed
item.set(fieldname, value)