mirror of
https://github.com/frappe/erpnext.git
synced 2026-06-04 20:59:11 +00:00
[minor] validation message in serial no
This commit is contained in:
@@ -40,19 +40,14 @@ class DocType(StockController):
|
|||||||
self.on_stock_ledger_entry()
|
self.on_stock_ledger_entry()
|
||||||
|
|
||||||
def validate_amc_status(self):
|
def validate_amc_status(self):
|
||||||
"""
|
|
||||||
validate amc status
|
|
||||||
"""
|
|
||||||
if (self.doc.maintenance_status == 'Out of AMC' and self.doc.amc_expiry_date and getdate(self.doc.amc_expiry_date) >= datetime.date.today()) or (self.doc.maintenance_status == 'Under AMC' and (not self.doc.amc_expiry_date or getdate(self.doc.amc_expiry_date) < datetime.date.today())):
|
if (self.doc.maintenance_status == 'Out of AMC' and self.doc.amc_expiry_date and getdate(self.doc.amc_expiry_date) >= datetime.date.today()) or (self.doc.maintenance_status == 'Under AMC' and (not self.doc.amc_expiry_date or getdate(self.doc.amc_expiry_date) < datetime.date.today())):
|
||||||
msgprint("AMC expiry date and maintenance status mismatch. Please verify", raise_exception=1)
|
webnotes.throw(self.doc.name + ": " +
|
||||||
|
_("AMC expiry date and maintenance status mismatched"))
|
||||||
|
|
||||||
def validate_warranty_status(self):
|
def validate_warranty_status(self):
|
||||||
"""
|
|
||||||
validate warranty status
|
|
||||||
"""
|
|
||||||
if (self.doc.maintenance_status == 'Out of Warranty' and self.doc.warranty_expiry_date and getdate(self.doc.warranty_expiry_date) >= datetime.date.today()) or (self.doc.maintenance_status == 'Under Warranty' and (not self.doc.warranty_expiry_date or getdate(self.doc.warranty_expiry_date) < datetime.date.today())):
|
if (self.doc.maintenance_status == 'Out of Warranty' and self.doc.warranty_expiry_date and getdate(self.doc.warranty_expiry_date) >= datetime.date.today()) or (self.doc.maintenance_status == 'Under Warranty' and (not self.doc.warranty_expiry_date or getdate(self.doc.warranty_expiry_date) < datetime.date.today())):
|
||||||
msgprint("Warranty expiry date and maintenance status mismatch. Please verify",
|
webnotes.throw(self.doc.name + ": " +
|
||||||
raise_exception=1)
|
_("Warranty expiry date and maintenance status mismatched"))
|
||||||
|
|
||||||
|
|
||||||
def validate_warehouse(self):
|
def validate_warehouse(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user