fix in get_balance_on for a date which does not fall within any fiscal year

This commit is contained in:
Anand Doshi
2012-10-10 11:44:21 +05:30
parent 037c2570b6
commit d69b32e856
3 changed files with 27 additions and 16 deletions

View File

@@ -30,14 +30,6 @@ else:
from_date = filter_values['posting_date']
to_date = filter_values['posting_date1']
from_date_year = sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",from_date)
if not from_date_year:
msgprint("From Date is out of range. Please check.", raise_exception=1)
else:
from_date_year = from_date_year[0][0]
#to_date_year = sql("select name from `tabFiscal Year` where %s between year_start_date and date_sub(date_add(year_start_date,interval 1 year), interval 1 day)",to_date)[0][0]
# define columns
#---------------------------------------------------------------------
col = []