Merge pull request #32656 from frappe/mergify/bp/version-13-hotfix/pr-32641

fix: allow to create Sales Order from expired Quotation (backport #32641)
This commit is contained in:
Deepesh Garg
2022-10-20 17:34:31 +05:30
committed by GitHub

View File

@@ -83,11 +83,12 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
}
}
if(doc.docstatus == 1 && !(['Lost', 'Ordered']).includes(doc.status)) {
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'], __('Create'));
}
if (doc.docstatus == 1 && !["Lost", "Ordered"].includes(doc.status)) {
this.frm.add_custom_button(
__("Sales Order"),
this.frm.cscript["Make Sales Order"],
__("Create")
);
if(doc.status!=="Ordered") {
this.frm.add_custom_button(__('Set as Lost'), () => {