mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
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:
@@ -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?
|
||||
|
||||
Reference in New Issue
Block a user