[MERGE] [FIX] account_budget: fix the computation of theorical amount field (opw 606232)
The amount should use number of days +1 eg: budget from 2014-04-01 to 2014-04-11, today is 2014-04-10, should be 10/11*amount instead of 9/10*amount bzr revid: mat@openerp.com-20140410151717-gzoucjmshb2y2j6i
This commit is contained in:
commit
803bbd7c22
|
@ -164,7 +164,7 @@ class crossovered_budget_lines(osv.osv):
|
|||
elapsed = strToDate(date_to) - strToDate(date_to)
|
||||
|
||||
if total.days:
|
||||
theo_amt = float(elapsed.days / float(total.days)) * line.planned_amount
|
||||
theo_amt = float((elapsed.days + 1) / float(total.days + 1)) * line.planned_amount
|
||||
else:
|
||||
theo_amt = line.planned_amount
|
||||
|
||||
|
|
Loading…
Reference in New Issue