fix: Don't show Send SMS in BOM

This commit is contained in:
Faris Ansari 2019-07-04 17:47:28 +05:30
parent 2d0fd9f519
commit a5d975d867

View File

@ -383,8 +383,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
setup_sms: function() { setup_sms: function() {
var me = this; var me = this;
let blacklist = ['Purchase Invoice', 'BOM'];
if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped", "Closed"], this.frm.doc.status) if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped", "Closed"], this.frm.doc.status)
&& this.frm.doctype != "Purchase Invoice") { && !blacklist.includes(this.frm.doctype)) {
this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); }); this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); });
} }
}, },