Improve display of purchase credit data
esp. within a receiving batch row
This commit is contained in:
parent
4a9b528c47
commit
3760c3239f
2 changed files with 76 additions and 7 deletions
|
@ -2,7 +2,7 @@
|
|||
################################################################################
|
||||
#
|
||||
# Rattail -- Retail Software Framework
|
||||
# Copyright © 2010-2018 Lance Edgar
|
||||
# Copyright © 2010-2019 Lance Edgar
|
||||
#
|
||||
# This file is part of Rattail.
|
||||
#
|
||||
|
@ -47,6 +47,11 @@ class PurchaseCreditView(MasterView):
|
|||
editable = False
|
||||
checkboxes = True
|
||||
|
||||
labels = {
|
||||
'upc': "UPC",
|
||||
'mispick_upc': "Mispick UPC",
|
||||
}
|
||||
|
||||
grid_columns = [
|
||||
'vendor',
|
||||
'invoice_number',
|
||||
|
@ -65,6 +70,35 @@ class PurchaseCreditView(MasterView):
|
|||
'status',
|
||||
]
|
||||
|
||||
form_fields = [
|
||||
'store',
|
||||
'vendor',
|
||||
'invoice_number',
|
||||
'invoice_date',
|
||||
'date_ordered',
|
||||
'date_shipped',
|
||||
'date_received',
|
||||
'department_number',
|
||||
'department_name',
|
||||
'vendor_item_code',
|
||||
'upc',
|
||||
'product',
|
||||
'case_quantity',
|
||||
'credit_type',
|
||||
'cases_shorted',
|
||||
'units_shorted',
|
||||
'invoice_line_number',
|
||||
'invoice_case_cost',
|
||||
'invoice_unit_cost',
|
||||
'invoice_total',
|
||||
'credit_total',
|
||||
'mispick_upc',
|
||||
'mispick_product',
|
||||
'product_discarded',
|
||||
'expiration_date',
|
||||
'status',
|
||||
]
|
||||
|
||||
def configure_grid(self, g):
|
||||
super(PurchaseCreditView, self).configure_grid(g)
|
||||
|
||||
|
@ -86,15 +120,24 @@ class PurchaseCreditView(MasterView):
|
|||
g.set_type('credit_total', 'currency')
|
||||
|
||||
g.set_label('invoice_number', "Invoice No.")
|
||||
g.set_label('upc', "UPC")
|
||||
g.set_label('vendor_item_code', "Item Code")
|
||||
g.set_label('brand_name', "Brand")
|
||||
g.set_label('cases_shorted', "Cases")
|
||||
g.set_label('units_shorted', "Units")
|
||||
g.set_label('credit_type', "Type")
|
||||
g.set_label('mispick_upc', "Mispick UPC")
|
||||
g.set_label('date_received', "Date")
|
||||
|
||||
g.set_link('upc')
|
||||
g.set_link('vendor_item_code')
|
||||
g.set_link('brand_name')
|
||||
g.set_link('description')
|
||||
|
||||
def configure_form(self, f):
|
||||
super(PurchaseCreditView, self).configure_form(f)
|
||||
|
||||
# status
|
||||
f.set_enum('status', self.enum.PURCHASE_CREDIT_STATUS)
|
||||
|
||||
def change_status(self):
|
||||
if self.request.method != 'POST':
|
||||
self.request.session.flash("Sorry, you must POST to change credit status", 'error')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue