diff --git a/chezbetty/models/event.py b/chezbetty/models/event.py index ffd1df5..8e0d9a2 100644 --- a/chezbetty/models/event.py +++ b/chezbetty/models/event.py @@ -46,6 +46,7 @@ def all(cls): def some(cls, count): return DBSession.query(cls)\ .filter(cls.deleted == False)\ + .order_by(desc(cls.id))\ .limit(count).all() @classmethod diff --git a/chezbetty/templates/admin/index.jinja2 b/chezbetty/templates/admin/index.jinja2 index f739d58..7eba026 100644 --- a/chezbetty/templates/admin/index.jinja2 +++ b/chezbetty/templates/admin/index.jinja2 @@ -255,7 +255,7 @@ - {% for e in events|reverse %} + {% for e in events %} {% for t in e.transactions|reverse %} {% if loop.index == 1 %} diff --git a/chezbetty/templates/admin/item_edit.jinja2 b/chezbetty/templates/admin/item_edit.jinja2 index 411d31f..977ba8e 100644 --- a/chezbetty/templates/admin/item_edit.jinja2 +++ b/chezbetty/templates/admin/item_edit.jinja2 @@ -94,6 +94,7 @@ Date + User Type Quantity @@ -104,6 +105,7 @@ {{ button.event(subtrans.transaction.event.id) }} {{ subtrans.transaction.event.timestamp|pretty_date|safe }} + {{ subtrans.transaction.event.admin.name }} {{ subtrans.transaction.type }} {% if subtrans.transaction.type == "inventory" %} {{ subtrans.quantity_counted }}