fix: check if customer provided item while setting opening stock

This commit is contained in:
Afshan 2021-02-15 15:00:37 +05:30
parent fd4e7bdbb1
commit e963362dfd

View File

@ -177,7 +177,7 @@ class Item(WebsiteGenerator):
if not self.valuation_rate and self.standard_rate:
self.valuation_rate = self.standard_rate
if not self.valuation_rate:
if not self.valuation_rate and not self.is_customer_provided_item:
frappe.throw(_("Valuation Rate is mandatory if Opening Stock entered"))
from erpnext.stock.doctype.stock_entry.stock_entry_utils import make_stock_entry