Tweak order form view for new purchase batches
This commit is contained in:
parent
7454e611c5
commit
c51d0db42d
3 changed files with 8 additions and 5 deletions
|
@ -139,6 +139,8 @@ class PurchaseBatchView(BatchMasterView):
|
|||
kwargs['vendor_cost_count'] = Session.query(model.ProductCost)\
|
||||
.filter(model.ProductCost.vendor == vendor)\
|
||||
.count()
|
||||
kwargs['vendor_cost_threshold'] = self.rattail_config.getint(
|
||||
'tailbone', 'purchases.order_form.vendor_cost_warning_threshold', default=699)
|
||||
return kwargs
|
||||
|
||||
def _preconfigure_row_grid(self, g):
|
||||
|
@ -325,7 +327,7 @@ class PurchaseBatchView(BatchMasterView):
|
|||
'index_url': self.get_action_url('view', batch),
|
||||
'vendor': vendor,
|
||||
'departments': departments,
|
||||
'get_upc': lambda p: p.upc,
|
||||
'get_upc': lambda p: p.upc.pretty() if p.upc else '',
|
||||
})
|
||||
|
||||
def order_form_update(self):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue