From 4ec01d5fee5429051b3a6d2aded086a81c651ff9 Mon Sep 17 00:00:00 2001 From: Manny Dinssa <44172848+Dinssa@users.noreply.github.com> Date: Wed, 19 Mar 2025 13:59:39 +0000 Subject: [PATCH] CLDC-3919: Sales BU Decimal numbers rounding errors (#2987) * Update discount attribute to be saved as a float * Equity fields as decimals * Stairbought and stairowned fields as decimals * mrentprestaircasing as decimal * value fields as decimal * deposit fields as decimal * cashdis as decimal * mscharge fields as decimal * mortgage fields as decimal * Update 2024 value fields * Update 2024 mortgage fields * Update 2024 deposit fields * Update 2024 cashdis field * Update 2024 stairbought and stairowned fields * Update 2024 equity field * Update 2024 discount field * Update 2024 mscharge fields (2/3) --- .../bulk_upload/sales/year2024/row_parser.rb | 32 +++++++++---------- .../bulk_upload/sales/year2025/row_parser.rb | 30 ++++++++--------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/app/services/bulk_upload/sales/year2024/row_parser.rb b/app/services/bulk_upload/sales/year2024/row_parser.rb index 5f066697c..a613a118c 100644 --- a/app/services/bulk_upload/sales/year2024/row_parser.rb +++ b/app/services/bulk_upload/sales/year2024/row_parser.rb @@ -252,8 +252,8 @@ class BulkUpload::Sales::Year2024::RowParser attribute :field_84, :integer attribute :field_85, :integer attribute :field_86, :integer - attribute :field_87, :integer - attribute :field_88, :integer + attribute :field_87, :decimal + attribute :field_88, :decimal attribute :field_89, :integer attribute :field_90, :integer @@ -268,40 +268,40 @@ class BulkUpload::Sales::Year2024::RowParser attribute :field_99, :integer attribute :field_100, :integer - attribute :field_101, :integer - attribute :field_102, :integer + attribute :field_101, :decimal + attribute :field_102, :decimal attribute :field_103, :integer - attribute :field_104, :integer + attribute :field_104, :decimal attribute :field_105, :integer attribute :field_106, :string attribute :field_107, :integer attribute :field_108, :integer - attribute :field_109, :integer - attribute :field_110, :integer + attribute :field_109, :decimal + attribute :field_110, :decimal attribute :field_111, :decimal attribute :field_112, :decimal attribute :field_113, :integer - attribute :field_114, :integer + attribute :field_114, :decimal attribute :field_115, :integer - attribute :field_116, :integer + attribute :field_116, :decimal attribute :field_117, :integer - attribute :field_118, :integer + attribute :field_118, :decimal attribute :field_119, :integer attribute :field_120, :string attribute :field_121, :integer attribute :field_122, :integer - attribute :field_123, :integer - attribute :field_124, :integer - attribute :field_125, :integer + attribute :field_123, :decimal + attribute :field_124, :decimal + attribute :field_125, :decimal attribute :field_126, :integer - attribute :field_127, :integer + attribute :field_127, :decimal attribute :field_128, :integer attribute :field_129, :integer - attribute :field_130, :integer - attribute :field_131, :integer + attribute :field_130, :decimal + attribute :field_131, :decimal validates :field_4, presence: { diff --git a/app/services/bulk_upload/sales/year2025/row_parser.rb b/app/services/bulk_upload/sales/year2025/row_parser.rb index 0de492e6f..886b3e928 100644 --- a/app/services/bulk_upload/sales/year2025/row_parser.rb +++ b/app/services/bulk_upload/sales/year2025/row_parser.rb @@ -236,19 +236,19 @@ class BulkUpload::Sales::Year2025::RowParser attribute :field_83, :integer attribute :field_84, :integer attribute :field_85, :integer - attribute :field_86, :integer - attribute :field_87, :integer + attribute :field_86, :decimal + attribute :field_87, :decimal attribute :field_88, :integer - attribute :field_89, :integer + attribute :field_89, :decimal attribute :field_90, :integer - attribute :field_91, :integer - attribute :field_92, :integer + attribute :field_91, :decimal + attribute :field_92, :decimal attribute :field_93, :decimal attribute :field_94, :decimal attribute :field_95, :decimal - attribute :field_96, :integer - attribute :field_97, :integer + attribute :field_96, :decimal + attribute :field_97, :decimal attribute :field_98, :integer attribute :field_99, :integer attribute :field_100, :integer @@ -258,22 +258,22 @@ class BulkUpload::Sales::Year2025::RowParser attribute :field_104, :integer attribute :field_105, :integer attribute :field_106, :integer - attribute :field_107, :integer - attribute :field_108, :integer + attribute :field_107, :decimal + attribute :field_108, :decimal attribute :field_109, :integer - attribute :field_110, :integer + attribute :field_110, :decimal attribute :field_111, :decimal attribute :field_112, :integer - attribute :field_113, :integer + attribute :field_113, :decimal attribute :field_114, :integer - attribute :field_115, :integer + attribute :field_115, :decimal attribute :field_116, :integer - attribute :field_117, :integer + attribute :field_117, :decimal attribute :field_118, :integer attribute :field_119, :integer - attribute :field_120, :integer - attribute :field_121, :integer + attribute :field_120, :decimal + attribute :field_121, :decimal validates :field_1, presence: {