diff --git a/cspell.json b/cspell.json index f27a4a0a4aa6..dc0f04d64dde 100644 --- a/cspell.json +++ b/cspell.json @@ -173,6 +173,7 @@ "ERECEIPTS", "Español", "ethnicities", + "EUVAT", "evenodd", "eventmachine", "evictable", diff --git a/src/languages/de.ts b/src/languages/de.ts index 1cd30c1e02e0..0964f4a38d2a 100644 --- a/src/languages/de.ts +++ b/src/languages/de.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2701,14 +2702,40 @@ const translations = { whatsTheBusinessAddress: 'Wie lautet die Geschäftsadresse?', whatsTheBusinessContactInformation: 'Wie lauten die Geschäftskontaktdaten?', whatsTheBusinessRegistrationNumber: 'Wie lautet die Handelsregisternummer?', - whatsTheBusinessTaxIDEIN: 'Wie lautet die Geschäftssteuer-ID/EIN/USt-IdNr./GST-Registrierungsnummer?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Was ist die Arbeitgeber-Identifikationsnummer (EIN)?'; + case CONST.COUNTRY.CA: + return 'Was ist die Unternehmensnummer (BN)?'; + case CONST.COUNTRY.GB: + return 'Was ist die Umsatzsteuer-Identifikationsnummer (VRN)?'; + case CONST.COUNTRY.AU: + return 'Was ist die australische Unternehmensnummer (ABN)?'; + default: + return 'Was ist die EU-Umsatzsteuer-Identifikationsnummer?'; + } + }, whatsThisNumber: 'Was ist diese Nummer?', whereWasTheBusinessIncorporated: 'Wo wurde das Unternehmen gegründet?', whatTypeOfBusinessIsIt: 'Welche Art von Geschäft ist es?', whatsTheBusinessAnnualPayment: 'Wie hoch ist das jährliche Zahlungsvolumen des Unternehmens?', whatsYourExpectedAverageReimbursements: 'Wie hoch ist Ihr erwarteter durchschnittlicher Erstattungsbetrag?', registrationNumber: 'Registrierungsnummer', - taxIDEIN: 'Steuer-ID/EIN-Nummer', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'EU-USt'; + } + }, businessAddress: 'Geschäftsadresse', businessType: 'Geschäftsart', incorporation: 'Inkorporation', @@ -2732,6 +2759,20 @@ const translations = { findAverageReimbursement: 'Durchschnittlichen Erstattungsbetrag finden', error: { registrationNumber: 'Bitte geben Sie eine gültige Registrierungsnummer an.', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Bitte geben Sie eine gültige Arbeitgeber-Identifikationsnummer (EIN) an'; + case CONST.COUNTRY.CA: + return 'Bitte geben Sie eine gültige Unternehmensnummer (BN) an'; + case CONST.COUNTRY.GB: + return 'Bitte geben Sie eine gültige Umsatzsteuer-Identifikationsnummer (VRN) an'; + case CONST.COUNTRY.AU: + return 'Bitte geben Sie eine gültige australische Unternehmensnummer (ABN) an'; + default: + return 'Bitte geben Sie eine gültige EU-Umsatzsteuer-Identifikationsnummer an'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/en.ts b/src/languages/en.ts index 3e457c764842..ced8f7c24523 100755 --- a/src/languages/en.ts +++ b/src/languages/en.ts @@ -32,6 +32,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2660,14 +2661,40 @@ const translations = { whatsTheBusinessAddress: "What's the business address?", whatsTheBusinessContactInformation: "What's the business contact information?", whatsTheBusinessRegistrationNumber: "What's the business registration number?", - whatsTheBusinessTaxIDEIN: "What's the business tax ID/EIN/VAT/GST registration number?", + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'What’s the Employer Identification Number (EIN)?'; + case CONST.COUNTRY.CA: + return 'What’s the Business Number (BN)?'; + case CONST.COUNTRY.GB: + return 'What’s the VAT Registration Number (VRN)?'; + case CONST.COUNTRY.AU: + return 'What’s the Australian Business Number (ABN)?'; + default: + return 'What’s the EU VAT number?'; + } + }, whatsThisNumber: "What's this number?", whereWasTheBusinessIncorporated: 'Where was the business incorporated?', whatTypeOfBusinessIsIt: 'What type of business is it?', whatsTheBusinessAnnualPayment: "What's the business's annual payment volume?", whatsYourExpectedAverageReimbursements: "What's your expected average reimbursement amount?", registrationNumber: 'Registration number', - taxIDEIN: 'Tax ID/EIN number', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'EU VAT'; + } + }, businessAddress: 'Business address', businessType: 'Business type', incorporation: 'Incorporation', @@ -2691,6 +2718,20 @@ const translations = { findAverageReimbursement: 'Find average reimbursement amount', error: { registrationNumber: 'Please provide a valid registration number', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Please provide a valid Employer Identification Number (EIN)'; + case CONST.COUNTRY.CA: + return 'Please provide a valid Business Number (BN)'; + case CONST.COUNTRY.GB: + return 'Please provide a valid VAT Registration Number (VRN)'; + case CONST.COUNTRY.AU: + return 'Please provide a valid Australian Business Number (ABN)'; + default: + return 'Please provide a valid EU VAT number'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/es.ts b/src/languages/es.ts index 8e6d6679785b..46cfacc3f2ca 100644 --- a/src/languages/es.ts +++ b/src/languages/es.ts @@ -31,6 +31,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2683,14 +2684,40 @@ const translations = { whatsTheBusinessAddress: '¿Cuál es la dirección de la empresa?', whatsTheBusinessContactInformation: '¿Cuál es la información de contacto de la empresa?', whatsTheBusinessRegistrationNumber: '¿Cuál es el número de registro de la empresa?', - whatsTheBusinessTaxIDEIN: '¿Cuál es el número de identificación fiscal ID/EIN/VAT/GST de la empresa?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return '¿Cuál es el Número de Identificación del Empleador (EIN)?'; + case CONST.COUNTRY.CA: + return '¿Cuál es el Número de Empresa (BN)?'; + case CONST.COUNTRY.GB: + return '¿Cuál es el Número de Registro de IVA (VRN)?'; + case CONST.COUNTRY.AU: + return '¿Cuál es el Número de Empresa Australiano (ABN)?'; + default: + return '¿Cuál es el número de IVA de la UE?'; + } + }, whatsThisNumber: '¿Qué es este número?', whereWasTheBusinessIncorporated: '¿Dónde se constituyó la empresa?', whatTypeOfBusinessIsIt: '¿Qué tipo de empresa es?', whatsTheBusinessAnnualPayment: '¿Cuál es el volumen anual de pagos de la empresa?', whatsYourExpectedAverageReimbursements: '¿Cuál es el monto promedio esperado de reembolso?', registrationNumber: 'Número de registro', - taxIDEIN: 'Número de identificación fiscal/EIN', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'EU VAT'; + } + }, businessAddress: 'Dirección de la empresa', businessType: 'Tipo de empresa', incorporation: 'Constitución', @@ -2714,6 +2741,20 @@ const translations = { findAverageReimbursement: 'Encuentra el monto promedio de reembolso', error: { registrationNumber: 'Por favor, proporciona un número de registro válido', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Por favor, proporcione un Número de Identificación del Empleador (EIN) válido'; + case CONST.COUNTRY.CA: + return 'Por favor, proporcione un Número de Empresa (BN) válido'; + case CONST.COUNTRY.GB: + return 'Por favor, proporcione un Número de Registro de IVA (VRN) válido'; + case CONST.COUNTRY.AU: + return 'Por favor, proporcione un Número de Empresa Australiano (ABN) válido'; + default: + return 'Por favor, proporcione un número de IVA de la UE válido'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/fr.ts b/src/languages/fr.ts index 6015959ceb26..62ff8d85096c 100644 --- a/src/languages/fr.ts +++ b/src/languages/fr.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2700,14 +2701,40 @@ const translations = { whatsTheBusinessAddress: "Quelle est l'adresse de l'entreprise ?", whatsTheBusinessContactInformation: 'Quelles sont les coordonnées professionnelles ?', whatsTheBusinessRegistrationNumber: "Quel est le numéro d'enregistrement de l'entreprise ?", - whatsTheBusinessTaxIDEIN: "Quel est le numéro d'identification fiscale/de TVA/d'enregistrement GST de l'entreprise ?", + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Quel est le numéro d’identification d’employeur (EIN) ?'; + case CONST.COUNTRY.CA: + return 'Quel est le numéro d’entreprise (BN) ?'; + case CONST.COUNTRY.GB: + return 'Quel est le numéro d’immatriculation à la TVA (VRN) ?'; + case CONST.COUNTRY.AU: + return 'Quel est le numéro d’entreprise australien (ABN) ?'; + default: + return 'Quel est le numéro de TVA intracommunautaire (UE) ?'; + } + }, whatsThisNumber: 'Quel est ce numéro ?', whereWasTheBusinessIncorporated: "Où l'entreprise a-t-elle été constituée ?", whatTypeOfBusinessIsIt: "Quel type d'entreprise est-ce ?", whatsTheBusinessAnnualPayment: "Quel est le volume annuel de paiements de l'entreprise ?", whatsYourExpectedAverageReimbursements: 'Quel est le montant moyen de remboursement que vous attendez ?', registrationNumber: "Numéro d'enregistrement", - taxIDEIN: "Numéro d'identification fiscale/EIN", + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'TVA UE'; + } + }, businessAddress: 'Adresse professionnelle', businessType: "Type d'entreprise", incorporation: 'Incorporation', @@ -2731,6 +2758,20 @@ const translations = { findAverageReimbursement: 'Trouver le montant moyen de remboursement', error: { registrationNumber: "Veuillez fournir un numéro d'enregistrement valide", + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Veuillez fournir un numéro d’identification d’employeur (EIN) valide'; + case CONST.COUNTRY.CA: + return 'Veuillez fournir un numéro d’entreprise (BN) valide'; + case CONST.COUNTRY.GB: + return 'Veuillez fournir un numéro de TVA (VRN) valide'; + case CONST.COUNTRY.AU: + return 'Veuillez fournir un numéro d’entreprise australien (ABN) valide'; + default: + return 'Veuillez fournir un numéro de TVA intracommunautaire valide'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/it.ts b/src/languages/it.ts index 52f2d778c010..6d4350767425 100644 --- a/src/languages/it.ts +++ b/src/languages/it.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2686,14 +2687,40 @@ const translations = { whatsTheBusinessAddress: "Qual è l'indirizzo dell'azienda?", whatsTheBusinessContactInformation: 'Quali sono le informazioni di contatto aziendali?', whatsTheBusinessRegistrationNumber: "Qual è il numero di registrazione dell'azienda?", - whatsTheBusinessTaxIDEIN: "Qual è il numero di partita IVA/ID fiscale/EIN/registrazione IVA/GST dell'azienda?", + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Qual è il numero di identificazione del datore di lavoro (EIN)?'; + case CONST.COUNTRY.CA: + return 'Qual è il numero aziendale (BN)?'; + case CONST.COUNTRY.GB: + return 'Qual è il numero di partita IVA (VRN)?'; + case CONST.COUNTRY.AU: + return 'Qual è il numero aziendale australiano (ABN)?'; + default: + return 'Qual è il numero di partita IVA UE?'; + } + }, whatsThisNumber: 'Qual è questo numero?', whereWasTheBusinessIncorporated: "Dove è stata costituita l'azienda?", whatTypeOfBusinessIsIt: 'Che tipo di attività è?', whatsTheBusinessAnnualPayment: "Qual è il volume di pagamento annuale dell'azienda?", whatsYourExpectedAverageReimbursements: "Qual è l'importo medio di rimborso previsto?", registrationNumber: 'Numero di registrazione', - taxIDEIN: 'Numero di identificazione fiscale/EIN', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'IVA UE'; + } + }, businessAddress: 'Indirizzo aziendale', businessType: 'Tipo di attività', incorporation: 'Incorporazione', @@ -2717,6 +2744,20 @@ const translations = { findAverageReimbursement: "Trova l'importo medio del rimborso", error: { registrationNumber: 'Si prega di fornire un numero di registrazione valido', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Si prega di fornire un numero di identificazione del datore di lavoro (EIN) valido'; + case CONST.COUNTRY.CA: + return 'Si prega di fornire un numero aziendale (BN) valido'; + case CONST.COUNTRY.GB: + return 'Si prega di fornire un numero di partita IVA (VRN) valido'; + case CONST.COUNTRY.AU: + return 'Si prega di fornire un numero aziendale australiano (ABN) valido'; + default: + return 'Si prega di fornire un numero di partita IVA UE valido'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/ja.ts b/src/languages/ja.ts index df2d96f6377d..3d972768ee26 100644 --- a/src/languages/ja.ts +++ b/src/languages/ja.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2676,14 +2677,40 @@ const translations = { whatsTheBusinessAddress: '会社の住所は何ですか?', whatsTheBusinessContactInformation: 'ビジネス連絡先情報は何ですか?', whatsTheBusinessRegistrationNumber: '事業登録番号は何ですか?', - whatsTheBusinessTaxIDEIN: '事業者の税務ID/EIN/VAT/GST登録番号は何ですか?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return '雇用者識別番号(EIN)とは何ですか?'; + case CONST.COUNTRY.CA: + return '法人番号(BN)とは何ですか?'; + case CONST.COUNTRY.GB: + return 'VAT登録番号(VRN)とは何ですか?'; + case CONST.COUNTRY.AU: + return 'オーストラリア事業番号(ABN)とは何ですか?'; + default: + return 'EUのVAT番号とは何ですか?'; + } + }, whatsThisNumber: 'この番号は何ですか?', whereWasTheBusinessIncorporated: '事業はどこで法人化されましたか?', whatTypeOfBusinessIsIt: 'それはどのような種類のビジネスですか?', whatsTheBusinessAnnualPayment: 'ビジネスの年間支払い額はどれくらいですか?', whatsYourExpectedAverageReimbursements: 'あなたの期待される平均払い戻し額はいくらですか?', registrationNumber: '登録番号', - taxIDEIN: '税務ID/EIN番号', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'EU VAT'; + } + }, businessAddress: 'ビジネス住所', businessType: '業種', incorporation: '法人化', @@ -2707,6 +2734,20 @@ const translations = { findAverageReimbursement: '平均払い戻し額を見つける', error: { registrationNumber: '有効な登録番号を提供してください。', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return '有効な雇用者識別番号(EIN)を入力してください'; + case CONST.COUNTRY.CA: + return '有効な法人番号(BN)を入力してください'; + case CONST.COUNTRY.GB: + return '有効なVAT登録番号(VRN)を入力してください'; + case CONST.COUNTRY.AU: + return '有効なオーストラリア事業番号(ABN)を入力してください'; + default: + return '有効なEU VAT番号を入力してください'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/nl.ts b/src/languages/nl.ts index da9261972716..16bec7d148df 100644 --- a/src/languages/nl.ts +++ b/src/languages/nl.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2686,14 +2687,40 @@ const translations = { whatsTheBusinessAddress: 'Wat is het zakelijke adres?', whatsTheBusinessContactInformation: 'Wat zijn de zakelijke contactgegevens?', whatsTheBusinessRegistrationNumber: 'Wat is het bedrijfsregistratienummer?', - whatsTheBusinessTaxIDEIN: 'Wat is het zakelijke belastingnummer/EIN/btw-/GST-registratienummer?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Wat is het Employer Identification Number (EIN)?'; + case CONST.COUNTRY.CA: + return 'Wat is het Business Number (BN)?'; + case CONST.COUNTRY.GB: + return 'Wat is het btw-registratienummer (VRN)?'; + case CONST.COUNTRY.AU: + return 'Wat is het Australisch bedrijfsnummer (ABN)?'; + default: + return 'Wat is het EU btw-nummer?'; + } + }, whatsThisNumber: 'Wat is dit nummer?', whereWasTheBusinessIncorporated: 'Waar is het bedrijf opgericht?', whatTypeOfBusinessIsIt: 'Wat voor soort bedrijf is het?', whatsTheBusinessAnnualPayment: 'Wat is het jaarlijkse betalingsvolume van het bedrijf?', whatsYourExpectedAverageReimbursements: 'Wat is je verwachte gemiddelde terugbetalingsbedrag?', registrationNumber: 'Registratienummer', - taxIDEIN: 'Belasting-ID/EIN-nummer', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'EU btw'; + } + }, businessAddress: 'Zakelijk adres', businessType: 'Zakelijk type', incorporation: 'Oprichting', @@ -2717,6 +2744,20 @@ const translations = { findAverageReimbursement: 'Vind het gemiddelde terugbetalingsbedrag', error: { registrationNumber: 'Gelieve een geldig registratienummer op te geven', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Voer een geldig Employer Identification Number (EIN) in'; + case CONST.COUNTRY.CA: + return 'Voer een geldig Business Number (BN) in'; + case CONST.COUNTRY.GB: + return 'Voer een geldig btw-registratienummer (VRN) in'; + case CONST.COUNTRY.AU: + return 'Voer een geldig Australisch bedrijfsnummer (ABN) in'; + default: + return 'Voer een geldig EU btw-nummer in'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/params.ts b/src/languages/params.ts index 18291cb72588..4c42aec2409c 100644 --- a/src/languages/params.ts +++ b/src/languages/params.ts @@ -771,6 +771,10 @@ type ContactMethodsRouteParams = { contactMethodsRoute: string; }; +type BusinessTaxIDParams = { + country: string; +}; + export type { ContactMethodsRouteParams, SplitExpenseEditTitleParams, @@ -1042,4 +1046,5 @@ export type { AirlineParams, RailTicketParams, TravelTypeParams, + BusinessTaxIDParams, }; diff --git a/src/languages/pl.ts b/src/languages/pl.ts index 975f8a07d42c..e390c5a2317f 100644 --- a/src/languages/pl.ts +++ b/src/languages/pl.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2680,14 +2681,40 @@ const translations = { whatsTheBusinessAddress: 'Jaki jest adres firmy?', whatsTheBusinessContactInformation: 'Jakie są dane kontaktowe firmy?', whatsTheBusinessRegistrationNumber: 'Jaki jest numer rejestracyjny firmy?', - whatsTheBusinessTaxIDEIN: 'Jaki jest numer identyfikacyjny podatku biznesowego/ID podatkowego/VAT/numer rejestracyjny GST?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Jaki jest numer identyfikacyjny pracodawcy (EIN)?'; + case CONST.COUNTRY.CA: + return 'Jaki jest numer identyfikacyjny firmy (BN)?'; + case CONST.COUNTRY.GB: + return 'Jaki jest numer rejestracyjny VAT (VRN)?'; + case CONST.COUNTRY.AU: + return 'Jaki jest australijski numer identyfikacyjny firmy (ABN)?'; + default: + return 'Jaki jest unijny numer VAT?'; + } + }, whatsThisNumber: 'Co to za numer?', whereWasTheBusinessIncorporated: 'Gdzie została zarejestrowana firma?', whatTypeOfBusinessIsIt: 'Jaki to rodzaj działalności?', whatsTheBusinessAnnualPayment: 'Jaki jest roczny wolumen płatności firmy?', whatsYourExpectedAverageReimbursements: 'Jaka jest oczekiwana średnia kwota zwrotu?', registrationNumber: 'Numer rejestracyjny', - taxIDEIN: 'Numer identyfikacyjny podatnika/EIN', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'VAT UE'; + } + }, businessAddress: 'Adres firmowy', businessType: 'Typ działalności', incorporation: 'Inkorporacja', @@ -2711,6 +2738,20 @@ const translations = { findAverageReimbursement: 'Znajdź średnią kwotę zwrotu', error: { registrationNumber: 'Proszę podać prawidłowy numer rejestracyjny', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Proszę podać prawidłowy numer identyfikacyjny pracodawcy (EIN)'; + case CONST.COUNTRY.CA: + return 'Proszę podać prawidłowy numer identyfikacyjny firmy (BN)'; + case CONST.COUNTRY.GB: + return 'Proszę podać prawidłowy numer rejestracyjny VAT (VRN)'; + case CONST.COUNTRY.AU: + return 'Proszę podać prawidłowy australijski numer identyfikacyjny firmy (ABN)'; + default: + return 'Proszę podać prawidłowy unijny numer VAT'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/pt-BR.ts b/src/languages/pt-BR.ts index df2f4ac26110..8c7dc11a108f 100644 --- a/src/languages/pt-BR.ts +++ b/src/languages/pt-BR.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2684,14 +2685,40 @@ const translations = { whatsTheBusinessAddress: 'Qual é o endereço comercial?', whatsTheBusinessContactInformation: 'Qual é a informação de contato comercial?', whatsTheBusinessRegistrationNumber: 'Qual é o número de registro da empresa?', - whatsTheBusinessTaxIDEIN: 'Qual é o número de identificação fiscal/EIN/VAT/GST da empresa?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Qual é o Número de Identificação do Empregador (EIN)?'; + case CONST.COUNTRY.CA: + return 'Qual é o Número Comercial (BN)?'; + case CONST.COUNTRY.GB: + return 'Qual é o Número de Registro de IVA (VRN)?'; + case CONST.COUNTRY.AU: + return 'Qual é o Número Comercial Australiano (ABN)?'; + default: + return 'Qual é o número de IVA da UE?'; + } + }, whatsThisNumber: 'Qual é esse número?', whereWasTheBusinessIncorporated: 'Onde a empresa foi incorporada?', whatTypeOfBusinessIsIt: 'Que tipo de negócio é?', whatsTheBusinessAnnualPayment: 'Qual é o volume anual de pagamentos da empresa?', whatsYourExpectedAverageReimbursements: 'Qual é o seu valor médio de reembolso esperado?', registrationNumber: 'Número de registro', - taxIDEIN: 'Número de CPF/CNPJ', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return 'IVA UE'; + } + }, businessAddress: 'Endereço comercial', businessType: 'Tipo de negócio', incorporation: 'Incorporação', @@ -2715,6 +2742,20 @@ const translations = { findAverageReimbursement: 'Encontrar valor médio de reembolso', error: { registrationNumber: 'Por favor, forneça um número de registro válido.', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'Por favor, informe um Número de Identificação do Empregador (EIN) válido'; + case CONST.COUNTRY.CA: + return 'Por favor, informe um Número Comercial (BN) válido'; + case CONST.COUNTRY.GB: + return 'Por favor, informe um Número de Registro de IVA (VRN) válido'; + case CONST.COUNTRY.AU: + return 'Por favor, informe um Número Comercial Australiano (ABN) válido'; + default: + return 'Por favor, informe um número de IVA da UE válido'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/languages/zh-hans.ts b/src/languages/zh-hans.ts index 37a2d0d6f743..753c8ea3aede 100644 --- a/src/languages/zh-hans.ts +++ b/src/languages/zh-hans.ts @@ -44,6 +44,7 @@ import type { BillingBannerInsufficientFundsParams, BillingBannerOwnerAmountOwedOverdueParams, BillingBannerSubtitleWithDateParams, + BusinessTaxIDParams, CanceledRequestParams, CardEndingParams, CardInfoParams, @@ -2654,14 +2655,40 @@ const translations = { whatsTheBusinessAddress: '公司的地址是什么?', whatsTheBusinessContactInformation: '商业联系信息是什么?', whatsTheBusinessRegistrationNumber: '营业登记号码是多少?', - whatsTheBusinessTaxIDEIN: '营业税号/EIN/VAT/GST注册号是多少?', + whatsTheBusinessTaxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return '什么是雇主识别号(EIN)?'; + case CONST.COUNTRY.CA: + return '什么是商业号码(BN)?'; + case CONST.COUNTRY.GB: + return '什么是增值税注册号(VRN)?'; + case CONST.COUNTRY.AU: + return '什么是澳大利亚商业号码(ABN)?'; + default: + return '什么是欧盟增值税号?'; + } + }, whatsThisNumber: '这个号码是什么?', whereWasTheBusinessIncorporated: '公司在哪里注册成立的?', whatTypeOfBusinessIsIt: '这是什么类型的业务?', whatsTheBusinessAnnualPayment: '企业的年度支付总额是多少?', whatsYourExpectedAverageReimbursements: '您的预期平均报销金额是多少?', registrationNumber: '注册号码', - taxIDEIN: '税号/EIN号码', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return 'EIN'; + case CONST.COUNTRY.CA: + return 'BN'; + case CONST.COUNTRY.GB: + return 'VRN'; + case CONST.COUNTRY.AU: + return 'ABN'; + default: + return '欧盟VAT'; + } + }, businessAddress: '公司地址', businessType: '业务类型', incorporation: '公司注册', @@ -2685,6 +2712,20 @@ const translations = { findAverageReimbursement: '查找平均报销金额', error: { registrationNumber: '请提供有效的注册号码', + taxIDEIN: ({country}: BusinessTaxIDParams) => { + switch (country) { + case CONST.COUNTRY.US: + return '请输入有效的雇主识别号(EIN)'; + case CONST.COUNTRY.CA: + return '请输入有效的商业号码(BN)'; + case CONST.COUNTRY.GB: + return '请输入有效的增值税注册号(VRN)'; + case CONST.COUNTRY.AU: + return '请输入有效的澳大利亚商业号码(ABN)'; + default: + return '请输入有效的欧盟增值税号'; + } + }, }, }, beneficialOwnerInfoStep: { diff --git a/src/libs/ValidationUtils.ts b/src/libs/ValidationUtils.ts index 69570619da2e..8cd052d8809b 100644 --- a/src/libs/ValidationUtils.ts +++ b/src/libs/ValidationUtils.ts @@ -666,6 +666,65 @@ function isValidInputLength(inputValue: string, byteLength: number) { return {isValid: valueByteLength <= byteLength, byteLength: valueByteLength}; } +/** + * Validates the given value as a U.S. Employer Identification Number (EIN). + * Format: XX-XXXXXXX + * @param ein - The EIN to validate. + */ +function isValidEIN(ein: string): boolean { + return /^\d{2}-\d{7}$/.test(ein); +} + +/** + * Validates the given value as a UK VAT Registration Number (VRN). + * Format: Optional "GB" prefix followed by 9 digits. + * @param vrn - The VRN to validate. + */ +function isValidVRN(vrn: string): boolean { + return /^(GB)?\d{9}$/.test(vrn); +} + +/** + * Validates the given value as a Canadian Business Number (BN). + * Format: 9 digits, optionally followed by a 2-letter program ID and 4-digit reference number. + * Valid program IDs include: RT, RC, RM, RP, etc. + * @param bn - The Business Number to validate. + */ +function isValidBN(bn: string): boolean { + return /^\d{9}([A-Z]{2}\d{4})?$/.test(bn); +} + +/** + * Validates the given value as a European Union VAT Number. + * Format: Two-letter country code followed by 8–12 alphanumeric characters. + * @param vat - The VAT number to validate. + * @returns True if the value is a valid EU VAT number; otherwise, false. + */ +function isValidEUVATNumber(vat: string): boolean { + return /^[A-Z]{2}[A-Z0-9]{8,12}$/.test(vat); +} + +/** + * Validates the given value as a country-specific tax identification number. + * Delegates to the appropriate country-specific validation function. + * @param number - The tax ID number to validate. + * @param country - The country code (e.g., 'US', 'GB', 'CA', 'AU'). + */ +function isValidTaxIDEINNumber(number: string, country: Country | '') { + switch (country) { + case CONST.COUNTRY.AU: + return isValidABN(number); + case CONST.COUNTRY.GB: + return isValidVRN(number); + case CONST.COUNTRY.CA: + return isValidBN(number); + case CONST.COUNTRY.US: + return isValidEIN(number); + default: + return isValidEUVATNumber(number); + } +} + export { meetsMinimumAgeRequirement, meetsMaximumAgeRequirement, @@ -718,4 +777,5 @@ export { isValidOwnershipPercentage, isValidRegistrationNumber, isValidInputLength, + isValidTaxIDEINNumber, }; diff --git a/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/Confirmation.tsx b/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/Confirmation.tsx index 6fec5a6be100..631ccd1e7cab 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/Confirmation.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/Confirmation.tsx @@ -101,7 +101,7 @@ function Confirmation({onNext, onMove, isEditing}: SubStepProps) { }, { title: values[TAX_ID_EIN_NUMBER], - description: translate('businessInfoStep.taxIDEIN'), + description: translate('businessInfoStep.taxIDEIN', {country: values[COMPANY_COUNTRY_CODE]}), shouldShowRightIcon: true, onPress: () => { onMove(5); diff --git a/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/TaxIDEINNumber.tsx b/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/TaxIDEINNumber.tsx index 618cd56160d8..9fe57450adcb 100644 --- a/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/TaxIDEINNumber.tsx +++ b/src/pages/ReimbursementAccount/NonUSD/BusinessInfo/subSteps/TaxIDEINNumber.tsx @@ -5,24 +5,36 @@ import SingleFieldStep from '@components/SubStepForms/SingleFieldStep'; import useLocalize from '@hooks/useLocalize'; import useReimbursementAccountStepFormSubmit from '@hooks/useReimbursementAccountStepFormSubmit'; import type {SubStepProps} from '@hooks/useSubStep/types'; -import {getFieldRequiredErrors} from '@libs/ValidationUtils'; +import {getFieldRequiredErrors, isValidTaxIDEINNumber} from '@libs/ValidationUtils'; import ONYXKEYS from '@src/ONYXKEYS'; import INPUT_IDS from '@src/types/form/ReimbursementAccountForm'; type TaxIDEINNumberProps = SubStepProps; -const {TAX_ID_EIN_NUMBER} = INPUT_IDS.ADDITIONAL_DATA.CORPAY; +const {TAX_ID_EIN_NUMBER, COMPANY_COUNTRY_CODE} = INPUT_IDS.ADDITIONAL_DATA.CORPAY; const STEP_FIELDS = [TAX_ID_EIN_NUMBER]; function TaxIDEINNumber({onNext, onMove, isEditing}: TaxIDEINNumberProps) { const {translate} = useLocalize(); - const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT); + const [reimbursementAccount] = useOnyx(ONYXKEYS.REIMBURSEMENT_ACCOUNT, {canBeMissing: false}); + const [reimbursementAccountDraft] = useOnyx(ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM_DRAFT, {canBeMissing: false}); + const defaultValue = reimbursementAccount?.achData?.corpay?.[TAX_ID_EIN_NUMBER] ?? ''; + const businessStepCountryValue = reimbursementAccount?.achData?.corpay?.[COMPANY_COUNTRY_CODE] ?? reimbursementAccountDraft?.[COMPANY_COUNTRY_CODE] ?? ''; + + const validate = useCallback( + (values: FormOnyxValues): FormInputErrors => { + const errors = getFieldRequiredErrors(values, STEP_FIELDS); - const validate = useCallback((values: FormOnyxValues): FormInputErrors => { - return getFieldRequiredErrors(values, STEP_FIELDS); - }, []); + if (values[TAX_ID_EIN_NUMBER] && !isValidTaxIDEINNumber(values[TAX_ID_EIN_NUMBER], businessStepCountryValue)) { + errors[TAX_ID_EIN_NUMBER] = translate('businessInfoStep.error.taxIDEIN', {country: businessStepCountryValue}); + } + + return errors; + }, + [businessStepCountryValue, translate], + ); const handleSubmit = useReimbursementAccountStepFormSubmit({ fieldIds: STEP_FIELDS, @@ -36,11 +48,11 @@ function TaxIDEINNumber({onNext, onMove, isEditing}: TaxIDEINNumberProps) { onNext={onNext} onMove={onMove} formID={ONYXKEYS.FORMS.REIMBURSEMENT_ACCOUNT_FORM} - formTitle={translate('businessInfoStep.whatsTheBusinessTaxIDEIN')} + formTitle={translate('businessInfoStep.whatsTheBusinessTaxIDEIN', {country: businessStepCountryValue})} validate={validate} onSubmit={handleSubmit} inputId={TAX_ID_EIN_NUMBER} - inputLabel={translate('businessInfoStep.taxIDEIN')} + inputLabel={translate('businessInfoStep.taxIDEIN', {country: businessStepCountryValue})} defaultValue={defaultValue} shouldShowHelpLinks={false} />