[Minor] Payroll Fix

This commit is contained in:
Kanchan Chauhan 2017-01-17 13:54:55 +05:30
parent d9e216878f
commit 653303180a

View File

@ -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)