From ee2055e1bdf85c1d8b9956581c2348c0d829da9a 2021-01-27 08:49:50 From: Lance Edgar Date: 2021-01-27 08:49:50 Subject: [PATCH] Avoid data type bug for customer order batch row refresh --- diff --git a/rattail/batch/custorder.py b/rattail/batch/custorder.py index 4761756f5efe9e32d6ec637efa142d3731738340..7378c322c0fef98974f35a4fee9ccad3a59ce681 100644 --- a/rattail/batch/custorder.py +++ b/rattail/batch/custorder.py @@ -83,7 +83,7 @@ class CustomerOrderBatchHandler(BatchHandler): else: row.total_price = row.unit_price * row.order_quantity if row.order_uom == self.enum.UNIT_OF_MEASURE_CASE: - row.total_price *= row.case_quantity + row.total_price *= (row.case_quantity or 1) # update total price for batch too, if it changed if row.total_price != old_total: