Remove tax_rates shortcut from adjustment

Becoming less dependent on Spree, using our own namespace, keeping
decorators small.
This commit is contained in:
Maikel Linke
2018-12-19 14:42:38 +11:00
parent fc1b182275
commit a978e992bf
5 changed files with 13 additions and 8 deletions

View File

@@ -32,7 +32,7 @@ module OpenFoodNetwork
end
def adjustment_tax(adjustable, adjustment)
tax_rates = adjustment.tax_rates
tax_rates = TaxRateFinder.tax_rates_of(adjustment)
tax_rates.select(&:included_in_price).sum do |rate|
rate.compute_tax adjustment.amount