From 2bea95ea8a4ad59ea7884c794923bcf5a7eb83d6 Mon Sep 17 00:00:00 2001 From: anishfyle Date: Fri, 13 Dec 2024 12:10:10 +0530 Subject: [PATCH] updated conditions --- .../core/models/common/advanced-settings.model.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/app/core/models/common/advanced-settings.model.ts b/src/app/core/models/common/advanced-settings.model.ts index 6a2cd1d95..4a0cad96b 100644 --- a/src/app/core/models/common/advanced-settings.model.ts +++ b/src/app/core/models/common/advanced-settings.model.ts @@ -87,12 +87,15 @@ export class AdvancedSettingsModel { } else if ('workspace_general_settings' in exportSettings) { cccExportType = exportSettings.workspace_general_settings?.corporate_credit_card_expenses_object ?? undefined; } - // Filter out options based on cccExportType and appName - if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') { - return defaultOptions; // Allow all options including 'card_number' - } - return defaultOptions.filter(option => option !== 'card_number'); // Omit 'card_number' for other apps + if(brandingConfig.brandId === 'co') { + return defaultOptions.filter(option => option !== 'card_number' && option !== 'employee_name'); + } else { + if (cccExportType && ['netsuite', 'quickbooks online', 'sage intacct'].includes(appName.toLowerCase()) && brandingConfig.brandId === 'fyle') { + return defaultOptions; + } + return defaultOptions.filter(option => option !== 'card_number'); + } } static formatMemoPreview(memoStructure: string[], defaultMemoOptions: string[]): [string, string[]] {