fix linter issues

This commit is contained in:
Mohamed ABDELLANI
2023-05-13 15:43:52 +01:00
committed by Konrad
parent 4eb05a1d73
commit 73cdcca022
2 changed files with 4 additions and 3 deletions

View File

@@ -11,7 +11,8 @@ class Invoice
extend Invoice::DataPresenterAttributes
attributes :additional_tax_total, :currency, :included_tax_total, :payment_total,
:shipping_method_id, :state, :total, :number, :note, :special_instructions, :completed_at
:shipping_method_id, :state, :total, :number, :note, :special_instructions,
:completed_at
attributes_with_presenter :bill_address, :customer, :distributor, :ship_address,
:shipping_method, :order_cycle

View File

@@ -7,8 +7,8 @@ class OrderTaxAdjustmentsFetcher
@order = order
end
def totals(tax_adjustments = nil)
(tax_adjustments ||= order.all_adjustments.tax).each_with_object({}) do |adjustment, hash|
def totals(tax_adjustments = order.all_adjustments.tax)
tax_adjustments.each_with_object({}) do |adjustment, hash|
tax_rate = adjustment.originator
hash[tax_rate] = hash[tax_rate].to_f + adjustment.amount
end