diff --git a/hr/doctype/salary_slip/salary_slip.py b/hr/doctype/salary_slip/salary_slip.py index 6a1705054e..3a42dca806 100644 --- a/hr/doctype/salary_slip/salary_slip.py +++ b/hr/doctype/salary_slip/salary_slip.py @@ -182,24 +182,24 @@ class DocType(TransactionBase): earn_table = '' ded_table = '' if earn_ret: - earn_table += "" + earn_table += "
" for e in earn_ret: if not e[1]: - earn_table +=''%(cstr(e[0])) + earn_table +=''%(cstr(e[0])) else: - earn_table +=''%(cstr(e[0]),cstr(e[1])) + earn_table +=''%(cstr(e[0]),cstr(e[1])) earn_table += '
%s0.00
%s0.00
%s%s
%s%s
' if ded_ret: - ded_table += "" + ded_table += "
" for d in ded_ret: if not d[1]: - ded_table +=''%(cstr(d[0])) + ded_table +='%s'%(cstr(d[0])) else: - ded_table +=''%(cstr(d[0]),cstr(d[1])) + ded_table +=''%(cstr(d[0]),cstr(d[1])) ded_table += '
%s0.00
0.00
%s%s
%s%s
' letter_head = sql("select value from `tabSingles` where field = 'letter_head' and doctype = 'Control Panel'") @@ -210,57 +210,58 @@ class DocType(TransactionBase): msg = '''
%s
- + - - + + - - - -

Salary Slip

Salary Slip

Employee Code : %sEmployee Name : %sEmployee Code : %sEmployee Name : %s
Month : %sFiscal Year : %s
- - - - - + + - - - + + + + + + + + + + - - + +
Department : %sBranch : %sDesignation : %sMonth : %sFiscal Year : %s
Grade : %sBank Account No. : %sBank Name : %sDepartment : %sBranch : %s
Designation : %sGrade : %s
Bank Account No. : %sBank Name : %s
Arrear Amount : %sPayment days : %sArrear Amount : %sPayment days : %s
- +
- - + + - - + +
EarningDeductionEarningsDeductions
%s%s%s%s
- +
- - + + - + Net Pay : + - + -
Gross Pay : %sTotal Deduction : %sGross Pay : %sTotal Deduction : %s
Net Pay : %s%s
Net Pay(in words) : %sNet Pay(in words) : %s
'''%(cstr(letter_head[0][0]),cstr(self.doc.employee), cstr(self.doc.employee_name), cstr(self.doc.month), cstr(self.doc.fiscal_year), cstr(self.doc.department), cstr(self.doc.branch), cstr(self.doc.designation), cstr(self.doc.grade), cstr(self.doc.bank_account_no), cstr(self.doc.bank_name), cstr(self.doc.arrear_amount), cstr(self.doc.payment_days), earn_table, ded_table, cstr(self.doc.gross_pay), cstr(self.doc.total_deduction), cstr(self.doc.net_pay), cstr(self.doc.total_in_words)) + '''%(cstr(letter_head[0][0]),cstr(self.doc.employee), cstr(self.doc.employee_name), cstr(self.doc.month), cstr(self.doc.fiscal_year), cstr(self.doc.department), cstr(self.doc.branch), cstr(self.doc.designation), cstr(self.doc.grade), cstr(self.doc.bank_account_no), cstr(self.doc.bank_name), cstr(self.doc.arrear_amount), cstr(self.doc.payment_days), earn_table, ded_table, cstr(flt(self.doc.gross_pay)), cstr(flt(self.doc.total_deduction)), cstr(flt(self.doc.net_pay)), cstr(self.doc.total_in_words)) sendmail([receiver], sender='automail@erpnext.com', subject=subj, parts=[['text/plain', msg]]) else: msgprint("Company Email ID not found.") diff --git a/patches/patch.py b/patches/patch.py index d9834e254f..cf9774bffe 100644 --- a/patches/patch.py +++ b/patches/patch.py @@ -1,7 +1,7 @@ # REMEMBER to update this # ======================== -last_patch = 354 +last_patch = 355 #------------------------------------------- @@ -300,3 +300,7 @@ def execute(patch_no): for d in rs: m.fields[d[0]] = 1 m.save() + elif patch_no == 355: + reload_doc('hr', 'doctype', 'salary_slip') + delete_doc('DocType', 'Salary Control Panel') +