Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions config/eslint/eslint.seatbelt.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,7 @@
"../../tests/unit/MentionUserRendererTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 8
"../../tests/unit/MentionUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 4
"../../tests/unit/MiddlewareTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 20
"../../tests/unit/ModifiedExpenseMessageTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 6
"../../tests/unit/ModifiedExpenseMessageTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 7
"../../tests/unit/ModifiedExpenseMessageTest.ts" "no-restricted-imports" 1
"../../tests/unit/MoneyRequestReportTransactionListActiveTransactionIDsTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 2
"../../tests/unit/MoneyRequestReportUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 8
Expand Down Expand Up @@ -1798,7 +1798,7 @@
"../../tests/unit/PersonalDetailsSelectorTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 5
"../../tests/unit/PolicyChangeLogContentTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 4
"../../tests/unit/PolicySelectorTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 22
"../../tests/unit/PolicyUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 111
"../../tests/unit/PolicyUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 119
"../../tests/unit/PopoverMenuV2Test.tsx" "@typescript-eslint/no-unsafe-type-assertion" 4
"../../tests/unit/PressResponderTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../tests/unit/QuickActionUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 7
Expand Down Expand Up @@ -1866,7 +1866,7 @@
"../../tests/unit/ValidateAttachmentFileTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 5
"../../tests/unit/ValidationUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 3
"../../tests/unit/VideoRendererTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 1
"../../tests/unit/ViolationUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 20
"../../tests/unit/ViolationUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 22
"../../tests/unit/WhisperContentMentionContextTest.tsx" "@typescript-eslint/no-unsafe-type-assertion" 3
"../../tests/unit/WorkflowUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 8
"../../tests/unit/WorkspaceReportFieldUtilsTest.ts" "@typescript-eslint/no-unsafe-type-assertion" 2
Expand Down
1 change: 1 addition & 0 deletions src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2983,6 +2983,7 @@ const CONST = {
},
ACCOUNTING_METHOD: 'accountingMethod',
TRAVEL_INVOICING_PAYABLE_ACCOUNT: 'travelInvoicingPayableAccountID',
DEFAULT_CONTACT: 'defaultContact',
},

SAGE_INTACCT_MAPPING_VALUE: {
Expand Down
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ const DYNAMIC_ROUTES = {
path: 'bank-account-select',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
},
POLICY_ACCOUNTING_XERO_NON_REIMBURSABLE_DEFAULT_CONTACT_SELECT: {
path: 'default-supplier-select',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
},
POLICY_ACCOUNTING_XERO_BILL_STATUS_SELECTOR: {
path: 'purchase-bill-status-selector',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_XERO_EXPORT],
Expand Down
1 change: 1 addition & 0 deletions src/SCREENS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -625,6 +625,7 @@ const SCREENS = {
DYNAMIC_XERO_EXPORT_PREFERRED_EXPORTER_SELECT: 'Dynamic_Workspace_Accounting_Xero_Export_Preferred_Exporter_Select',
XERO_BILL_PAYMENT_ACCOUNT_SELECTOR: 'Policy_Accounting_Xero_Bill_Payment_Account_Selector',
DYNAMIC_XERO_EXPORT_BANK_ACCOUNT_SELECT: 'Dynamic_Policy_Accounting_Xero_Export_Bank_Account_Select',
DYNAMIC_XERO_NON_REIMBURSABLE_DEFAULT_CONTACT_SELECT: 'Dynamic_Policy_Accounting_Xero_Non_Reimbursable_Default_Contact_Select',
NETSUITE_IMPORT_MAPPING: 'Policy_Accounting_NetSuite_Import_Mapping',
NETSUITE_IMPORT_CUSTOM_FIELD: 'Policy_Accounting_NetSuite_Import_Custom_Field',
NETSUITE_IMPORT_CUSTOM_FIELD_VIEW: 'Policy_Accounting_NetSuite_Import_Custom_Field_View',
Expand Down
4 changes: 3 additions & 1 deletion src/components/ReportActionItem/MoneyRequestView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ import {
isMultiLevelTags,
isPolicyAccessible,
isTaxTrackingEnabled,
isXeroActiveMatchingSource,
} from '@libs/PolicyUtils';
import {getOriginalMessage, isMoneyRequestAction} from '@libs/ReportActionsUtils';
import {getReportName} from '@libs/ReportNameUtils';
Expand Down Expand Up @@ -473,6 +474,7 @@ function MoneyRequestView({
const transactionVendor = transaction?.comment?.vendor;
const transactionVendorName = findVendorByID(policy, transactionVendor?.externalID)?.name ?? '';
const shouldShowVendor = hasVendorFeature(policy, isBetaEnabled(CONST.BETAS.VENDOR_MATCHING)) && !(updatedTransaction?.reimbursable ?? !!transactionReimbursable) && !isInvoice;
const vendorFieldLabel = isXeroActiveMatchingSource(policy) ? translate('common.supplier') : translate('common.vendor');

const tripID = getTripIDFromTransactionParentReportID(parentReport?.parentReportID);
const shouldShowViewTripDetails = hasReservationList(transaction) && !!tripID;
Expand Down Expand Up @@ -1263,7 +1265,7 @@ function MoneyRequestView({
{shouldShowVendor && (
<OfflineWithFeedback pendingAction={getPendingFieldAction('vendor')}>
<MenuItemWithTopDescription
description={translate('common.vendor')}
description={vendorFieldLabel}
title={transactionVendorName}
numberOfLinesTitle={2}
interactive={canEdit}
Expand Down
6 changes: 5 additions & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Ändern',
category: 'Kategorie',
vendor: 'Anbieter',
supplier: 'Lieferant',
report: 'Bericht',
billable: 'Abrechenbar',
nonBillable: 'Nicht abrechenbar',
Expand Down Expand Up @@ -4904,6 +4905,10 @@ ${amount} für ${merchant} – ${date}`,
},
noAccountsFound: 'Keine Konten gefunden',
noAccountsFoundDescription: 'Bitte fügen Sie das Konto in Xero hinzu und synchronisieren Sie die Verbindung erneut',
defaultSupplier: 'Standardlieferant',
defaultSupplierDescription: 'Legen Sie einen Standardsupplier fest, der beim Export auf alle Kreditkartentransaktionen angewendet wird.',
noSuppliersFound: 'Keine Lieferanten gefunden',
noSuppliersFoundDescription: 'Bitte fügen Sie den Lieferanten in Xero hinzu und synchronisieren Sie die Verbindung erneut.',
accountingMethods: {
label: 'Wann exportieren',
description: 'Wähle aus, wann die Ausgaben exportiert werden sollen:',
Expand Down Expand Up @@ -9718,7 +9723,6 @@ Hier ist ein *Testbeleg*, um dir zu zeigen, wie es funktioniert:`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
5 changes: 5 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ const translations = {
change: 'Change',
category: 'Category',
vendor: 'Vendor',
supplier: 'Supplier',
report: 'Report',
billable: 'Billable',
nonBillable: 'Non-billable',
Expand Down Expand Up @@ -4997,6 +4998,10 @@ const translations = {
},
noAccountsFound: 'No accounts found',
noAccountsFoundDescription: 'Please add the account in Xero and sync the connection again',
defaultSupplier: 'Default supplier',
defaultSupplierDescription: 'Set a default supplier that will apply to all credit card transactions upon export.',
noSuppliersFound: 'No suppliers found',
noSuppliersFoundDescription: 'Please add the supplier in Xero and sync the connection again.',
accountingMethods: {
label: 'When to Export',
description: 'Choose when to export the expenses:',
Expand Down
5 changes: 5 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Cambio',
category: 'Categoría',
vendor: 'Proveedor',
supplier: 'Proveedor',
report: 'Informe',
billable: 'Facturable',
nonBillable: 'No facturable',
Expand Down Expand Up @@ -4785,6 +4786,10 @@ ${amount} para ${merchant} - ${date}`,
},
noAccountsFound: 'No se ha encontrado ninguna cuenta',
noAccountsFoundDescription: 'Añade la cuenta en Xero y sincroniza de nuevo la conexión',
defaultSupplier: 'Proveedor predeterminado',
defaultSupplierDescription: 'Establece un proveedor predeterminado que se aplicará a todas las transacciones con tarjeta de crédito al exportar.',
noSuppliersFound: 'No se encontraron proveedores',
noSuppliersFoundDescription: 'Por favor, añade el proveedor en Xero y sincroniza de nuevo la conexión.',
accountingMethods: {
label: 'Cuándo Exportar',
description: 'Elige cuándo exportar los gastos:',
Expand Down
6 changes: 5 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Modifier',
category: 'Catégorie',
vendor: 'Fournisseur',
supplier: 'Fournisseur',
report: 'Note de frais',
billable: 'Facturable',
nonBillable: 'Non refacturable',
Expand Down Expand Up @@ -4916,6 +4917,10 @@ ${amount} pour ${merchant} - ${date}`,
},
noAccountsFound: 'Aucun compte trouvé',
noAccountsFoundDescription: 'Veuillez ajouter le compte dans Xero et synchroniser à nouveau la connexion',
defaultSupplier: 'Fournisseur par défaut',
defaultSupplierDescription: 'Définissez un fournisseur par défaut qui s’appliquera à toutes les transactions par carte de crédit lors de l’exportation.',
noSuppliersFound: 'Aucun fournisseur trouvé',
noSuppliersFoundDescription: 'Veuillez ajouter le fournisseur dans Xero et synchroniser à nouveau la connexion.',
accountingMethods: {
label: 'Quand exporter',
description: 'Choisissez quand exporter les dépenses :',
Expand Down Expand Up @@ -9750,7 +9755,6 @@ Voici un *reçu test* pour vous montrer comment ça fonctionne :`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Modifica',
category: 'Categoria',
vendor: 'Fornitore',
supplier: 'Fornitore',
report: 'Report',
billable: 'Fatturabile',
nonBillable: 'Non fatturabile',
Expand Down Expand Up @@ -4889,6 +4890,10 @@ ${amount} per ${merchant} - ${date}`,
},
noAccountsFound: 'Nessun account trovato',
noAccountsFoundDescription: 'Aggiungi l’account in Xero e sincronizza nuovamente la connessione',
defaultSupplier: 'Fornitore predefinito',
defaultSupplierDescription: 'Imposta un fornitore predefinito che verrà applicato a tutte le transazioni con carta di credito al momento dell’esportazione.',
noSuppliersFound: 'Nessun fornitore trovato',
noSuppliersFoundDescription: 'Aggiungi il fornitore in Xero e sincronizza di nuovo la connessione.',
accountingMethods: {
label: 'Quando esportare',
description: 'Scegli quando esportare le spese:',
Expand Down Expand Up @@ -9706,7 +9711,6 @@ Ecco una *ricevuta di prova* per mostrarti come funziona:`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: '変更',
category: 'カテゴリ',
vendor: 'ベンダー',
supplier: 'サプライヤー',
report: 'レポート',
billable: '請求可能',
nonBillable: '請求不可',
Expand Down Expand Up @@ -4849,6 +4850,10 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
},
noAccountsFound: 'アカウントが見つかりません',
noAccountsFoundDescription: 'Xero にアカウントを追加して、もう一度同期してください',
defaultSupplier: 'デフォルト仕入先',
defaultSupplierDescription: 'エクスポート時にすべてのクレジットカード取引に適用されるデフォルトの仕入先を設定します。',
noSuppliersFound: '仕入先が見つかりません',
noSuppliersFoundDescription: 'Xero に仕入先を追加して、もう一度同期してください。',
accountingMethods: {
label: 'エクスポートのタイミング',
description: '経費をエクスポートするタイミングを選択:',
Expand Down Expand Up @@ -9583,7 +9588,6 @@ ${reportName}`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Wijzigen',
category: 'Categorie',
vendor: 'Leverancier',
supplier: 'Leverancier',
report: 'Rapport',
billable: 'Factureerbaar',
nonBillable: 'Niet-factureerbaar',
Expand Down Expand Up @@ -4879,6 +4880,10 @@ ${amount} voor ${merchant} - ${date}`,
},
noAccountsFound: 'Geen accounts gevonden',
noAccountsFoundDescription: 'Voeg het account toe in Xero en synchroniseer de verbinding opnieuw',
defaultSupplier: 'Standaardleverancier',
defaultSupplierDescription: 'Stel een standaardsupplier in die wordt toegepast op alle creditcardtransacties bij het exporteren.',
noSuppliersFound: 'Geen leveranciers gevonden',
noSuppliersFoundDescription: 'Voeg de leverancier toe in Xero en synchroniseer de koppeling opnieuw.',
accountingMethods: {
label: 'Wanneer exporteren',
description: 'Kies wanneer de onkosten moeten worden geëxporteerd:',
Expand Down Expand Up @@ -9672,7 +9677,6 @@ Hier is een *proefbon* om je te laten zien hoe het werkt:`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Zmień',
category: 'Kategoria',
vendor: 'Dostawca',
supplier: 'Dostawca',
report: 'Raport',
billable: 'Fakturowalne',
nonBillable: 'Nierozliczalne',
Expand Down Expand Up @@ -4872,6 +4873,10 @@ ${amount} dla ${merchant} - ${date}`,
},
noAccountsFound: 'Nie znaleziono kont',
noAccountsFoundDescription: 'Dodaj proszę konto w Xero i zsynchronizuj połączenie ponownie',
defaultSupplier: 'Domyślny dostawca',
defaultSupplierDescription: 'Ustaw domyślnego dostawcę, który zostanie zastosowany do wszystkich transakcji kartą kredytową podczas eksportu.',
noSuppliersFound: 'Nie znaleziono dostawców',
noSuppliersFoundDescription: 'Dodaj dostawcę w Xero i zsynchronizuj połączenie ponownie.',
accountingMethods: {
label: 'Kiedy eksportować',
description: 'Wybierz, kiedy eksportować wydatki:',
Expand Down Expand Up @@ -9657,7 +9662,6 @@ Oto *paragon testowy*, żeby pokazać Ci, jak to działa:`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: 'Alterar',
category: 'Categoria',
vendor: 'Fornecedor',
supplier: 'Fornecedor',
report: 'Relatório',
billable: 'Faturável',
nonBillable: 'Não faturável',
Expand Down Expand Up @@ -4871,6 +4872,10 @@ ${amount} para ${merchant} - ${date}`,
},
noAccountsFound: 'Nenhuma conta encontrada',
noAccountsFoundDescription: 'Adicione a conta no Xero e sincronize a conexão novamente',
defaultSupplier: 'Fornecedor padrão',
defaultSupplierDescription: 'Defina um fornecedor padrão que será aplicado a todas as transações de cartão de crédito na exportação.',
noSuppliersFound: 'Nenhum fornecedor encontrado',
noSuppliersFoundDescription: 'Adicione o fornecedor no Xero e sincronize a conexão novamente.',
accountingMethods: {
label: 'Quando Exportar',
description: 'Escolha quando exportar as despesas:',
Expand Down Expand Up @@ -9661,7 +9666,6 @@ Aqui está um *comprovante de teste* para mostrar como funciona:`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
6 changes: 5 additions & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,7 @@ const translations: TranslationDeepObject<typeof en> = {
change: '更改',
category: '类别',
vendor: '供应商',
supplier: '供应商',
report: '报表',
billable: '可计费',
nonBillable: '不可计费',
Expand Down Expand Up @@ -4753,6 +4754,10 @@ ${amount},商户:${merchant} - 日期:${date}`,
},
noAccountsFound: '未找到账户',
noAccountsFoundDescription: '请在 Xero 中添加该账户,然后再次同步连接',
defaultSupplier: '默认供应商',
defaultSupplierDescription: '设置一个默认供应商,在导出时应用于所有信用卡交易。',
noSuppliersFound: '未找到供应商',
noSuppliersFoundDescription: '请在 Xero 中添加该供应商,然后再次同步连接。',
accountingMethods: {
label: '何时导出',
description: '选择何时导出报销:',
Expand Down Expand Up @@ -9401,7 +9406,6 @@ ${reportName}`,
pdfFailedBody: 'Your file could not be generated. Try again, or reach out to Concierge for help.',
readyPartialBody: ({count, total}: {count: number; total: number}) =>
`${count} of ${total} reports exported. If it didn't automatically download, use the button below. See which reports failed in <concierge-link>Concierge</concierge-link>.`,

close: 'Close',
},
domain: {
Expand Down
Loading
Loading