Expose new fields for Trainwreck

This commit is contained in:
Lance Edgar 2021-03-09 19:22:05 -06:00
parent 7532dc5117
commit 70c5e36ccb

View file

@ -54,6 +54,7 @@ class TransactionView(MasterView):
SessionExtras = ExtraTrainwreckSessions SessionExtras = ExtraTrainwreckSessions
labels = { labels = {
'store_id': "Store",
'cashback': "Cash Back", 'cashback': "Cash Back",
} }
@ -61,6 +62,7 @@ class TransactionView(MasterView):
'start_time', 'start_time',
'end_time', 'end_time',
'system', 'system',
'store_id',
'terminal_id', 'terminal_id',
'receipt_number', 'receipt_number',
'cashier_name', 'cashier_name',
@ -72,8 +74,10 @@ class TransactionView(MasterView):
form_fields = [ form_fields = [
'system', 'system',
'system_id', 'system_id',
'store_id',
'terminal_id', 'terminal_id',
'receipt_number', 'receipt_number',
'effective_date',
'start_time', 'start_time',
'end_time', 'end_time',
'upload_time', 'upload_time',
@ -83,6 +87,7 @@ class TransactionView(MasterView):
'customer_name', 'customer_name',
'shopper_id', 'shopper_id',
'shopper_name', 'shopper_name',
'shopper_level_number',
'subtotal', 'subtotal',
'discounted_subtotal', 'discounted_subtotal',
'tax', 'tax',
@ -98,6 +103,7 @@ class TransactionView(MasterView):
row_labels = { row_labels = {
'item_id': "Item ID", 'item_id': "Item ID",
'department_number': "Dept. No.", 'department_number': "Dept. No.",
'subdepartment_number': "Subdept. No.",
} }
row_grid_columns = [ row_grid_columns = [
@ -105,6 +111,7 @@ class TransactionView(MasterView):
'item_type', 'item_type',
'item_scancode', 'item_scancode',
'department_number', 'department_number',
'subdepartment_number',
'description', 'description',
'unit_quantity', 'unit_quantity',
'subtotal', 'subtotal',
@ -120,6 +127,8 @@ class TransactionView(MasterView):
'item_id', 'item_id',
'department_number', 'department_number',
'department_name', 'department_name',
'subdepartment_number',
'subdepartment_name',
'description', 'description',
'unit_quantity', 'unit_quantity',
'subtotal', 'subtotal',
@ -188,8 +197,7 @@ class TransactionView(MasterView):
def get_row_data(self, transaction): def get_row_data(self, transaction):
return self.Session.query(self.model_row_class)\ return self.Session.query(self.model_row_class)\
.filter(self.model_row_class.transaction == transaction)\ .filter(self.model_row_class.transaction == transaction)
.order_by(self.model_row_class.sequence)
def get_parent(self, item): def get_parent(self, item):
return item.transaction return item.transaction