Merge pull request #7514 from KanchanChauhan/fix-payroll

[Minor] Payroll Fix
This commit is contained in:
Nabin Hait 2017-01-17 14:59:59 +05:30 committed by GitHub
commit a987b35b72

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)