diff --git a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb index da4aaf8683..2145e040d7 100644 --- a/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb +++ b/lib/reporting/reports/enterprise_fee_summary/enterprise_fees_with_tax_report_by_producer.rb @@ -85,6 +85,8 @@ module Reporting query = order .all_adjustments .enterprise_fee + .joins(:metadata) + .where(adjustment_metadata: { enterprise_role: 'supplier' }) if enterprise_fee_filters? query = query.where(originator_id: enterprise_fee_filtered_ids)