[fix] sms settings, fixes #3276
This commit is contained in:
parent
632fb3879e
commit
4a3c805049
@ -83,14 +83,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
|
|||||||
|
|
||||||
setup_sms: function() {
|
setup_sms: function() {
|
||||||
var me = this;
|
var me = this;
|
||||||
if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped"], this.frm.doc.status)) {
|
if(this.frm.doc.docstatus===1 && !in_list(["Lost", "Stopped"], this.frm.doc.status)
|
||||||
|
&& this.frm.doctype != "Purchase Invoice") {
|
||||||
this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); });
|
this.frm.page.add_menu_item(__('Send SMS'), function() { me.send_sms(); });
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
send_sms: function() {
|
send_sms: function() {
|
||||||
frappe.require("assets/erpnext/js/sms_manager.js");
|
frappe.require("assets/erpnext/js/sms_manager.js");
|
||||||
var sms_man = new SMSManager(this.doc);
|
var sms_man = new SMSManager(this.frm.doc);
|
||||||
},
|
},
|
||||||
|
|
||||||
hide_currency_and_price_list: function() {
|
hide_currency_and_price_list: function() {
|
||||||
|
@ -44,9 +44,9 @@ class SMSCenter(Document):
|
|||||||
ifnull(cell_number,'')!='' %s""" % where_clause)
|
ifnull(cell_number,'')!='' %s""" % where_clause)
|
||||||
|
|
||||||
elif self.send_to == 'All Sales Person':
|
elif self.send_to == 'All Sales Person':
|
||||||
rec = frappe.db.sql("""select sales_person_name, tabEmployee.cell_number from
|
rec = frappe.db.sql("""select sales_person_name,
|
||||||
`tabSales Person`, tabEmployee
|
tabEmployee.cell_number from `tabSales Person` left join tabEmployee
|
||||||
and `tabSales Person`.employee = tabEmployee.name
|
on `tabSales Person`.employee = tabEmployee.name
|
||||||
where ifnull(tabEmployee.cell_number,'')!=''""")
|
where ifnull(tabEmployee.cell_number,'')!=''""")
|
||||||
|
|
||||||
rec_list = ''
|
rec_list = ''
|
||||||
|
Loading…
x
Reference in New Issue
Block a user