From 653303180ad0980de9e771063e1231389c13b5ed Mon Sep 17 00:00:00 2001 From: Kanchan Chauhan Date: Tue, 17 Jan 2017 13:54:55 +0530 Subject: [PATCH] [Minor] Payroll Fix --- erpnext/hr/doctype/process_payroll/process_payroll.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/erpnext/hr/doctype/process_payroll/process_payroll.py b/erpnext/hr/doctype/process_payroll/process_payroll.py index 7741263aac..8448fa27a1 100644 --- a/erpnext/hr/doctype/process_payroll/process_payroll.py +++ b/erpnext/hr/doctype/process_payroll/process_payroll.py @@ -290,10 +290,8 @@ class ProcessPayroll(Document): @frappe.whitelist() def get_start_end_dates(payroll_frequency, start_date=None): '''Returns dict of start and end dates for given payroll frequency based on start_date''' - if not payroll_frequency: - frappe.throw(_("Please set Payroll Frequency first")) - if payroll_frequency == "Monthly" or payroll_frequency == "Bimonthly": + if payroll_frequency == "Monthly" or payroll_frequency == "Bimonthly" or payroll_frequency == "": fiscal_year = get_fiscal_year(start_date)[0] month = "%02d" % getdate(start_date).month m = get_month_details(fiscal_year, month)