diff --git a/app/components/application_view_component.rb b/app/components/application_view_component.rb index b8ebb63cc..3817011d6 100644 --- a/app/components/application_view_component.rb +++ b/app/components/application_view_component.rb @@ -36,8 +36,6 @@ def main_app end def price_format(price) - separator = I18n.locale == :en ? '.' : ',' - - "#{number_to_currency(price, unit: '', separator:, delimiter: '', precision: 2)} €" + "#{number_to_currency(price, unit: '', separator: ',', delimiter: '', precision: 2)} €" end end diff --git a/app/components/modals/change_offer/component.rb b/app/components/modals/change_offer/component.rb index 85c656a98..360a6d23a 100644 --- a/app/components/modals/change_offer/component.rb +++ b/app/components/modals/change_offer/component.rb @@ -127,7 +127,6 @@ def offer_form_properties autotax_counter_template_value: t('english_offers.price_with_wat_template'), autotax_counter_tax_value: "#{offer.billing_profile.present? ? offer.billing_profile.vat_rate : 0.0}", autotax_counter_defaulttemplate_value: t('offers.price_is_without_vat'), - autotax_counter_separator_value: I18n.locale == :en ? '.' : ',', } } end diff --git a/app/components/modals/deposit/component.html.erb b/app/components/modals/deposit/component.html.erb index 9b18845ac..d45bc7053 100644 --- a/app/components/modals/deposit/component.html.erb +++ b/app/components/modals/deposit/component.html.erb @@ -38,7 +38,7 @@
<%= t('offers.new.deposit_description_html', deposit: price_format(@auction.deposit)) %> - +
diff --git a/app/javascript/controllers/autotax_counter_controller.js b/app/javascript/controllers/autotax_counter_controller.js index 8b2b570c3..ca76adddd 100644 --- a/app/javascript/controllers/autotax_counter_controller.js +++ b/app/javascript/controllers/autotax_counter_controller.js @@ -7,7 +7,6 @@ export default class extends Controller { template: String, defaulttemplate: String, priceElement: { default: 'input[name="offer[price]"]', type: String }, - separator: { default: '.', type: String } } connect() { @@ -24,11 +23,7 @@ export default class extends Controller { const totalAmount = value + taxAmount; let tem = this.templateValue.replace('{price}', totalAmount.toFixed(2)).replace('{tax}', (tax * 100.0).toFixed(2)); - - if (this.separatorValue !== '.') { - tem = tem.replace('.', ',').replace('.', ','); - } - + tem = tem.replace('.', ',').replace('.', ','); result.innerHTML = tem } else { result.innerHTML = this.defaulttemplateValue;