You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
17) Spree::Adjustment recording included tax EnterpriseFee adjustments when enterprise fees have a fixed tax_category when enterprise fees are taxed per-item when the tax rate does not include the tax in the price records the tax on TaxRate adjustment on the order
Failure/Error:
per_item_fees_total = order.line_items.sum do |line_item|
calculator.per_item_enterprise_fee_applicators_for(line_item.variant)
.select { |applicator|
(!applicator.enterprise_fee.inherits_tax_category && applicator.enterprise_fee.tax_category == rate.tax_category) ||
(applicator.enterprise_fee.inherits_tax_category && line_item.product.tax_category == rate.tax_category)
}
.sum { |applicator| applicator.enterprise_fee.compute_amount(line_item) }
end
ArgumentError:
wrong number of arguments (given 1, expected 2..3)
# ./app/models/spree/calculator/default_tax_decorator.rb:19:in `compute_order'
# ./app/models/spree/tax_rate_decorator.rb:15:in `adjust_with_included_tax'
# ./spec/models/spree/adjustment_spec.rb:195:in `block (7 levels) in <module:Spree>'
Replacing sum with map and sum, fixes the specs:
This needs to be done after #5613 is merged to avoid conflicts.
The text was updated successfully, but these errors were encountered:
Broken specs in this build
https://semaphoreci.com/openfoodfoundation/openfoodnetwork-2/branches/pull-request-5611/builds/2
With this error:
Replacing sum with map and sum, fixes the specs:
This needs to be done after #5613 is merged to avoid conflicts.
The text was updated successfully, but these errors were encountered: