allow creating sales order on the last valid day of a quotation (#15875)

This commit is contained in:
lasalesi 2018-11-05 11:32:18 +01:00 committed by Rushabh Mehta
parent 3c3b3d830d
commit 32ab3970e1

View File

@ -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"));
}