mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-28 21:07:16 +00:00
Simplify Order#total_tax
We get the same value here, but without the three additional database hits to adjustments (both of these values are already present on the order object itself).
This commit is contained in:
@@ -662,9 +662,7 @@ module Spree
|
||||
end
|
||||
|
||||
def total_tax
|
||||
adjustments.sum(:included_tax) +
|
||||
shipment_adjustments.sum(:included_tax) +
|
||||
line_item_adjustments.tax.sum(:amount)
|
||||
additional_tax_total + included_tax_total
|
||||
end
|
||||
|
||||
def has_taxes_included
|
||||
|
||||
Reference in New Issue
Block a user