mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-03 02:21:33 +00:00
Update enterprise fee report tax_category fetching
This commit is contained in:
committed by
Maikel Linke
parent
07774c4572
commit
e2094665c5
@@ -236,7 +236,7 @@ module Reporting
|
||||
LEFT OUTER JOIN spree_tax_categories AS product_tax_categories
|
||||
ON (
|
||||
enterprise_fees.inherits_tax_category IS TRUE
|
||||
AND product_tax_categories.id = spree_products.tax_category_id
|
||||
AND product_tax_categories.id = spree_variants.tax_category_id
|
||||
)
|
||||
JOIN_STRING
|
||||
)
|
||||
|
||||
@@ -31,9 +31,9 @@ describe Reporting::Reports::EnterpriseFeeSummary::FeeSummary do
|
||||
|
||||
# Set up other requirements for ordering.
|
||||
let!(:order_cycle) { create(:simple_order_cycle, coordinator: coordinator) }
|
||||
let!(:product) { create(:product, tax_category: product_tax_category) }
|
||||
let!(:product) { create(:product) }
|
||||
let!(:product_tax_category) { create(:tax_category, name: "Sample Product Tax") }
|
||||
let!(:variant) { prepare_variant }
|
||||
let!(:variant) { prepare_variant(tax_category: product_tax_category) }
|
||||
|
||||
# Create customers.
|
||||
let!(:customer) { create(:customer, first_name: "Sample", last_name: "Customer") }
|
||||
@@ -54,7 +54,8 @@ describe Reporting::Reports::EnterpriseFeeSummary::FeeSummary do
|
||||
end
|
||||
|
||||
let!(:variant) do
|
||||
prepare_variant(incoming_exchange_fees: variant_incoming_exchange_fees,
|
||||
prepare_variant(tax_category: product_tax_category,
|
||||
incoming_exchange_fees: variant_incoming_exchange_fees,
|
||||
outgoing_exchange_fees: variant_outgoing_exchange_fees)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user