mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-04-02 06:51:40 +00:00
Remove included tax check from CalculatedAdjustments
This is handled in TaxRate now.
This commit is contained in:
@@ -36,8 +36,7 @@ module Spree
|
||||
order: order_object_for(adjustable),
|
||||
label: label,
|
||||
mandatory: mandatory,
|
||||
state: state,
|
||||
included: tax_included?(self, adjustable)
|
||||
state: state
|
||||
}
|
||||
|
||||
if adjustable.respond_to?(:adjustments)
|
||||
@@ -65,15 +64,6 @@ module Spree
|
||||
|
||||
private
|
||||
|
||||
# Used for setting the #included boolean on tax adjustments. This will be removed in a
|
||||
# later step, as the responsibility for creating all adjustments related to tax will be
|
||||
# moved into the Spree::TaxRate class.
|
||||
def tax_included?(originator, target)
|
||||
originator.is_a?(Spree::TaxRate) &&
|
||||
originator.included_in_price &&
|
||||
originator.default_zone_or_zone_match?(order_object_for(target))
|
||||
end
|
||||
|
||||
def order_object_for(target)
|
||||
# Temporary method for adjustments transition.
|
||||
if target.is_a? Spree::Order
|
||||
|
||||
Reference in New Issue
Block a user