Merge pull request #7000 from Matt-Yorkley/dead-code-tax-total

DCOTW: Order#tax_total
This commit is contained in:
Pau Pérez Fabregat
2021-03-08 16:57:59 +01:00
committed by GitHub
3 changed files with 1 additions and 16 deletions

View File

@@ -183,10 +183,6 @@ module Spree
Spree::Money.new(adjustment_total, currency: currency)
end
def display_tax_total
Spree::Money.new(tax_total, currency: currency)
end
def display_total
Spree::Money.new(total, currency: currency)
end
@@ -377,10 +373,6 @@ module Spree
adjustments.shipping.sum(:amount)
end
def tax_total
adjustments.tax.sum(:amount)
end
# Creates new tax charges if there are any applicable rates. If prices already
# include taxes then price adjustments are created instead.
def create_tax_charge!

View File

@@ -175,7 +175,7 @@ module Spree
order_id: gateway_order_id }
options.merge!(shipping: order.ship_total * 100,
tax: order.tax_total * 100,
tax: order.additional_tax_total * 100,
subtotal: order.item_total * 100,
discount: 0,
currency: currency)

View File

@@ -16,13 +16,6 @@ describe Spree::Order do
expect(order.ship_total).to eq 15
end
end
context "#tax_total" do
it "should return the correct amount" do
allow(order).to receive_message_chain :adjustments, tax: adjustments
expect(order.tax_total).to eq 15
end
end
end
context "line item adjustments" do