Fix tax adjustment label

:amount is actually a property on the TaxRate object itself that refers to the rate (eg 10% expressed as 0.10), and is not the same as the adjustment amount being passed in to this method (eg: $4.28)
This commit is contained in:
Matt-Yorkley
2021-06-10 17:16:45 +01:00
parent 5bfe079262
commit 937cede9b8

View File

@@ -138,9 +138,9 @@ module Spree
private
def create_label(amount)
def create_label(adjustment_amount)
label = ""
label << "#{Spree.t(:refund)} " if amount.negative?
label << "#{Spree.t(:refund)} " if adjustment_amount.negative?
label << "#{(name.presence || tax_category.name)} "
label << (show_rate_in_label? ? "#{amount * 100}%" : "")
label << " (#{I18n.t('models.tax_rate.included_in_price')})" if included_in_price?