Simplify Order#total_tax to cover all taxes from all sources

This commit is contained in:
Matt-Yorkley
2021-03-18 14:05:29 +00:00
parent 2f262f70e1
commit 49f1e44999
2 changed files with 2 additions and 4 deletions

View File

@@ -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

View File

@@ -699,7 +699,7 @@ describe Spree::Order do
amount: 123,
included_tax: 2
)
order.reload
order.update!
end
it "returns a sum of all tax on the order" do