[fix] sms settings, fixes #3276

This commit is contained in:
Rushabh Mehta 2015-05-19 11:10:12 +05:30
parent 632fb3879e
commit 4a3c805049
2 changed files with 10 additions and 9 deletions

View File

@ -83,14 +83,15 @@ erpnext.TransactionController = erpnext.taxes_and_totals.extend({
setup_sms: function() {
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(); });
}
},
send_sms: function() {
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() {

View File

@ -44,9 +44,9 @@ class SMSCenter(Document):
ifnull(cell_number,'')!='' %s""" % where_clause)
elif self.send_to == 'All Sales Person':
rec = frappe.db.sql("""select sales_person_name, tabEmployee.cell_number from
`tabSales Person`, tabEmployee
and `tabSales Person`.employee = tabEmployee.name
rec = frappe.db.sql("""select sales_person_name,
tabEmployee.cell_number from `tabSales Person` left join tabEmployee
on `tabSales Person`.employee = tabEmployee.name
where ifnull(tabEmployee.cell_number,'')!=''""")
rec_list = ''