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