test: item price on remove pricing rule
(cherry picked from commit b8c41e3030)
# Conflicts:
# erpnext/accounts/doctype/pricing_rule/test_pricing_rule.py
This commit is contained in:
committed by
mergify-bot
parent
78c5f34286
commit
fc67f02ffc
@@ -408,6 +408,14 @@ class AccountsController(TransactionBase):
|
||||
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'
|
||||
]:
|
||||
# reset pricing rule fields if pricing_rule_removed
|
||||
item.set(fieldname, value)
|
||||
|
||||
if self.doctype in ["Purchase Invoice", "Sales Invoice"] and item.meta.get_field('is_fixed_asset'):
|
||||
item.set('is_fixed_asset', ret.get('is_fixed_asset', 0))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user