Add future mode for vendor catalog batch

This commit is contained in:
Lance Edgar 2018-04-10 09:07:57 -07:00
parent 8ea769d0e5
commit 8c8d539266
2 changed files with 11 additions and 1 deletions

View file

@ -181,7 +181,7 @@
<thead>
<th>Pref.</th>
<th>Vendor</th>
<th>Code</th>
<th>Order Code</th>
<th>Case Size</th>
<th>Case Cost</th>
<th>Unit Cost</th>

View file

@ -72,6 +72,7 @@ class VendorCatalogsView(FileBatchMasterView):
'id',
'vendor',
'filename',
'future',
'effective',
'created',
'created_by',
@ -90,6 +91,7 @@ class VendorCatalogsView(FileBatchMasterView):
'old_unit_cost',
'unit_cost',
'unit_cost_diff',
'starts',
'status_code',
]
@ -138,6 +140,7 @@ class VendorCatalogsView(FileBatchMasterView):
'filename',
'parser_key',
'vendor_uuid',
'future',
])
parser_values = [(p.key, p.display) for p in self.get_parsers()]
@ -164,10 +167,17 @@ class VendorCatalogsView(FileBatchMasterView):
kwargs['vendor'] = batch.vendor
elif batch.vendor_uuid:
kwargs['vendor_uuid'] = batch.vendor_uuid
kwargs['future'] = batch.future
return kwargs
def configure_row_grid(self, g):
super(VendorCatalogsView, self).configure_row_grid(g)
batch = self.get_instance()
# starts
if not batch.future:
g.hide_column('starts')
g.set_label('upc', "UPC")
g.set_label('brand_name', "Brand")
g.set_label('old_unit_cost', "Old Cost")