From ea9724a671e354cd4438e7dac1ef33e781a4e45e Mon Sep 17 00:00:00 2001 From: Matt-Yorkley <9029026+Matt-Yorkley@users.noreply.github.com> Date: Wed, 16 Jun 2021 16:51:27 +0100 Subject: [PATCH] Remove dead code #adjustment_tax_amount and #no_tax_adjustments? --- app/services/order_tax_adjustments_fetcher.rb | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/app/services/order_tax_adjustments_fetcher.rb b/app/services/order_tax_adjustments_fetcher.rb index 18b2406be4..a4488c967d 100644 --- a/app/services/order_tax_adjustments_fetcher.rb +++ b/app/services/order_tax_adjustments_fetcher.rb @@ -24,25 +24,11 @@ class OrderTaxAdjustmentsFetcher Hash[tax_rates.collect do |tax_rate| tax_amount = if tax_rates.one? - adjustment_tax_amount(adjustment) + adjustment.amount else tax_rate.compute_tax(adjustment.amount) end [tax_rate, tax_amount] end] end - - def adjustment_tax_amount(adjustment) - if no_tax_adjustments?(adjustment) - adjustment.included_tax - else - adjustment.amount - end - end - - def no_tax_adjustments?(adjustment) - # Admin Adjustments currently do not have tax adjustments. - # The tax amount is stored in the included_tax attribute. - adjustment.originator_type.nil? - end end