Update lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb

Co-authored-by: David Cook <david@redcliffs.net>
This commit is contained in:
Ahmed Ejaz
2024-11-14 02:17:27 +05:00
committed by Rachel Arnould
parent 6b3b29ac39
commit 4965e2bb9a

View File

@@ -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