Show invoice cost in receiving batch, if "from scratch"

This commit is contained in:
Lance Edgar 2022-12-05 16:05:27 -06:00
parent 9c54a4ada1
commit 36a5f2ab49

View file

@ -960,13 +960,13 @@ class ReceivingBatchView(PurchasingBatchView):
g.set_click_handler('catalog_unit_cost', g.set_click_handler('catalog_unit_cost',
'catalogUnitCostClicked(props.row)') 'catalogUnitCostClicked(props.row)')
# po_unit_cost # nb. only show PO *or* invoice cost; prefer the latter unless
if self.handler.has_invoice_file(batch): # we have a PO and no invoice
g.remove('po_unit_cost') if (self.batch_handler.has_purchase_order(batch)
and not self.batch_handler.has_invoice(batch)):
# invoice_unit_cost
if not self.handler.has_invoice_file(batch):
g.remove('invoice_unit_cost') g.remove('invoice_unit_cost')
else:
g.remove('po_unit_cost')
# credits # credits
# note that sorting by credits involves a subquery with group by clause. # note that sorting by credits involves a subquery with group by clause.