refactor: make use of doc.quotation_to

This commit is contained in:
ruthra kumar
2024-05-09 11:58:33 +05:30
parent 2896e3666c
commit 754c7f6d1c

View File

@@ -96,18 +96,10 @@ erpnext.selling.QuotationController = class QuotationController extends erpnext.
} }
refresh(doc, dt, dn) { refresh(doc, dt, dn) {
super.refresh(doc, dt, dn); super.refresh(doc, dt, dn);
let doctype = "";
if (doc.quotation_to == "Customer") {
doctype = "Customer";
} else if (doc.quotation_to == "Lead") {
doctype = "Lead";
} else if (doc.quotation_to == "Prospect") {
doctype = "Prospect";
}
frappe.dynamic_link = { frappe.dynamic_link = {
doc: this.frm.doc, doc: this.frm.doc,
fieldname: "party_name", fieldname: "party_name",
doctype: doctype, doctype: doc.quotation_to,
}; };
var me = this; var me = this;