fix: allow to create Sales Order from expired Quotation (#32641)
(cherry picked from commit 4ad3002861)
This commit is contained in:
@@ -83,11 +83,12 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(doc.docstatus == 1 && !(['Lost', 'Ordered']).includes(doc.status)) {
|
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) {
|
this.frm.add_custom_button(
|
||||||
cur_frm.add_custom_button(__('Sales Order'),
|
__("Sales Order"),
|
||||||
cur_frm.cscript['Make Sales Order'], __('Create'));
|
this.frm.cscript["Make Sales Order"],
|
||||||
}
|
__("Create")
|
||||||
|
);
|
||||||
|
|
||||||
if(doc.status!=="Ordered") {
|
if(doc.status!=="Ordered") {
|
||||||
this.frm.add_custom_button(__('Set as Lost'), () => {
|
this.frm.add_custom_button(__('Set as Lost'), () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user