diff --git a/Gemfile b/Gemfile index fb414a745ab..54a0affdc12 100644 --- a/Gemfile +++ b/Gemfile @@ -86,7 +86,7 @@ gem "active_model_serializers", "0.8.4" gem 'activerecord-session_store' gem 'acts-as-taggable-on' gem 'angularjs-file-upload-rails', '~> 2.4.1' -gem 'bigdecimal', '3.0.2' +gem 'bigdecimal' gem 'bootsnap', require: false gem 'geocoder' gem 'gmaps4rails' diff --git a/Gemfile.lock b/Gemfile.lock index 3bd6dacdf6d..2c1e11b6b2f 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -180,7 +180,7 @@ GEM base64 (0.2.0) bcp47_spec (0.2.1) bcrypt (3.1.20) - bigdecimal (3.0.2) + bigdecimal (3.1.8) bindata (2.5.0) bindex (0.8.1) bootsnap (1.18.3) @@ -865,7 +865,7 @@ DEPENDENCIES angularjs-rails (= 1.8.0) arel-helpers (~> 2.12) aws-sdk-s3 - bigdecimal (= 3.0.2) + bigdecimal bootsnap bugsnag bullet diff --git a/app/services/variant_units/option_value_namer.rb b/app/services/variant_units/option_value_namer.rb index 511a7a1bc04..40ca0a23609 100644 --- a/app/services/variant_units/option_value_namer.rb +++ b/app/services/variant_units/option_value_namer.rb @@ -58,7 +58,7 @@ def option_value_value_unit def option_value_value_unit_scaled unit_scale, unit_name = scale_for_unit_value - value = (@nameable.unit_value / unit_scale).to_d.truncate(2) + value = (@nameable.unit_value.to_d / unit_scale).round(2) [value, unit_name] end diff --git a/spec/lib/reports/sales_tax_totals_by_order_spec.rb b/spec/lib/reports/sales_tax_totals_by_order_spec.rb index 7987ddad0b3..603331788a5 100644 --- a/spec/lib/reports/sales_tax_totals_by_order_spec.rb +++ b/spec/lib/reports/sales_tax_totals_by_order_spec.rb @@ -145,7 +145,8 @@ total = report.total_excl_tax(query_row) # discounted order total - discounted order tax - expect(total).to eq((113.3 - 10) - (3.3 - 0.29)) + # (113.3 - 10) - (3.3 - 0.29) + expect(total).to eq 100.29 end end end