More tweaks for receiving batch workflows

now first step requires choice of vendor and workflow.  supports receiving from
PO at least for native use case.
This commit is contained in:
Lance Edgar 2021-01-31 12:10:44 -06:00
parent a2b7f882bc
commit 801c56f06e
4 changed files with 118 additions and 34 deletions

View file

@ -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):