diff --git a/app/services/invoices/apply_provider_taxes_service.rb b/app/services/invoices/apply_provider_taxes_service.rb index 87c86a1d73f..5e25a3e7c64 100644 --- a/app/services/invoices/apply_provider_taxes_service.rb +++ b/app/services/invoices/apply_provider_taxes_service.rb @@ -124,7 +124,7 @@ def fetch_provider_taxes_result def calculate_key(tax) tax_rate = tax.rate.is_a?(String) ? tax.rate.to_f * 100 : tax.rate - "#{tax.type}-#{tax.name.parameterize(separator: '_')}-#{tax_rate.to_s}" + "#{tax.type}-#{tax.name.parameterize(separator: "_")}-#{tax_rate}" end end end diff --git a/db/migrate/20240708195226_remove_null_constraint_on_applied_taxes.rb b/db/migrate/20240708195226_remove_null_constraint_on_applied_taxes.rb index bbc0ba7cbc7..d2a3cefdc0b 100644 --- a/db/migrate/20240708195226_remove_null_constraint_on_applied_taxes.rb +++ b/db/migrate/20240708195226_remove_null_constraint_on_applied_taxes.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + class RemoveNullConstraintOnAppliedTaxes < ActiveRecord::Migration[7.1] def change change_column_null :fees_taxes, :tax_id, true diff --git a/spec/services/invoices/apply_provider_taxes_service_spec.rb b/spec/services/invoices/apply_provider_taxes_service_spec.rb index 61045bd5526..c98079884f7 100644 --- a/spec/services/invoices/apply_provider_taxes_service_spec.rb +++ b/spec/services/invoices/apply_provider_taxes_service_spec.rb @@ -26,7 +26,7 @@ [ OpenStruct.new( tax_breakdown: [ - OpenStruct.new(name: 'tax 1', type: 'type1', rate: '0.10'), + OpenStruct.new(name: 'tax 1', type: 'type1', rate: '0.10') ] ), OpenStruct.new(