From 32ab3970e15fdeffb4bc6a31c5ceec41b88ae74f Mon Sep 17 00:00:00 2001 From: lasalesi Date: Mon, 5 Nov 2018 11:32:18 +0100 Subject: [PATCH] allow creating sales order on the last valid day of a quotation (#15875) --- erpnext/selling/doctype/quotation/quotation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/selling/doctype/quotation/quotation.js b/erpnext/selling/doctype/quotation/quotation.js index c708de037f..1b7959d7eb 100644 --- a/erpnext/selling/doctype/quotation/quotation.js +++ b/erpnext/selling/doctype/quotation/quotation.js @@ -50,7 +50,7 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({ } if(doc.docstatus == 1 && doc.status!=='Lost') { - if(!doc.valid_till || frappe.datetime.get_diff(doc.valid_till, frappe.datetime.get_today()) > 0) { + if(!doc.valid_till || frappe.datetime.get_diff(doc.valid_till, frappe.datetime.get_today()) >= 0) { cur_frm.add_custom_button(__('Sales Order'), cur_frm.cscript['Make Sales Order'], __("Make")); }