From f2b96869aaf92d6e5fea1fa52e30eaa02180d2d9 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:06:38 +0530 Subject: [PATCH 1/3] fix: purchase order and quotation creation --- .../buying/doctype/supplier_quotation/supplier_quotation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index abb570231038..2016a69d7018 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -22,9 +22,9 @@ erpnext.buying.SupplierQuotationController = class SupplierQuotationController e this.frm.set_value("valid_till", frappe.datetime.add_months(this.frm.doc.transaction_date, 1)); } if (this.frm.doc.docstatus === 1) { - this.frm.add_custom_button(__("Purchase Order"), this.make_purchase_order, __("Create")); + this.frm.add_custom_button(__("Purchase Order"), this.make_purchase_order.bind(this), __("Create")); this.frm.page.set_inner_btn_group_as_primary(__("Create")); - this.frm.add_custom_button(__("Quotation"), this.make_quotation, __("Create")); + this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); } else if (this.frm.doc.docstatus === 0) { this.frm.add_custom_button( __("Material Request"), From 7acbfc06a056b08b0b7f5c7fcb3de49f088b0f18 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:15:27 +0530 Subject: [PATCH 2/3] fix: purchase order and quotation creation --- .../doctype/supplier_quotation/supplier_quotation.js | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index 2016a69d7018..eceb2675e98f 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -22,9 +22,17 @@ erpnext.buying.SupplierQuotationController = class SupplierQuotationController e this.frm.set_value("valid_till", frappe.datetime.add_months(this.frm.doc.transaction_date, 1)); } if (this.frm.doc.docstatus === 1) { - this.frm.add_custom_button(__("Purchase Order"), this.make_purchase_order.bind(this), __("Create")); + this.frm.add_custom_button( + __("Purchase Order"), + this.make_purchase_order.bind(this), + __("Create") + ); this.frm.page.set_inner_btn_group_as_primary(__("Create")); - this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); + this.frm.add_custom_button( + __("Quotation"), + this.make_quotation.bind(this), + __("Create") + ); } else if (this.frm.doc.docstatus === 0) { this.frm.add_custom_button( __("Material Request"), From 77685442267df285f2821d327bb905fd2ff12155 Mon Sep 17 00:00:00 2001 From: "Nihantra C. Patel" <141945075+Nihantra-Patel@users.noreply.github.com> Date: Tue, 2 Apr 2024 16:18:19 +0530 Subject: [PATCH 3/3] fix: purchase order and quotation creation upd --- .../buying/doctype/supplier_quotation/supplier_quotation.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js index eceb2675e98f..de37ec20bdc8 100644 --- a/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js +++ b/erpnext/buying/doctype/supplier_quotation/supplier_quotation.js @@ -28,11 +28,7 @@ erpnext.buying.SupplierQuotationController = class SupplierQuotationController e __("Create") ); this.frm.page.set_inner_btn_group_as_primary(__("Create")); - this.frm.add_custom_button( - __("Quotation"), - this.make_quotation.bind(this), - __("Create") - ); + this.frm.add_custom_button(__("Quotation"), this.make_quotation.bind(this), __("Create")); } else if (this.frm.doc.docstatus === 0) { this.frm.add_custom_button( __("Material Request"),