mirror of
https://github.com/frappe/erpnext.git
synced 2026-07-31 08:14:36 +00:00
fix: dont overwrite rate with 0 if not found
(cherry picked from commit 1ef3cd1d3f)
This commit is contained in:
@@ -220,7 +220,9 @@ class MaterialRequest(BuyingController):
|
||||
),
|
||||
item.item_code,
|
||||
)
|
||||
item.db_set({"rate": flt(rate), "amount": flt(flt(rate) * item.qty, item.precision("amount"))})
|
||||
if rate is not None:
|
||||
item.db_set({"rate": flt(rate), "amount": flt(flt(rate) * item.qty, item.precision("amount"))})
|
||||
|
||||
frappe.msgprint(
|
||||
_("Item rates have been updated based on the selected Buying Price List {0}").format(
|
||||
self.buying_price_list
|
||||
|
||||
Reference in New Issue
Block a user