mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-01 19:29:10 +00:00
use validate value method to validate valuation rate should be greater than 0 in stock entry
This commit is contained in:
@@ -207,9 +207,8 @@ class DocType(TransactionBase):
|
||||
|
||||
def validate_incoming_rate(self):
|
||||
for d in getlist(self.doclist, 'mtn_details'):
|
||||
if not flt(d.incoming_rate) and d.t_warehouse:
|
||||
msgprint("Rate is mandatory for Item: %s at row %s" % (d.item_code, d.idx),
|
||||
raise_exception=1)
|
||||
if d.t_warehouse:
|
||||
self.validate_value("incoming_rate", ">", 0, d)
|
||||
|
||||
def validate_bom(self):
|
||||
for d in getlist(self.doclist, 'mtn_details'):
|
||||
|
||||
Reference in New Issue
Block a user