mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Remove dead code OrderTaxAdjustmentsFetcher#all
This commit is contained in:
@@ -9,7 +9,7 @@ class OrderTaxAdjustmentsFetcher
|
||||
end
|
||||
|
||||
def totals
|
||||
all.each_with_object({}) do |adjustment, hash|
|
||||
order.all_adjustments.tax.each_with_object({}) do |adjustment, hash|
|
||||
tax_rates_hash = tax_rates_hash(adjustment)
|
||||
hash.update(tax_rates_hash) { |_tax_rate, amount1, amount2| amount1 + amount2 }
|
||||
end
|
||||
@@ -19,13 +19,6 @@ class OrderTaxAdjustmentsFetcher
|
||||
|
||||
attr_reader :order
|
||||
|
||||
def all
|
||||
tax_adjustments = order.all_adjustments.tax
|
||||
admin_adjustments_with_tax = order.all_adjustments.admin.with_tax
|
||||
|
||||
tax_adjustments.or(admin_adjustments_with_tax)
|
||||
end
|
||||
|
||||
def tax_rates_hash(adjustment)
|
||||
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user