mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 07:28:39 +00:00
fix: dont overwrite rate with 0 if not found
This commit is contained in:
@@ -201,7 +201,9 @@ class MaterialRequest(BuyingController):
|
|||||||
),
|
),
|
||||||
item.item_code,
|
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(
|
frappe.msgprint(
|
||||||
_("Item rates have been updated based on the selected Buying Price List {0}").format(
|
_("Item rates have been updated based on the selected Buying Price List {0}").format(
|
||||||
self.buying_price_list
|
self.buying_price_list
|
||||||
|
|||||||
Reference in New Issue
Block a user