mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-06 22:36:07 +00:00
Improve summing of line item totals
This commit is contained in:
@@ -52,7 +52,7 @@ module OrderManagement
|
||||
end
|
||||
|
||||
def update_item_total
|
||||
order.item_total = line_items.map(&:amount).sum
|
||||
order.item_total = line_items.sum('price * quantity')
|
||||
update_order_total
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user