Compare commits

...

7 Commits

Author SHA1 Message Date
David Cook
3a7aed154c Merge pull request #13003 from chahmedejaz/bugfix/13002-orders-pagination
[Orders Page] - Fix Pagination not working
2024-11-28 09:28:30 +11:00
Ahmed Ejaz
711f37bce1 13002: fix the search-controller error
- productForm is not accessible on the orders page
- putting the check to do the scrollIntoView only if the productForm is available
2024-11-27 17:49:21 +05:00
Filipe
a493d70f5c Merge pull request #12950 from macanudo527/unlock_bigdecimal
Fix rounding issues by upgrading decimal maths library
2024-11-25 19:18:19 -06:00
Neal Chambers
7a5074cc90 Refactor option_value_value_unit_scaled for correct unit value scaling and update sales tax report spec for clarity 2024-11-13 16:28:18 +09:00
Neal Chambers
41ffe848ed Update BigDecimal to Latest Version 2024-11-13 16:28:18 +09:00
Neal Chambers
0797314360 Fix inaccuracies introduced with truncation 2024-11-13 16:28:18 +09:00
Neal Chambers
3302f0e78d Improve Precision of Spec for New Version of BigDecimal 2024-11-13 16:28:18 +09:00
5 changed files with 8 additions and 6 deletions

View File

@@ -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'

View File

@@ -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

View File

@@ -58,7 +58,7 @@ module VariantUnits
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

View File

@@ -10,7 +10,8 @@ export default class extends Controller {
changePage(event) {
const productsForm = document.querySelector("#products-form");
productsForm.scrollIntoView({ behavior: "smooth" });
if (productsForm) productsForm.scrollIntoView({ behavior: "smooth" });
this.page.value = event.target.dataset.page;
this.submitSearch();
this.page.value = 1;

View File

@@ -145,7 +145,8 @@ RSpec.describe "Reporting::Reports::SalesTax::SalesTaxTotalsByOrder" do
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