mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-17 01:07:19 +00:00
fix: Removed redundant code
This commit is contained in:
@@ -39,16 +39,16 @@ erpnext.selling.QuotationController = erpnext.selling.SellingController.extend({
|
||||
onload: function(doc, dt, dn) {
|
||||
var me = this;
|
||||
this._super(doc, dt, dn);
|
||||
if(doc.customer && !doc.quotation_to)
|
||||
doc.quotation_to = "Customer";
|
||||
else if(doc.lead && !doc.quotation_to)
|
||||
doc.quotation_to = "Lead";
|
||||
// if(doc.customer && !doc.quotation_to)
|
||||
// doc.quotation_to = "Customer";
|
||||
// else if(doc.lead && !doc.quotation_to)
|
||||
// doc.quotation_to = "Lead";
|
||||
|
||||
},
|
||||
refresh: function(doc, dt, dn) {
|
||||
this._super(doc, dt, dn);
|
||||
doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead';
|
||||
frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype}
|
||||
// doctype = doc.quotation_to == 'Customer' ? 'Customer':'Lead';
|
||||
// frappe.dynamic_link = {doc: this.frm.doc, fieldname: doctype.toLowerCase(), doctype: doctype}
|
||||
|
||||
var me = this;
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@ class Quotation(SellingController):
|
||||
self.update_opportunity()
|
||||
self.validate_order_type()
|
||||
self.validate_uom_is_integer("stock_uom", "qty")
|
||||
# self.validate_quotation_to()
|
||||
self.validate_valid_till()
|
||||
if self.items:
|
||||
self.with_items = 1
|
||||
@@ -43,13 +42,6 @@ class Quotation(SellingController):
|
||||
def validate_order_type(self):
|
||||
super(Quotation, self).validate_order_type()
|
||||
|
||||
# def validate_quotation_to(self):
|
||||
# if self.customer:
|
||||
# self.quotation_to = "Customer"
|
||||
# self.lead = None
|
||||
# elif self.lead:
|
||||
# self.quotation_to = "Lead"
|
||||
|
||||
def update_lead(self):
|
||||
if self.quotation_to == "Lead":
|
||||
frappe.get_doc("Lead", self.customer_lead).set_status(update=True)
|
||||
|
||||
Reference in New Issue
Block a user