mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Update Adjustment#has_tax?
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user