From 91ac1a9031c794d628f92fe64ff68c2ea33acceb Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Sat, 23 Sep 2023 20:01:29 -0500 Subject: [PATCH] Show customer for POS batches --- tailbone/views/batch/pos.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/tailbone/views/batch/pos.py b/tailbone/views/batch/pos.py index 402a70b4..7d71a88a 100644 --- a/tailbone/views/batch/pos.py +++ b/tailbone/views/batch/pos.py @@ -42,6 +42,7 @@ class POSBatchView(BatchMasterView): grid_columns = [ 'id', + 'customer', 'created', 'created_by', 'rowcount', @@ -54,8 +55,7 @@ class POSBatchView(BatchMasterView): form_fields = [ 'id', - 'description', - 'notes', + 'customer', 'params', 'rowcount', 'sales_total', @@ -98,13 +98,15 @@ class POSBatchView(BatchMasterView): def configure_grid(self, g): super().configure_grid(g) - g.set_type('sales_total', 'currency') - g.set_type('tax1_total', 'currency') - g.set_type('tax2_total', 'currency') + g.set_link('customer') g.set_link('created') g.set_link('created_by') + g.set_type('sales_total', 'currency') + g.set_type('tax1_total', 'currency') + g.set_type('tax2_total', 'currency') + def grid_extra_class(self, batch, i): if batch.void: return 'warning' @@ -112,6 +114,8 @@ class POSBatchView(BatchMasterView): def configure_form(self, f): super().configure_form(f) + f.set_renderer('customer', self.render_customer) + f.set_type('sales_total', 'currency') f.set_type('tax1_total', 'currency') f.set_type('tax2_total', 'currency')