mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-03 06:59:14 +00:00
Merge pull request #2812 from luisramos0/2-0-adjust-enterprise-fees-spec-fix
[Spree Upgrade] Fix enterprise fees specs in adjustment_spec - tax_rate
This commit is contained in:
@@ -25,9 +25,8 @@ module Spree
|
||||
# LineItems or Orders, so we mock out a line item here to fit the interface
|
||||
# that our calculator (usually DefaultTax) expects.
|
||||
def compute_tax(amount)
|
||||
product = OpenStruct.new tax_category: tax_category
|
||||
line_item = LineItem.new quantity: 1
|
||||
line_item.define_singleton_method(:product) { product }
|
||||
line_item.tax_category = tax_category
|
||||
line_item.define_singleton_method(:price) { amount }
|
||||
|
||||
# Tax on adjustments (represented by the included_tax field) is always inclusive of
|
||||
|
||||
Reference in New Issue
Block a user