Fixed issues

This commit is contained in:
Neil Trini Lasrado
2014-10-07 12:50:17 +05:30
parent 78fa6954e5
commit e6b14a4bf6
7 changed files with 22 additions and 29 deletions

View File

@@ -24,7 +24,7 @@ def get_fiscal_years(date=None, fiscal_year=None, label="Date", verbose=1, compa
elif company:
cond = """('%s' in (select company from `tabFiscal Year Company`
where `tabFiscal Year Company`.parent = `tabFiscal Year`.name))
and '%s' >= year_start_date and '%s' <= year_end_date """ %(company, date, date)
and '%s' >= year_start_date and '%s' <= year_end_date """ %(company.replace("'", "\'"), date, date)
else:
cond = "'%s' >= year_start_date and '%s' <= year_end_date" %(date, date)