summaryrefslogtreecommitdiff
path: root/app/views/consts.py
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2015-11-01 16:03:23 +0100
committerRené 'Necoro' Neumann <necoro@necoro.net>2015-11-01 16:03:23 +0100
commit737c8182c33d3fd710724bf71453f008526b9937 (patch)
tree1c8d35cba6dfd89b0126c360157b1dd144dfd24f /app/views/consts.py
parentb97daa642325b4abc8dbf3f05f59e671c74c01df (diff)
downloadkosten-737c8182c33d3fd710724bf71453f008526b9937.tar.gz
kosten-737c8182c33d3fd710724bf71453f008526b9937.tar.bz2
kosten-737c8182c33d3fd710724bf71453f008526b9937.zip
List constant expenses ending last month
Diffstat (limited to 'app/views/consts.py')
-rw-r--r--app/views/consts.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/app/views/consts.py b/app/views/consts.py
index 27386e1..31cf565 100644
--- a/app/views/consts.py
+++ b/app/views/consts.py
@@ -81,13 +81,18 @@ def list ():
current = []
old = []
future = []
+ last_month = []
for e in expenses:
if e.start <= d:
if e.end >= d:
current.append(e)
else:
- old.append(e)
+ if (d.month == 1 and e.month == 12 and e.year == d.year - 1) \
+ or (e.year == d.year and e.month == d.month - 1):
+ last_month.append(e)
+ else:
+ old.append(e)
else:
future.append(e)