From 55973bf30ae2a2741150fc468041fa6f05603cbd Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Fri, 30 Dec 2016 09:45:22 -0600 Subject: [PATCH] Set "order date" when creating new receiving batch --- tailbone/views/purchases/batch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tailbone/views/purchases/batch.py b/tailbone/views/purchases/batch.py index 06a5684d..efec7c0c 100644 --- a/tailbone/views/purchases/batch.py +++ b/tailbone/views/purchases/batch.py @@ -288,12 +288,12 @@ class PurchaseBatchView(BatchMasterView): kwargs['buyer_uuid'] = batch.buyer_uuid kwargs['po_number'] = batch.po_number + # TODO: should these always get set? if batch.mode == self.enum.PURCHASE_BATCH_MODE_ORDERING: kwargs['date_ordered'] = batch.date_ordered - elif batch.mode == self.enum.PURCHASE_BATCH_MODE_RECEIVING: + kwargs['date_ordered'] = batch.date_ordered kwargs['date_received'] = batch.date_received - elif batch.mode == self.enum.PURCHASE_BATCH_MODE_COSTING: kwargs['invoice_date'] = batch.invoice_date