Tweak default views for Trainwreck data

This commit is contained in:
Lance Edgar 2017-06-16 16:38:05 -07:00
parent b468bc4b2b
commit 0fb789fc2c

View file

@ -75,6 +75,7 @@ class TransactionView(MasterView):
g.terminal_id,
g.receipt_number,
g.customer_id,
g.customer_name,
g.total,
],
readonly=True)
@ -122,7 +123,9 @@ class TransactionView(MasterView):
g.department_number.set(label="Dept. No.")
g.unit_quantity.set(renderer=forms.renderers.QuantityFieldRenderer)
g.subtotal.set(renderer=forms.renderers.CurrencyFieldRenderer)
g.discounted_subtotal.set(renderer=forms.renderers.CurrencyFieldRenderer)
g.tax.set(renderer=forms.renderers.CurrencyFieldRenderer)
g.total.set(renderer=forms.renderers.CurrencyFieldRenderer)
def configure_row_grid(self, g):
g.configure(
@ -135,6 +138,30 @@ class TransactionView(MasterView):
g.unit_quantity,
g.subtotal,
g.tax,
g.total,
g.void,
],
readonly=True)
def _preconfigure_row_fieldset(self, fs):
fs.item_id.set(label="Item ID")
fs.department_number.set(label="Dept. No.")
fs.unit_quantity.set(renderer=forms.renderers.QuantityFieldRenderer)
fs.subtotal.set(renderer=forms.renderers.CurrencyFieldRenderer)
fs.discounted_subtotal.set(renderer=forms.renderers.CurrencyFieldRenderer)
fs.tax.set(renderer=forms.renderers.CurrencyFieldRenderer)
fs.total.set(renderer=forms.renderers.CurrencyFieldRenderer)
def configure_row_fieldset(self, fs):
fs.configure(include=[
fs.sequence,
fs.item_type,
fs.item_id,
fs.department_number,
fs.description,
fs.unit_quantity,
fs.subtotal,
fs.tax,
fs.total,
fs.void,
])