Merge pull request #18166 from netchampfaris/send-sms-bom

fix: Don't show Send SMS in BOM
This commit is contained in:
rohitwaghchaure 2019-07-04 19:11:42 +05:30 committed by GitHub
commit 03db4c0efc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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(); });
}
},