Skip to content

Commit

Permalink
fix: allow to create Sales Order from expired Quotation (#32641)
Browse files Browse the repository at this point in the history
(cherry picked from commit 4ad3002)
  • Loading branch information
barredterra authored and mergify[bot] committed Oct 19, 2022
1 parent 8a88105 commit ccc58f4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions erpnext/selling/doctype/quotation/quotation.js
Expand Up @@ -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'), () => {
Expand Down

0 comments on commit ccc58f4

Please sign in to comment.