Skip to content
Open
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
4 changes: 4 additions & 0 deletions src/ROUTES.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,10 @@ const DYNAMIC_ROUTES = {
path: 'sage-intacct/prerequisites',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.ROOT, SCREENS.WORKSPACE.ACCOUNTING.EXISTING_SAGE_INTACCT_CONNECTIONS],
},
POLICY_ACCOUNTING_CERTINIA_ADVANCED: {
path: 'certinia/advanced',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.ROOT],
},
POLICY_ACCOUNTING_NETSUITE_EXPORT_EXPENSES_VENDOR_SELECT: {
path: 'vendor/select',
entryScreens: [SCREENS.WORKSPACE.ACCOUNTING.DYNAMIC_NETSUITE_EXPORT_EXPENSES],
Expand Down
3 changes: 3 additions & 0 deletions src/languages/de.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4861,6 +4861,9 @@ ${amount} für ${merchant} – ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify wird jeden Tag automatisch mit Certinia synchronisiert.',
syncReimbursedReportsDescription:
'Wenn diese Option aktiviert ist, wird jedes Mal, wenn eine zu zahlende Rechnung in FFA bezahlt wird, der zugehörige Expensify-Bericht automatisch als erstattet markiert.',
prerequisites: {
title: 'Bevor Sie die Verbindung herstellen',
installBundle: 'Für FFA-Verbindungen',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4940,6 +4940,8 @@ const translations = {
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify will automatically sync with Certinia every day.',
syncReimbursedReportsDescription: 'With this option enabled, anytime a Payable Invoice is paid in FFA, the related Expensify report will be automatically marked as reimbursed.',
prerequisites: {
title: 'Before you connect',
installBundle: 'For FFA Connections',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/es.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4748,6 +4748,9 @@ ${amount} para ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify se sincronizará automáticamente con Certinia cada día.',
syncReimbursedReportsDescription:
'Con esta opción habilitada, cada vez que se pague una factura por pagar en FFA, el informe de Expensify relacionado se marcará automáticamente como reembolsado.',
prerequisites: {
title: 'Antes de conectarte',
installBundle: 'Para conexiones FFA',
Expand Down
7 changes: 5 additions & 2 deletions src/languages/fr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2808,9 +2808,9 @@ ${amount} pour ${merchant} - ${date}`,
title: 'Modifier l’agent',
agentName: 'Nom de l’agent',
instructions: 'Écrire des instructions personnalisées',
chatWithAgent: 'Discuter avec l\u2019agent',
chatWithAgent: 'Discuter avec l’agent',
copilotIntoAccount: 'Copilote dans le compte',
deleteAgent: 'Supprimer l\u2019agent',
deleteAgent: 'Supprimer l’agent',
deleteAgentTitle: 'Supprimer l’agent ?',
deleteAgentMessage: 'Voulez-vous vraiment supprimer cet agent ? Cette action est irréversible.',
},
Expand Down Expand Up @@ -4873,6 +4873,9 @@ ${amount} pour ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify se synchronisera automatiquement avec Certinia chaque jour.',
syncReimbursedReportsDescription:
'Lorsque cette option est activée, chaque fois qu’une facture à payer est réglée dans FFA, la note de frais Expensify associée est automatiquement marquée comme remboursée.',
prerequisites: {
title: 'Avant de vous connecter',
installBundle: 'Pour les connexions FFA',
Expand Down
7 changes: 5 additions & 2 deletions src/languages/it.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2796,8 +2796,8 @@ ${amount} per ${merchant} - ${date}`,
title: 'Modifica agente',
agentName: 'Nome agente',
instructions: 'Scrivi istruzioni personalizzate',
chatWithAgent: 'Chatta con l\u2019agente',
copilotIntoAccount: 'Copilot nell\u2019account',
chatWithAgent: 'Chatta con l’agente',
copilotIntoAccount: 'Copilot nell’account',
deleteAgent: 'Elimina agente',
deleteAgentTitle: 'Eliminare agente?',
deleteAgentMessage: 'Sei sicuro di voler eliminare questo agente? Questa azione non può essere annullata.',
Expand Down Expand Up @@ -4846,6 +4846,9 @@ ${amount} per ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify si sincronizzerà automaticamente con Certinia ogni giorno.',
syncReimbursedReportsDescription:
'Con questa opzione abilitata, ogni volta che una fattura da pagare viene saldata in FFA, il relativo report Expensify sarà automaticamente contrassegnato come rimborsato.',
prerequisites: {
title: 'Prima di connetterti',
installBundle: 'Per connessioni FFA',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/ja.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4803,6 +4803,8 @@ ${integrationName === CONST.ONBOARDING_ACCOUNTING_MAPPING.other ? 'あなたの'
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify は毎日自動的に Certinia と同期します。',
syncReimbursedReportsDescription: 'このオプションを有効にすると、FFA で買掛請求書が支払われるたびに、関連する Expensify レポートが自動的に精算済みとしてマークされます。',
prerequisites: {
title: '接続する前に',
installBundle: 'FFA 接続用',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/nl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4837,6 +4837,9 @@ ${amount} voor ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify wordt elke dag automatisch met Certinia gesynchroniseerd.',
syncReimbursedReportsDescription:
'Als deze optie is ingeschakeld, wordt elke keer dat een te betalen factuur in FFA wordt betaald, het bijbehorende Expensify-rapport automatisch als terugbetaald gemarkeerd.',
prerequisites: {
title: 'Voordat je verbinding maakt',
installBundle: 'Voor FFA-verbindingen',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/pl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4829,6 +4829,9 @@ ${amount} dla ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify będzie automatycznie synchronizować się z Certinia każdego dnia.',
syncReimbursedReportsDescription:
'Gdy ta opcja jest włączona, za każdym razem gdy Należna faktura zostanie opłacona w FFA, powiązany raport Expensify zostanie automatycznie oznaczony jako zwrócony.',
prerequisites: {
title: 'Zanim się połączysz',
installBundle: 'Dla połączeń FFA',
Expand Down
3 changes: 3 additions & 0 deletions src/languages/pt-BR.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4832,6 +4832,9 @@ ${amount} para ${merchant} - ${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'O Expensify vai sincronizar automaticamente com a Certinia todos os dias.',
syncReimbursedReportsDescription:
'Com essa opção ativada, sempre que uma Fatura a Pagar for paga no FFA, o relatório correspondente no Expensify será marcado automaticamente como reembolsado.',
prerequisites: {
title: 'Antes de conectar',
installBundle: 'Para conexões FFA',
Expand Down
2 changes: 2 additions & 0 deletions src/languages/zh-hans.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4715,6 +4715,8 @@ ${amount},商户:${merchant} - 日期:${date}`,
},
certinia: {
title: 'Certinia',
autoSyncDescription: 'Expensify 将每天自动与 Certinia 同步。',
syncReimbursedReportsDescription: '启用此选项后,每当在 FFA 中支付应付发票时,关联的 Expensify 报告将自动标记为已报销。',
prerequisites: {
title: '在你连接之前',
installBundle: '用于 FFA 连接',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,7 @@ const SettingsModalStackNavigator = createModalStackNavigator<SettingsNavigatorP
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_PREREQUISITES]: () => require<ReactComponentModule>('../../../../pages/workspace/accounting/certinia/CertiniaPrerequisitesPage').default,
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXISTING_CONNECTIONS]: () =>
require<ReactComponentModule>('../../../../pages/workspace/accounting/certinia/CertiniaExistingConnectionsPage').default,
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_ADVANCED]: () => require<ReactComponentModule>('../../../../pages/workspace/accounting/certinia/advanced/CertiniaAdvancedPage').default,
[SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION]: () => require<ReactComponentModule>('../../../../pages/workspace/accounting/reconciliation/CardReconciliationPage').default,
[SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION_QUICKBOOKS_DESKTOP_AUTO_SYNC]: () =>
require<ReactComponentModule>('../../../../pages/workspace/accounting/reconciliation/CardReconciliationQuickbooksDesktopAutoSyncPage').default,
Expand Down
2 changes: 1 addition & 1 deletion src/libs/Navigation/linkingConfig/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ const config: LinkingOptions<RootNavigatorParamList>['config'] = {
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_STATUS]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_STATUS.route},
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_EXPORT_DATE]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_EXPORT_DATE.route},
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_DEFAULT_VENDOR]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_DEFAULT_VENDOR.route},
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_ADVANCED]: {path: ROUTES.POLICY_ACCOUNTING_CERTINIA_ADVANCED.route},
[SCREENS.WORKSPACE.ACCOUNTING.CERTINIA_ADVANCED]: DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_ADVANCED.path,
[SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION]: {path: ROUTES.WORKSPACE_ACCOUNTING_CARD_RECONCILIATION.route},
[SCREENS.WORKSPACE.ACCOUNTING.CARD_RECONCILIATION_QUICKBOOKS_DESKTOP_AUTO_SYNC]: {
path: ROUTES.POLICY_ACCOUNTING_CARD_RECONCILIATION_QUICKBOOKS_DESKTOP_AUTO_SYNC.route,
Expand Down
2 changes: 1 addition & 1 deletion src/pages/workspace/accounting/PolicyAccountingPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@ function PolicyAccountingPage({policy}: PolicyAccountingPageProps) {
),
},
...(isEmptyObject(integrationSpecificMenuItems) || shouldShowSynchronizationError || !hasAccountingConnection ? [] : [integrationSpecificMenuItems]),
...(!hasAccountingConnection || !isConnectionVerified || connectedIntegration === CONST.POLICY.CONNECTIONS.NAME.CERTINIA ? [] : configurationOptions),
...(!hasAccountingConnection || !isConnectionVerified ? [] : configurationOptions),
Comment thread
ChavdaSachin marked this conversation as resolved.
];
}, [
policy,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
import React from 'react';
import ConnectionLayout from '@components/ConnectionLayout';
import useDynamicBackPath from '@hooks/useDynamicBackPath';
import useLocalize from '@hooks/useLocalize';
import useThemeStyles from '@hooks/useThemeStyles';
import {getLatestErrorField} from '@libs/ErrorUtils';
import Navigation from '@libs/Navigation/Navigation';
import {settingsPendingAction} from '@libs/PolicyUtils';
import type {WithPolicyConnectionsProps} from '@pages/workspace/withPolicyConnections';
import withPolicyConnections from '@pages/workspace/withPolicyConnections';
import ToggleSettingOptionRow from '@pages/workspace/workflows/ToggleSettingsOptionRow';
import {clearFinancialForceErrorField, updateFinancialForceAutoSync, updateFinancialForceSyncReimbursedReports} from '@userActions/connections/FinancialForce';
import CONST from '@src/CONST';
import {DYNAMIC_ROUTES} from '@src/ROUTES';

function CertiniaAdvancedPage({policy}: WithPolicyConnectionsProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const policyID = policy?.id;
const config = policy?.connections?.financialforce?.config;
const backPath = useDynamicBackPath(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_ADVANCED.path);

return (
<ConnectionLayout
displayName="CertiniaAdvancedPage"
headerTitle="workspace.accounting.advanced"
accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]}
policyID={policyID}
onBackButtonPress={() => Navigation.goBack(backPath)}
featureName={CONST.POLICY.MORE_FEATURES.ARE_CONNECTIONS_ENABLED}
contentContainerStyle={styles.pb2}
titleStyle={styles.ph5}
connectionName={CONST.POLICY.CONNECTIONS.NAME.CERTINIA}
>
<ToggleSettingOptionRow
title={translate('workspace.accounting.autoSync')}
subtitle={translate('workspace.certinia.autoSyncDescription')}
shouldPlaceSubtitleBelowSwitch
switchAccessibilityLabel={translate('workspace.accounting.autoSync')}
isActive={!!config?.autoSync?.enabled}
onToggle={(enabled) => {
if (!policyID) {
return;
}
updateFinancialForceAutoSync(policyID, enabled, config?.autoSync?.enabled);
}}
wrapperStyle={[styles.ph5, styles.pv3]}
pendingAction={settingsPendingAction([CONST.CERTINIA_CONFIG.AUTO_SYNC_ENABLED], config?.pendingFields)}
errors={getLatestErrorField(config ?? {}, CONST.CERTINIA_CONFIG.AUTO_SYNC_ENABLED)}
onCloseError={() => clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.AUTO_SYNC_ENABLED)}
/>
<ToggleSettingOptionRow
title={translate('workspace.accounting.reimbursedReports')}
subtitle={translate('workspace.certinia.syncReimbursedReportsDescription')}
shouldPlaceSubtitleBelowSwitch
switchAccessibilityLabel={translate('workspace.accounting.reimbursedReports')}
isActive={!!config?.advanced?.syncReimbursedReports}
onToggle={(enabled) => {
if (!policyID) {
return;
}
updateFinancialForceSyncReimbursedReports(policyID, enabled, config?.advanced?.syncReimbursedReports);
}}
wrapperStyle={[styles.ph5, styles.pv3]}
pendingAction={settingsPendingAction([CONST.CERTINIA_CONFIG.SYNC_REIMBURSED_REPORTS], config?.pendingFields)}
errors={getLatestErrorField(config ?? {}, CONST.CERTINIA_CONFIG.SYNC_REIMBURSED_REPORTS)}
onCloseError={() => clearFinancialForceErrorField(policyID, CONST.CERTINIA_CONFIG.SYNC_REIMBURSED_REPORTS)}
/>
</ConnectionLayout>
);
}

export default withPolicyConnections(CertiniaAdvancedPage);
2 changes: 2 additions & 0 deletions src/pages/workspace/accounting/utils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,8 @@ function getAccountingIntegrationData(
key={key}
/>
),
onAdvancedPagePress: () => Navigation.navigate(createDynamicRoute(DYNAMIC_ROUTES.POLICY_ACCOUNTING_CERTINIA_ADVANCED.path, ROUTES.POLICY_ACCOUNTING.getRoute(policyID))),
subscribedAdvancedSettings: [CONST.CERTINIA_CONFIG.AUTO_SYNC_ENABLED, CONST.CERTINIA_CONFIG.SYNC_REIMBURSED_REPORTS],
workspaceUpgradeNavigationDetails: {
integrationAlias: CONST.UPGRADE_FEATURE_INTRO_MAPPING[CONST.POLICY.CONNECTIONS.NAME.CERTINIA].alias,
backToAfterWorkspaceUpgradeRoute: getBackToAfterWorkspaceUpgradeRouteForCertinia(),
Expand Down
Loading