diff --git a/tailbone/api/batch/receiving.py b/tailbone/api/batch/receiving.py index 71a8bcba..22632b80 100644 --- a/tailbone/api/batch/receiving.py +++ b/tailbone/api/batch/receiving.py @@ -2,7 +2,7 @@ ################################################################################ # # Rattail -- Retail Software Framework -# Copyright © 2010-2020 Lance Edgar +# Copyright © 2010-2021 Lance Edgar # # This file is part of Rattail. # @@ -126,13 +126,7 @@ class ReceivingBatchViews(APIBatchView): } def render_eligible_purchase(self, purchase): - if purchase.status == self.enum.PURCHASE_STATUS_ORDERED: - date = purchase.date_ordered - total = purchase.po_total - elif purchase.status == self.enum.PURCHASE_STATUS_RECEIVED: - date = purchase.date_received - total = purchase.invoice_total - return '{} for ${:0,.2f} ({})'.format(date, total or 0, purchase.department or purchase.buyer) + return self.handler.render_eligible_purchase(purchase) @classmethod def defaults(cls, config): diff --git a/tailbone/templates/batch/view.mako b/tailbone/templates/batch/view.mako index d0a1ca21..bfc22833 100644 --- a/tailbone/templates/batch/view.mako +++ b/tailbone/templates/batch/view.mako @@ -212,7 +212,7 @@