From c55b805b666fd82923940a55e1dfd5d2c7cc5d4e Mon Sep 17 00:00:00 2001 From: Ayush Shukla Date: Wed, 17 May 2017 19:18:26 +0530 Subject: [PATCH] [minor] process_payroll_create salary fixed, fixes frappe/erpnext#8853 (#8881) * [minor] process_payroll_create salary fixed * [minor] indentation fix --- erpnext/hr/doctype/process_payroll/process_payroll.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py index 915985ca4f..7ca94b8628 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.py +++ b/erpnext/hr/doctype/process_payroll/process_payroll.py @@ -112,14 +112,14 @@ class ProcessPayroll(Document): def create_log(self, ss_list): - if not ss_list: + if not ss_list or len(ss_list) < 1: log = "

" + _("No employee for the above selected criteria OR salary slip already created") + "

" else: log = frappe.render_template("templates/includes/salary_slip_log.html", dict(ss_list=ss_list, keys=sorted(ss_list[0].keys()), title=_('Created Salary Slips'))) - return log + return log def get_sal_slip_list(self, ss_status, as_dict=False): """