Make sure invoice number is saved when making new purchasing batch

This commit is contained in:
Lance Edgar 2017-02-14 23:12:37 -06:00
parent 39bc1039c4
commit 8e35b68e05

View file

@ -301,8 +301,10 @@ class PurchaseBatchView(BatchMasterView):
elif batch.mode == self.enum.PURCHASE_BATCH_MODE_RECEIVING:
kwargs['date_ordered'] = batch.date_ordered
kwargs['date_received'] = batch.date_received
kwargs['invoice_number'] = batch.invoice_number
elif batch.mode == self.enum.PURCHASE_BATCH_MODE_COSTING:
kwargs['invoice_date'] = batch.invoice_date
kwargs['invoice_number'] = batch.invoice_number
if batch.mode in (self.enum.PURCHASE_BATCH_MODE_RECEIVING,
self.enum.PURCHASE_BATCH_MODE_COSTING):