Commit 9b0ca66e authored by Jérome Perrin's avatar Jérome Perrin

take into account budget line consumption sign for current balance and current

inventory


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@30603 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent d616572a
......@@ -92,14 +92,16 @@ class BudgetCell(Predicate, MetaNode, Movement):
kw['resource_uid'] = resource.getUid()
if at_date:
kw['at_date'] = at_date
return self.portal_simulation.getCurrentInventory(**kw)
sign = self.getParentValue().BudgetLine_getConsumptionSign()
return sign * self.portal_simulation.getCurrentInventory(**kw)
security.declareProtected(Permissions.AccessContentsInformation, 'getCurrentBalance')
def getCurrentBalance(self, at_date=None):
"""
Returns current balance
"""
return self.getQuantity(0.0) + self.getCurrentInventory(at_date=at_date)
sign = self.getParentValue().BudgetLine_getConsumptionSign()
return sign * self.getQuantity(0.0) + self.getCurrentInventory(at_date=at_date)
security.declareProtected(Permissions.AccessContentsInformation, 'getConsumedBudget')
def getConsumedBudget(self, src__=0):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment