Skip to content

Commit

Permalink
fix: dont update rate of free item on save
Browse files Browse the repository at this point in the history
(cherry picked from commit 6591e76)
  • Loading branch information
mihir-kandoi authored and mergify[bot] committed Feb 12, 2025
1 parent da08b4e commit 1d3da4d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ def set_missing_item_details(self, for_validate=False):
and item.get("use_serial_batch_fields")
)
):
if fieldname == "batch_no" and not item.batch_no:
if fieldname == "batch_no" and not item.batch_no and not item.is_free_item:
item.set("rate", ret.get("rate"))
item.set("price_list_rate", ret.get("price_list_rate"))
item.set(fieldname, value)
Expand Down

0 comments on commit 1d3da4d

Please sign in to comment.