diff --git a/accountant/models/accounts.py b/accountant/models/accounts.py index bc9aca2..272e2ed 100644 --- a/accountant/models/accounts.py +++ b/accountant/models/accounts.py @@ -67,8 +67,11 @@ class Account(db.Model): ).one() def balance(self, begin, end): - """Return the balance for a specific time period.""" - # TODO Alexis Lahouze 2017-05-04 Rename to "flow" or "cash flow" + """Return the flow for a specific time period.""" + return self.flow(begin, end) + + def flow(self, begin, end): + """Return the flow for a specific time period.""" query = db.session.query( db.func.sum( db.case(