Send salary slip mail after submit via Salary Manager

This commit is contained in:
Nabin Hait 2014-08-05 17:02:20 +05:30
parent 45b7d17ee8
commit 9f7e00bb3a

View File

@ -128,11 +128,8 @@ class SalaryManager(Document):
for ss in ss_list:
ss_obj = frappe.get_doc("Salary Slip",ss[0])
try:
frappe.db.set(ss_obj, 'email_check', cint(self.send_email))
if cint(self.send_email) == 1:
ss_obj.send_mail_funct()
frappe.db.set(ss_obj, 'docstatus', 1)
ss_obj.email_check = self.send_email
ss_obj.submit()
except Exception,e:
not_submitted_ss.append(ss[0])
frappe.msgprint(e)