Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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 src/CONST/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3497,7 +3497,7 @@ const CONST = {
EXPORTER: 'exporter',
EXPORT_DATE: 'exportDate',
REIMBURSABLE: 'reimbursable',
COMPANY_CARD: 'companyCard',
NON_REIMBURSABLE: 'nonReimbursable',
DEFAULT_VENDORID: 'defaultVendorID',
CREDIT_CARD_ACCOUNTCODE: 'creditCardAccountCode',
EXPORT_TO_MULTIPLE_ACCOUNTS: 'exportToMultipleAccounts',
Expand All @@ -3522,8 +3522,8 @@ const CONST = {
VENDOR_BILL: 'VENDOR_BILL',
},

RILLET_EXPORT_COMPANY_CARD: {
CREDIT_CARD: 'CREDIT_CARD',
RILLET_EXPORT_NON_REIMBURSABLE: {
CREDIT_CARD_CHARGE: 'CREDIT_CARD_CHARGE',
},

RILLET_EXPORT_DATE: {
Expand Down
2 changes: 1 addition & 1 deletion src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5696,7 +5696,7 @@ _Für ausführlichere Anweisungen [besuchen Sie unsere Hilfeseite](${CONST.NETSU
},
},
},
exportCompanyCard: {label: 'Firmenkartenausgaben exportieren als', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Kreditkarten'}}},
exportNonReimbursable: {label: 'Firmenkartenausgaben exportieren als', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Kreditkarten'}}},
defaultCompanyCardVendor: {
label: 'Standardanbieter für Firmenkarten',
description: 'Wählen Sie einen standardmäßigen Rillet-Anbieter für Ausgaben, die nicht automatisch zugeordnet werden.',
Expand Down
4 changes: 2 additions & 2 deletions src/languages/el.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5802,10 +5802,10 @@ _Για πιο αναλυτικές οδηγίες, [επισκεφθείτε τ
},
},
},
exportCompanyCard: {
exportNonReimbursable: {
label: 'Εξαγωγή εξόδων εταιρικής κάρτας ως',
values: {
[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {
[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {
label: 'Πιστωτικές κάρτες',
},
},
Expand Down
4 changes: 2 additions & 2 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5782,10 +5782,10 @@ const translations = {
},
},
},
exportCompanyCard: {
exportNonReimbursable: {
label: 'Export company card expenses as',
values: {
[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {
[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {
label: 'Credit cards',
},
},
Expand Down
5 changes: 4 additions & 1 deletion src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5545,7 +5545,10 @@ ${amount} para ${merchant} - ${date}`,
},
},
},
exportCompanyCard: {label: 'Exportar gastos de tarjetas de empresa como', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Tarjetas de crédito'}}},
exportNonReimbursable: {
label: 'Exportar gastos de tarjetas de empresa como',
values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Tarjetas de crédito'}},
},
defaultCompanyCardVendor: {
label: 'Proveedor predeterminado de la tarjeta de empresa',
description: 'Elige un proveedor Rillet predeterminado para los gastos que no se asignen automáticamente.',
Expand Down
5 changes: 4 additions & 1 deletion src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5706,7 +5706,10 @@ _Pour des instructions plus détaillées, [visitez notre site d’aide](${CONST.
},
},
},
exportCompanyCard: {label: 'Exporter les dépenses de carte d’entreprise en tant que', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Cartes de crédit'}}},
exportNonReimbursable: {
label: 'Exporter les dépenses de carte d’entreprise en tant que',
values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Cartes de crédit'}},
},
defaultCompanyCardVendor: {
label: 'Fournisseur de carte entreprise par défaut',
description: 'Choisissez un fournisseur Rillet par défaut pour les dépenses qui ne correspondent pas automatiquement.',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5670,7 +5670,7 @@ _Per istruzioni più dettagliate, [visita il nostro sito di assistenza](${CONST.
},
},
},
exportCompanyCard: {label: 'Esporta le spese della carta aziendale come', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Carte di credito'}}},
exportNonReimbursable: {label: 'Esporta le spese della carta aziendale come', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Carte di credito'}}},
defaultCompanyCardVendor: {
label: 'Fornitore predefinito della carta aziendale',
description: 'Scegli un fornitore Rillet predefinito per le spese che non vengono abbinate automaticamente.',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5613,7 +5613,7 @@ _詳しい手順については、[ヘルプサイトをご覧ください](${CO
},
},
},
exportCompanyCard: {label: '会社カード経費のエクスポート形式', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'クレジットカード'}}},
exportNonReimbursable: {label: '会社カード経費のエクスポート形式', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'クレジットカード'}}},
defaultCompanyCardVendor: {label: 'デフォルトの会社カードベンダー', description: '自動的に一致しない経費に使用する既定の Rillet ベンダーを選択してください。'},
companyCardAccount: {label: '会社カード口座', description: '会社カード取引のエクスポート先を選択してください。'},
noBankAccountsFound: '銀行口座が見つかりません',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5664,7 +5664,7 @@ _Voor meer gedetailleerde instructies, [bezoek onze help-site](${CONST.NETSUITE_
},
},
},
exportCompanyCard: {label: 'Bedrijfspaskosten exporteren als', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Creditcards'}}},
exportNonReimbursable: {label: 'Bedrijfspaskosten exporteren als', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Creditcards'}}},
defaultCompanyCardVendor: {label: 'Standaard leverancier bedrijfspas', description: 'Kies een standaard Rillet-leverancier voor uitgaven die niet automatisch worden gekoppeld.'},
companyCardAccount: {label: 'Bedrijfskaartrekening', description: 'Kies waar je transacties van bedrijfskaarten naartoe wilt exporteren.'},
noBankAccountsFound: 'Geen bankrekeningen gevonden',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5649,7 +5649,7 @@ _Aby uzyskać bardziej szczegółowe instrukcje, [odwiedź naszą stronę pomocy
},
},
},
exportCompanyCard: {label: 'Eksportuj wydatki z firmowej karty jako', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Karty kredytowe'}}},
exportNonReimbursable: {label: 'Eksportuj wydatki z firmowej karty jako', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Karty kredytowe'}}},
defaultCompanyCardVendor: {label: 'Domyślny dostawca karty firmowej', description: 'Wybierz domyślnego dostawcę Rillet dla wydatków, które nie dopasują się automatycznie.'},
companyCardAccount: {label: 'Konto karty firmowej', description: 'Wybierz miejsce eksportu transakcji z kart firmowych.'},
noBankAccountsFound: 'Nie znaleziono żadnych kont bankowych',
Expand Down
5 changes: 4 additions & 1 deletion src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5658,7 +5658,10 @@ _Para instruções mais detalhadas, [visite nossa central de ajuda](${CONST.NETS
},
},
},
exportCompanyCard: {label: 'Exportar despesas de cartão corporativo como', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: 'Cartões de crédito'}}},
exportNonReimbursable: {
label: 'Exportar despesas de cartão corporativo como',
values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: 'Cartões de crédito'}},
},
defaultCompanyCardVendor: {
label: 'Fornecedor padrão do cartão corporativo',
description: 'Escolha um fornecedor Rillet padrão para despesas que não forem correspondidas automaticamente.',
Expand Down
2 changes: 1 addition & 1 deletion src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5488,7 +5488,7 @@ _如需更详细的说明,请[访问我们的帮助网站](${CONST.NETSUITE_IM
},
},
},
exportCompanyCard: {label: '导出公司卡费用为', values: {[CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD]: {label: '信用卡'}}},
exportNonReimbursable: {label: '导出公司卡费用为', values: {[CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE]: {label: '信用卡'}}},
defaultCompanyCardVendor: {label: '默认公司卡供应商', description: '为未自动匹配的报销选择一个默认的 Rillet 供应商。'},
companyCardAccount: {label: '公司卡账户', description: '选择公司卡交易的导出位置。'},
noBankAccountsFound: '未找到银行账户',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function RilletExportPage({policy}: WithPolicyConnectionsProps) {
const exporter = rilletConfig?.export?.exporter ?? policyOwner;
const exportReimbursable = rilletConfig?.export?.reimbursable ?? CONST.RILLET_EXPORT_REIMBURSABLE.VENDOR_BILL;
const exportDate = rilletConfig?.export?.exportDate ?? CONST.RILLET_EXPORT_DATE.LAST_EXPENSE;
const exportCompanyCard = rilletConfig?.export?.companyCard ?? CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD;
const exportNonReimbursable = rilletConfig?.export?.nonReimbursable ?? CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE;
const defaultCompanyCardVendor = rilletData?.vendors?.find((vendor) => vendor.id === rilletConfig?.export?.defaultVendorID);
const companyCardAccount = rilletData?.accounts?.find((account) => account.code === rilletConfig?.export?.creditCardAccountCode);
const exportToMultipleAccounts = rilletConfig?.export?.exportToMultipleAccounts ?? false;
Expand Down Expand Up @@ -97,13 +97,13 @@ function RilletExportPage({policy}: WithPolicyConnectionsProps) {
/>
</OfflineWithFeedback>
<View style={[styles.mv3, styles.mh5, styles.borderTop]} />
<OfflineWithFeedback pendingAction={settingsPendingAction([CONST.RILLET_CONFIG.COMPANY_CARD], rilletConfig?.pendingFields)}>
<OfflineWithFeedback pendingAction={settingsPendingAction([CONST.RILLET_CONFIG.NON_REIMBURSABLE], rilletConfig?.pendingFields)}>
<MenuItemWithTopDescription
title={translate(`workspace.rillet.exportCompanyCard.values.${exportCompanyCard}.label`)}
description={translate('workspace.rillet.exportCompanyCard.label')}
title={translate(`workspace.rillet.exportNonReimbursable.values.${exportNonReimbursable}.label`)}
Comment thread
s77rt marked this conversation as resolved.
description={translate('workspace.rillet.exportNonReimbursable.label')}
onPress={() => {}}
interactive={false}
brickRoadIndicator={areSettingsInErrorFields([CONST.RILLET_CONFIG.COMPANY_CARD], rilletConfig?.errorFields) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
brickRoadIndicator={areSettingsInErrorFields([CONST.RILLET_CONFIG.NON_REIMBURSABLE], rilletConfig?.errorFields) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined}
/>
</OfflineWithFeedback>
<OfflineWithFeedback pendingAction={settingsPendingAction([CONST.RILLET_CONFIG.DEFAULT_VENDORID], rilletConfig?.pendingFields)}>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/accounting/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ function getAccountingIntegrationData(
CONST.RILLET_CONFIG.EXPORTER,
CONST.RILLET_CONFIG.EXPORT_DATE,
CONST.RILLET_CONFIG.REIMBURSABLE,
CONST.RILLET_CONFIG.COMPANY_CARD,
CONST.RILLET_CONFIG.NON_REIMBURSABLE,
CONST.RILLET_CONFIG.DEFAULT_VENDORID,
CONST.RILLET_CONFIG.CREDIT_CARD_ACCOUNTCODE,
CONST.RILLET_CONFIG.EXPORT_TO_MULTIPLE_ACCOUNTS,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/workspace/companyCards/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,11 +382,11 @@ function getExportMenuItem(
const rilletData = policy?.connections?.rillet?.data;
const exportType = CONST.COMPANY_CARDS.EXPORT_CARD_TYPES.NVP_RILLET_EXPORT_ACCOUNT;
const exportReimbursable = rilletConfig?.export?.reimbursable ?? CONST.RILLET_EXPORT_REIMBURSABLE.VENDOR_BILL;
const exportCompanyCard = rilletConfig?.export?.companyCard ?? CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD;
const exportNonReimbursable = rilletConfig?.export?.nonReimbursable ?? CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE;
const shouldShowMenuItem =
rilletConfig?.export?.exportToMultipleAccounts &&
exportReimbursable === CONST.RILLET_EXPORT_REIMBURSABLE.VENDOR_BILL &&
exportCompanyCard === CONST.RILLET_EXPORT_COMPANY_CARD.CREDIT_CARD;
exportNonReimbursable === CONST.RILLET_EXPORT_NON_REIMBURSABLE.CREDIT_CARD_CHARGE;
const creditCardAccountCode = rilletConfig?.export?.creditCardAccountCode;
const cardProgramsUsingCustomAccounts = rilletConfig?.export?.cardProgramAccounts;
const cardProgramAccountCode = (companyCard?.bank ? cardProgramsUsingCustomAccounts?.[companyCard.bank] : undefined) ?? creditCardAccountCode;
Expand Down
8 changes: 4 additions & 4 deletions src/types/onyx/Policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1806,9 +1806,9 @@ type RilletExportDate = ValueOf<typeof CONST.RILLET_EXPORT_DATE>;
type RilletExportReimbursable = ValueOf<typeof CONST.RILLET_EXPORT_REIMBURSABLE>;

/**
* Export strategy for company card expenses.
* Export strategy for non-reimbursable expenses.
*/
type RilletExportCompanyCard = ValueOf<typeof CONST.RILLET_EXPORT_COMPANY_CARD>;
type RilletExportNonReimbursable = ValueOf<typeof CONST.RILLET_EXPORT_NON_REIMBURSABLE>;

/**
* Export configuration for sending accounting data to Rillet.
Expand All @@ -1823,8 +1823,8 @@ type RilletExport = {
/** Export behavior for reimbursable expenses. */
reimbursable: RilletExportReimbursable;

/** Export behavior for company card expenses. */
companyCard: RilletExportCompanyCard;
/** Export behavior for non-reimbursable expenses. */
nonReimbursable: RilletExportNonReimbursable;

/** Default vendor to associate with exported transactions. */
defaultVendorID: string;
Expand Down
Loading