Fix bug when updating Order Form data, if row.po_total is None

not sure how/when that happens, but just fall back to $0
This commit is contained in:
Lance Edgar 2017-05-30 20:25:37 -05:00
parent 2d29174772
commit cc41c38d68

View file

@ -220,7 +220,7 @@ class OrderingBatchView(PurchasingBatchView):
return {
'row_cases_ordered': '' if not row or row.removed else int(row.cases_ordered or 0),
'row_units_ordered': '' if not row or row.removed else int(row.units_ordered or 0),
'row_po_total': '' if not row or row.removed else '${:0,.2f}'.format(row.po_total),
'row_po_total': '' if not row or row.removed else '${:0,.2f}'.format(row.po_total or 0),
'batch_po_total': '${:0,.2f}'.format(batch.po_total or 0),
}