From 911a5925b75ba188611e777b051bb8d23ad9fb08 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Sun, 7 May 2017 22:37:45 +0200 Subject: [PATCH] Rename balance to flow. --- accountant/models/accounts.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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(