From 560857665a5e2a7a295f6fc5e4d0acd1fbdade10 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 3 Nov 2023 12:10:37 -0500 Subject: [PATCH] Default filter CORE trans archive by today's date --- tailbone_corepos/views/corepos/transactions/base.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tailbone_corepos/views/corepos/transactions/base.py b/tailbone_corepos/views/corepos/transactions/base.py index 9a0fcac..b4601d0 100644 --- a/tailbone_corepos/views/corepos/transactions/base.py +++ b/tailbone_corepos/views/corepos/transactions/base.py @@ -56,6 +56,11 @@ class TransactionDetailMasterView(CoreMasterView): def configure_grid(self, g): super().configure_grid(g) + app = self.get_rattail_app() + + g.filters['date_time'].default_active = True + g.filters['date_time'].default_verb = 'equal' + g.filters['date_time'].default_value = str(app.today()) g.set_type('quantity', 'quantity') g.set_type('item_quantity', 'quantity')