diff --git a/app/services/tax_rate_finder.rb b/app/services/tax_rate_finder.rb index 1c979cf776..de16839044 100644 --- a/app/services/tax_rate_finder.rb +++ b/app/services/tax_rate_finder.rb @@ -77,6 +77,6 @@ class TaxRateFinder approximation = (included_tax / (amount - included_tax)) return [] if approximation.infinite? || approximation.zero? || approximation.nan? - [Spree::TaxRate.order("ABS(amount - #{approximation})").first] + [Spree::TaxRate.order(Arel.sql("ABS(amount - #{approximation})")).first] end end