diff --git a/app/helpers/articles_helper.rb b/app/helpers/articles_helper.rb index 0a2edd34..116b41ae 100644 --- a/app/helpers/articles_helper.rb +++ b/app/helpers/articles_helper.rb @@ -112,7 +112,7 @@ def format_unit_factors(factors) factor_str_arr .compact - .join("#{Prawn::Text::NBSP}x#{Prawn::Text::NBSP}") + .join("#{Prawn::Text::NBSP}×#{Prawn::Text::NBSP}") end def format_unit_factor(factor, with_unit) @@ -126,7 +126,7 @@ def format_unit_factor(factor, with_unit) unit_label = is_si_conversible ? unit_data[:symbol] : unit_data[:name] return unit_label if factor[:quantity] == 1 - multiplier_str = 'x' unless is_si_conversible + multiplier_str = '×' unless is_si_conversible [quantity_str, multiplier_str, unit_label] .compact diff --git a/spec/helpers/articles_helper_spec.rb b/spec/helpers/articles_helper_spec.rb index fc6d232b..e7a39125 100644 --- a/spec/helpers/articles_helper_spec.rb +++ b/spec/helpers/articles_helper_spec.rb @@ -49,7 +49,7 @@ def test_with_article_data(supplier_order_unit: nil, group_order_unit: nil, rati ratios: [[20.148, 'KGM'], [20, 'XBO'], [10, 'LTR']], group_order_unit: 'XBO' ) - expect(result).to eq('Crate (20 x 0.5 l)') + expect(result).to eq('Crate (20 × 0.5 l)') end it 'formats ratio from group order unit to first SI ratio if group order unit equals or defaults to supplier order unit' do @@ -58,7 +58,7 @@ def test_with_article_data(supplier_order_unit: nil, group_order_unit: nil, rati ratios: [[100, 'XPC'], [400, 'XPK'], [4000, 'X6H'], [200_000, 'GRM']], group_order_unit: 'XPK' ) - expect(result).to eq('Pallet (400 x 500 g)') + expect(result).to eq('Pallet (400 × 500 g)') end it 'formats ratio from group order unit to first SI ratio' do