Fix custom cell click handlers in main buefy grid tables

just used for editing catalog/invoice cost in receiving thus far..
This commit is contained in:
Lance Edgar 2023-08-08 18:06:22 -05:00
parent f2915afda4
commit 845b5cda1a
3 changed files with 22 additions and 10 deletions

View file

@ -968,19 +968,16 @@ class ReceivingBatchView(PurchasingBatchView):
g.filters['vendor_code'].default_verb = 'contains'
# catalog_unit_cost
if (self.handler.has_purchase_order(batch)
or self.handler.has_invoice_file(batch)):
g.remove('catalog_unit_cost')
elif self.allow_edit_catalog_unit_cost(batch):
if self.allow_edit_catalog_unit_cost(batch):
g.set_raw_renderer('catalog_unit_cost', self.render_catalog_unit_cost)
g.set_click_handler('catalog_unit_cost',
'catalogUnitCostClicked(props.row)')
'this.catalogUnitCostClicked')
# invoice_unit_cost
if self.allow_edit_invoice_unit_cost(batch):
g.set_raw_renderer('invoice_unit_cost', self.render_invoice_unit_cost)
g.set_click_handler('invoice_unit_cost',
'invoiceUnitCostClicked(props.row)')
'this.invoiceUnitCostClicked')
# nb. only show PO *or* invoice cost; prefer the latter unless
# we have a PO and no invoice