Update Adjustment#has_tax?

This commit is contained in:
Matt-Yorkley
2021-06-16 17:38:27 +01:00
parent c16e008ba1
commit ad1b9f3f2f

View File

@@ -134,11 +134,15 @@ module Spree
end
def has_tax?
included_tax.positive?
tax_total.positive?
end
private
def tax_total
adjustments.tax.sum(:amount)
end
def update_adjustable_adjustment_total
Spree::ItemAdjustments.new(adjustable).update if adjustable
end