Skip to content

Commit

Permalink
fix: packed item using expired price
Browse files Browse the repository at this point in the history
(cherry picked from commit 47ffa49)
  • Loading branch information
ruthra-kumar authored and mergify[bot] committed Sep 13, 2023
1 parent d278b11 commit 413b40f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/stock/doctype/packed_item/packed_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ def update_packed_item_price_data(pi_row, item_data, doc):
"conversion_rate": doc.get("conversion_rate"),
}
)
if not row_data.get("transaction_date"):
row_data.update({"transaction_date": doc.get("transaction_date")})

rate = get_price_list_rate(row_data, item_doc).get("price_list_rate")

pi_row.rate = rate or item_data.get("valuation_rate") or 0.0
Expand Down

0 comments on commit 413b40f

Please sign in to comment.