mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Style/ReduceToHash
This commit is contained in:
@@ -133,8 +133,8 @@ class Invoice
|
||||
end
|
||||
|
||||
def tax_rate_by_id
|
||||
all_tax_adjustments.each_with_object({}) do |adjustment, tax_rates|
|
||||
tax_rates[adjustment.originator.id] = adjustment.originator
|
||||
all_tax_adjustments.to_h do |adjustment|
|
||||
[adjustment.originator.id, adjustment.originator]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -41,8 +41,8 @@ module OpenFoodNetwork
|
||||
end
|
||||
|
||||
def fees_name_by_type_for(variant)
|
||||
per_item_enterprise_fee_applicators_for(variant).each_with_object({}) do |applicator, fees|
|
||||
fees[applicator.enterprise_fee.fee_type.to_sym] = applicator.enterprise_fee.name
|
||||
per_item_enterprise_fee_applicators_for(variant).to_h do |applicator|
|
||||
[applicator.enterprise_fee.fee_type.to_sym, applicator.enterprise_fee.name]
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user