Merge pull request #46279 from rohitwaghchaure/fixed-support-32979

fix: rate changing on the deliver note
This commit is contained in:
rohitwaghchaure
2025-03-04 21:41:31 +05:30
committed by GitHub
2 changed files with 46 additions and 3 deletions

View File

@@ -825,11 +825,15 @@ class AccountsController(TransactionBase):
and item.get("use_serial_batch_fields")
)
):
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)
if fieldname == "batch_no" and item.batch_no and not item.is_free_item:
if ret.get("rate"):
item.set("rate", ret.get("rate"))
if not item.get("price_list_rate") and ret.get("price_list_rate"):
item.set("price_list_rate", ret.get("price_list_rate"))
elif fieldname in ["cost_center", "conversion_factor"] and not item.get(
fieldname
):