mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-24 00:58:29 +00:00
fix: zero valuation rate popup on SI (#54376)
This commit is contained in:
@@ -142,14 +142,19 @@ class StockController(AccountsController):
|
||||
]:
|
||||
for item in self.get("items"):
|
||||
if (
|
||||
(item.get("valuation_rate") == 0 or item.get("incoming_rate") == 0)
|
||||
(
|
||||
item.get("valuation_rate") == 0
|
||||
or (item.get("incoming_rate") == 0 and self.get("update_stock", 1))
|
||||
)
|
||||
and item.get("allow_zero_valuation_rate") == 0
|
||||
and frappe.get_cached_value("Item", item.item_code, "is_stock_item")
|
||||
):
|
||||
frappe.toast(
|
||||
_(
|
||||
"Row #{0}: Item {1} has zero rate but 'Allow Zero Valuation Rate' is not enabled."
|
||||
).format(item.idx, frappe.bold(item.item_code)),
|
||||
_("Row #{0}: Item {1} has zero rate but '{2}' is not enabled.").format(
|
||||
item.idx,
|
||||
frappe.bold(item.item_code),
|
||||
item.meta.get_label("allow_zero_valuation_rate"),
|
||||
),
|
||||
indicator="orange",
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user