From 4965e2bb9ae6be46c95c2481b2d89cb69927969b Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Thu, 14 Nov 2024 02:17:27 +0500 Subject: [PATCH] Update lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb Co-authored-by: David Cook --- .../reports/suppliers/helpers/line_items_access_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb b/lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb index 809efb0540..3152cac7dd 100644 --- a/lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb +++ b/lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb @@ -29,10 +29,10 @@ module Reporting adjustments = line_item.adjustments return adjustments.tax if adjustment_type == 'Spree::TaxRate' - supplier_id = supplier(line_item).id + supplier_id = line_item.supplier_id adjustments.enterprise_fee.select do |adjustment| label = adjustment.label - adjustment_enterprise_id = adjustment.originator.enterprise.id + adjustment_enterprise_id = adjustment.originator.enterprise_id label.include?('supplier') && adjustment_enterprise_id == supplier_id end end