fix: allow to create Sales Order from expired Quotation (#32641)

This commit is contained in:
Raffael Meyer 2022-10-19 18:37:02 +02:00 committed by GitHub
parent de4c0528f9
commit 4ad3002861
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -84,11 +84,12 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
}
}
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'), () => {