Fix rowcount bug when first row added via ordering worksheet

This commit is contained in:
Lance Edgar 2018-05-16 09:44:16 -05:00
parent 9ed501a8cc
commit 805a1afa3f

View file

@ -272,7 +272,7 @@ class OrderingBatchView(PurchasingBatchView):
row.cases_ordered = cases_ordered or None
row.units_ordered = units_ordered or None
self.handler.refresh_row(row)
batch.rowcount += 1
batch.rowcount = (batch.rowcount or 0) + 1
return {
'row_cases_ordered': '' if not row or row.removed else int(row.cases_ordered or 0),