(cherry picked from commit e5d8ba65ca1c982ff4a8db0352e81939ae64665f) Co-authored-by: Mohammed Yusuf Shaikh <49878143+mohammedyusufshaikh@users.noreply.github.com>
This commit is contained in:
parent
df477dcae6
commit
13192e1db1
@ -53,6 +53,13 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
frm.get_field("items").grid.set_multiple_add("item_code", "qty");
|
frm.get_field("items").grid.set_multiple_add("item_code", "qty");
|
||||||
},
|
},
|
||||||
|
|
||||||
|
status:function(frm){
|
||||||
|
if (frm.doc.status == "Lost"){
|
||||||
|
frm.trigger('set_as_lost_dialog');
|
||||||
|
}
|
||||||
|
|
||||||
|
},
|
||||||
|
|
||||||
customer_address: function(frm, cdt, cdn) {
|
customer_address: function(frm, cdt, cdn) {
|
||||||
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display', false);
|
erpnext.utils.get_address_display(frm, 'customer_address', 'address_display', false);
|
||||||
},
|
},
|
||||||
@ -91,11 +98,6 @@ frappe.ui.form.on("Opportunity", {
|
|||||||
frm.add_custom_button(__('Quotation'),
|
frm.add_custom_button(__('Quotation'),
|
||||||
cur_frm.cscript.create_quotation, __('Create'));
|
cur_frm.cscript.create_quotation, __('Create'));
|
||||||
|
|
||||||
if(doc.status!=="Quotation") {
|
|
||||||
frm.add_custom_button(__('Lost'), () => {
|
|
||||||
frm.trigger('set_as_lost_dialog');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!frm.doc.__islocal && frm.perm[0].write && frm.doc.docstatus==0) {
|
if(!frm.doc.__islocal && frm.perm[0].write && frm.doc.docstatus==0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user