mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update lib/reporting/reports/suppliers/helpers/line_items_access_helper.rb
Co-authored-by: David Cook <david@redcliffs.net>
This commit is contained in:
committed by
Rachel Arnould
parent
6b3b29ac39
commit
4965e2bb9a
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user