diff --git a/erpnext/public/js/controllers/transaction.js b/erpnext/public/js/controllers/transaction.js index 8fb21bccc3a..a3ecea168d5 100644 --- a/erpnext/public/js/controllers/transaction.js +++ b/erpnext/public/js/controllers/transaction.js @@ -383,8 +383,9 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({ setup_sms: function() { var me = this; + let blacklist = ['Purchase Invoice', 'BOM']; 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(); }); } },