Skip to content

Commit

Permalink
add create label method in TaxRate so that label can be overriden in …
Browse files Browse the repository at this point in the history
…extensions without having to override the adjust method

Merges #1669
  • Loading branch information
ospsuite authored and radar committed Jun 21, 2012
1 parent af32582 commit 2659e7c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/app/models/spree/tax_rate.rb
Expand Up @@ -45,7 +45,7 @@ def self.default

# Creates necessary tax adjustments for the order.
def adjust(order)
label = "#{tax_category.name} #{amount * 100}%"
label = create_label
if included_in_price
if Zone.default_tax.contains? order.tax_zone
order.line_items.each { |line_item| create_adjustment(label, line_item, line_item) }
Expand All @@ -63,6 +63,10 @@ def adjust(order)
end
end

private
def create_label
"#{tax_category.name} #{amount * 100}%"
end
end

end

0 comments on commit 2659e7c

Please sign in to comment.