Merge pull request #24631 from AfshanKhan/fix-valuation-errror-customer-provided

fix: check if customer provided item while setting opening stock
This commit is contained in:
Marica 2021-02-22 20:10:27 +05:30 committed by GitHub
commit 214951a9c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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