diff --git a/app/models/spree/item_adjustments.rb b/app/models/spree/item_adjustments.rb index 15aaafad0c..1dd334f47d 100644 --- a/app/models/spree/item_adjustments.rb +++ b/app/models/spree/item_adjustments.rb @@ -17,9 +17,6 @@ module Spree end def update_adjustments - tax_adjustments = - (item.respond_to?(:all_adjustments) ? item.all_adjustments : item.adjustments).tax - adjustment_total = adjustments.additional.map(&:update!).compact.sum included_tax_total = tax_adjustments.inclusive.reload.map(&:update!).compact.sum additional_tax_total = tax_adjustments.additional.reload.map(&:update!).compact.sum @@ -31,5 +28,11 @@ module Spree updated_at: Time.zone.now ) end + + private + + def tax_adjustments + (item.respond_to?(:all_adjustments) ? item.all_adjustments : item.adjustments).tax + end end end