Added reference_doctype and reference_name to link Bulk Email to Salary Slip
This commit is contained in:
parent
71e93d6691
commit
b2b0b37cc1
@ -127,7 +127,7 @@ class ProcessPayroll(Document):
|
|||||||
submitted_ss = self.format_as_links(list(set(all_ss) - set(not_submitted_ss)))
|
submitted_ss = self.format_as_links(list(set(all_ss) - set(not_submitted_ss)))
|
||||||
if submitted_ss:
|
if submitted_ss:
|
||||||
log = """
|
log = """
|
||||||
<b>Salary Slips Submitted %s:</b>
|
<b>Salary Slips Submitted:</b> <br><br>%s
|
||||||
""" % ('<br>'.join(submitted_ss))
|
""" % ('<br>'.join(submitted_ss))
|
||||||
|
|
||||||
if not_submitted_ss:
|
if not_submitted_ss:
|
||||||
|
@ -214,6 +214,7 @@ class SalarySlip(TransactionBase):
|
|||||||
if receiver:
|
if receiver:
|
||||||
subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year)
|
subj = 'Salary Slip - ' + cstr(self.month) +'/'+cstr(self.fiscal_year)
|
||||||
frappe.sendmail([receiver], subject=subj, message = _("Please see attachment"),
|
frappe.sendmail([receiver], subject=subj, message = _("Please see attachment"),
|
||||||
attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)], bulk=True)
|
attachments=[frappe.attach_print(self.doctype, self.name, file_name=self.name)],
|
||||||
|
bulk=True, reference_doctype= self.doctype, reference_name= self.name)
|
||||||
else:
|
else:
|
||||||
msgprint(_("{0}: Employee email not found, hence email not sent").format(self.employee_name))
|
msgprint(_("{0}: Employee email not found, hence email not sent").format(self.employee_name))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user