Changed the way the pointed sold is displayed.

This commit is contained in:
Alexis Lahouze
2013-01-26 13:50:11 +01:00
parent 8ca742c2e2
commit ef399c82fc
3 changed files with 1 additions and 10 deletions

View File

@ -39,7 +39,6 @@ def get_entries(account_id, year, month):
"value": str(i.value),
"category": i.category,
"sold": str(i.sold),
"pointedsold": str(i.pointedsold),
"account_id": i.account_id
} for i in query.all()])

View File

@ -19,7 +19,6 @@ class Entry(db.Model):
category = db.Column(db.String(100), nullable = True)
sold = column_property(func.sum(value).over(order_by="operation_date, value desc, label desc"))
pointedsold = column_property(func.sum(value).over(partition_by="pointed", order_by="operation_date, value desc, label desc"))
def __init__(self, pointed, label, value, account_id, operation_date = None, category = None):
self.pointed = pointed