commit
bb3f192b07
@ -200,7 +200,7 @@ def bom(doctype, txt, searchfield, start, page_len, filters):
|
|||||||
|
|
||||||
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
def get_project_name(doctype, txt, searchfield, start, page_len, filters):
|
||||||
cond = ''
|
cond = ''
|
||||||
if filters['customer']:
|
if filters.get('customer'):
|
||||||
cond = '(`tabProject`.customer = "' + filters['customer'] + '" or ifnull(`tabProject`.customer,"")="") and'
|
cond = '(`tabProject`.customer = "' + filters['customer'] + '" or ifnull(`tabProject`.customer,"")="") and'
|
||||||
|
|
||||||
return frappe.db.sql("""select `tabProject`.name from `tabProject`
|
return frappe.db.sql("""select `tabProject`.name from `tabProject`
|
||||||
|
@ -194,6 +194,9 @@ class MaintenanceSchedule(TransactionBase):
|
|||||||
sr_details = frappe.db.get_value("Serial No", serial_no,
|
sr_details = frappe.db.get_value("Serial No", serial_no,
|
||||||
["warranty_expiry_date", "amc_expiry_date", "status", "delivery_date"], as_dict=1)
|
["warranty_expiry_date", "amc_expiry_date", "status", "delivery_date"], as_dict=1)
|
||||||
|
|
||||||
|
if not sr_details:
|
||||||
|
frappe.throw(_("Serial No {0} not found").format(serial_no))
|
||||||
|
|
||||||
if sr_details.warranty_expiry_date and sr_details.warranty_expiry_date>=amc_start_date:
|
if sr_details.warranty_expiry_date and sr_details.warranty_expiry_date>=amc_start_date:
|
||||||
throw(_("Serial No {0} is under warranty upto {1}").format(serial_no, sr_details.warranty_expiry_date))
|
throw(_("Serial No {0} is under warranty upto {1}").format(serial_no, sr_details.warranty_expiry_date))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user