Show invoice cost in receiving batch, if "from scratch"
This commit is contained in:
parent
9c54a4ada1
commit
36a5f2ab49
|
@ -960,13 +960,13 @@ class ReceivingBatchView(PurchasingBatchView):
|
|||
g.set_click_handler('catalog_unit_cost',
|
||||
'catalogUnitCostClicked(props.row)')
|
||||
|
||||
# po_unit_cost
|
||||
if self.handler.has_invoice_file(batch):
|
||||
g.remove('po_unit_cost')
|
||||
|
||||
# invoice_unit_cost
|
||||
if not self.handler.has_invoice_file(batch):
|
||||
# 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)):
|
||||
g.remove('invoice_unit_cost')
|
||||
else:
|
||||
g.remove('po_unit_cost')
|
||||
|
||||
# credits
|
||||
# note that sorting by credits involves a subquery with group by clause.
|
||||
|
|
Loading…
Reference in a new issue