[FIX] Account_budget : Correction in the calculation of theoritical amount

bzr revid: jvo@tinyerp.com-20110707054540-gc7c81y8ptudxqi5
This commit is contained in:
Jay Vora (OpenERP)
2011-07-07 11:15:40 +05:30
parent c06f260f6b
commit 7c19f78210
+1 -1
View File
@@ -161,7 +161,7 @@ class crossovered_budget_lines(osv.osv):
total = strToDate(line.date_to) - strToDate(line.date_from)
elapsed = min(strToDate(line.date_to),strToDate(date_to)) - max(strToDate(line.date_from),strToDate(date_from))
if strToDate(date_to) < strToDate(line.date_from):
elapsed = strToDate(date_to) - strToDate(date_to)
elapsed = strToDate(line.date_from) - strToDate(date_to)
if total.days:
theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount