Fix bug when viewing certain receiving batches

This commit is contained in:
Lance Edgar 2022-12-06 19:31:22 -06:00
parent 1509b6fce5
commit 6ac07e1255

View file

@ -975,7 +975,7 @@ class ReceivingBatchView(PurchasingBatchView):
# nb. only show PO *or* invoice cost; prefer the latter unless
# we have a PO and no invoice
if (self.batch_handler.has_purchase_order(batch)
and not self.batch_handler.has_invoice(batch)):
and not self.batch_handler.has_invoice_file(batch)):
g.remove('invoice_unit_cost')
else:
g.remove('po_unit_cost')