Set "order date" when creating new receiving batch

This commit is contained in:
Lance Edgar 2016-12-30 09:45:22 -06:00
parent ed06ada8c4
commit 55973bf30a

View file

@ -288,12 +288,12 @@ class PurchaseBatchView(BatchMasterView):
kwargs['buyer_uuid'] = batch.buyer_uuid kwargs['buyer_uuid'] = batch.buyer_uuid
kwargs['po_number'] = batch.po_number kwargs['po_number'] = batch.po_number
# TODO: should these always get set?
if batch.mode == self.enum.PURCHASE_BATCH_MODE_ORDERING: if batch.mode == self.enum.PURCHASE_BATCH_MODE_ORDERING:
kwargs['date_ordered'] = batch.date_ordered kwargs['date_ordered'] = batch.date_ordered
elif batch.mode == self.enum.PURCHASE_BATCH_MODE_RECEIVING: elif batch.mode == self.enum.PURCHASE_BATCH_MODE_RECEIVING:
kwargs['date_ordered'] = batch.date_ordered
kwargs['date_received'] = batch.date_received kwargs['date_received'] = batch.date_received
elif batch.mode == self.enum.PURCHASE_BATCH_MODE_COSTING: elif batch.mode == self.enum.PURCHASE_BATCH_MODE_COSTING:
kwargs['invoice_date'] = batch.invoice_date kwargs['invoice_date'] = batch.invoice_date