Changeset - ee2055e1bdf8
[Not reviewed]
0 1 0
Lance Edgar (lance) - 4 years ago 2021-01-27 08:49:50
lance@edbob.org
Avoid data type bug for customer order batch row refresh
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
rattail/batch/custorder.py
Show inline comments
 
@@ -80,13 +80,13 @@ class CustomerOrderBatchHandler(BatchHandler):
 
            row.total_price = None
 
        elif not row.unit_price:
 
            row.total_price = 0
 
        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:
 
            batch = row.batch
 
            batch.total_price = ((batch.total_price or 0)
 
                                 + (row.total_price or 0)
0 comments (0 inline, 0 general)