From c42cbec7057c4659b8529ef173d711cfbf85aaa5 Mon Sep 17 00:00:00 2001 From: Claudio Maradonna Date: Tue, 17 Dec 2024 15:23:34 +0100 Subject: [PATCH] fix condominium_fiscal_code generator the real length of a condominium fiscal_code is 11 and not 9: the first 7 numbers identify the condominium, the later 3 identify the office and the latest is the control character --- lib/faker/default/finance.rb | 4 ++-- lib/locales/en/finance.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/faker/default/finance.rb b/lib/faker/default/finance.rb index 9a847803f3..70c999596d 100644 --- a/lib/faker/default/finance.rb +++ b/lib/faker/default/finance.rb @@ -97,11 +97,11 @@ def stock_market ## # Returns a random condominium fiscal code. # - # @param country [String] Two capital letter country code to use for the vat number. + # @param country [String] Two capital letter country code to use for the condominium fiscal code number. # @return [String] # # @example - # Faker::Finance.condominium_fiscal_code #=> "012345678" + # Faker::Finance.condominium_fiscal_code #=> "01234567890" # # @faker.version next def condominium_fiscal_code(country: 'IT') diff --git a/lib/locales/en/finance.yml b/lib/locales/en/finance.yml index dc95b114f8..756d81a10c 100644 --- a/lib/locales/en/finance.yml +++ b/lib/locales/en/finance.yml @@ -49,7 +49,7 @@ en: - /6771#########{5,6}L/ - /6709#########{5,6}L/ condominium_fiscal_code: - IT: "#########" + IT: "###########" vat_number: AT: "ATU########" AR: "AR###########"