diff --git a/src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts b/src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts index 6fca3f7e9..d809fe8f8 100644 --- a/src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts +++ b/src/app/core/models/business-central/business-central-configuration/business-central-export-setting.model.ts @@ -15,6 +15,8 @@ export type BusinessCentralExportSetting = { credit_card_expense_date: ExportDateType, default_bank_account_name: string, default_bank_account_id: string, + default_ccc_bank_account_name: string, + default_ccc_bank_account_id: string, name_in_journal_entry: string, employee_field_mapping: string, auto_map_employees: string, @@ -184,6 +186,7 @@ export class BusinessCentralExportSettingModel { cccExportDate: new FormControl(exportSettings?.credit_card_expense_date ? exportSettings?.credit_card_expense_date.toLowerCase() : null), cccExportGroup: new FormControl(exportSettings?.credit_card_expense_grouped_by ? exportSettings?.credit_card_expense_grouped_by: null), defaultBankName: new FormControl(exportSettings?.default_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_bank_account_id) : null), + cccDefaultBankName: new FormControl(exportSettings?.default_ccc_bank_account_name ? findObjectByDestinationId(accounts, exportSettings?.default_ccc_bank_account_id) : null), reimbursableEmployeeMapping: new FormControl(exportSettings?.employee_field_mapping ? exportSettings?.employee_field_mapping : null, Validators.required), journalEntryNamePreference: new FormControl(exportSettings?.name_in_journal_entry ? exportSettings?.name_in_journal_entry : null), autoMapEmployee: new FormControl(exportSettings?.auto_map_employees ? exportSettings?.auto_map_employees : null), @@ -204,6 +207,8 @@ export class BusinessCentralExportSettingModel { credit_card_expense_date: exportSettingsForm.get('cccExportDate')?.value ? exportSettingsForm.get('cccExportDate')?.value.toUpperCase() : null, default_bank_account_name: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.value : null, default_bank_account_id: exportSettingsForm.get('defaultBankName')?.value ? exportSettingsForm.get('defaultBankName')?.value.destination_id : null, + default_ccc_bank_account_name: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.value : null, + default_ccc_bank_account_id: exportSettingsForm.get('cccDefaultBankName')?.value ? exportSettingsForm.get('cccDefaultBankName')?.value.destination_id : null, name_in_journal_entry: exportSettingsForm.get('journalEntryNamePreference')?.value ? exportSettingsForm.get('journalEntryNamePreference')?.value : null, employee_field_mapping: exportSettingsForm.get('reimbursableEmployeeMapping')?.value ? exportSettingsForm.get('reimbursableEmployeeMapping')?.value : null, auto_map_employees: exportSettingsForm.get('autoMapEmployee')?.value ? exportSettingsForm.get('autoMapEmployee')?.value : null, diff --git a/src/app/core/models/business-central/business-central-configuration/business-central-import-settings.model.ts b/src/app/core/models/business-central/business-central-configuration/business-central-import-settings.model.ts index 4a149bc2c..cc92f71c7 100644 --- a/src/app/core/models/business-central/business-central-configuration/business-central-import-settings.model.ts +++ b/src/app/core/models/business-central/business-central-configuration/business-central-import-settings.model.ts @@ -26,7 +26,7 @@ export class BusinessCentralImportSettingsModel extends ImportSettingsModel { const expenseFieldsArray = importSettings?.mapping_settings ? this.constructFormArray(importSettings.mapping_settings, businessCentralFields) : [] ; return new FormGroup({ importCategories: new FormControl(importSettings?.import_settings?.import_categories ?? false), - chartOfAccountTypes: new FormControl(importSettings?.import_settings.charts_of_accounts ? importSettings?.import_settings.charts_of_accounts : ['Expense']), + chartOfAccountTypes: new FormControl(importSettings?.import_settings?.charts_of_accounts ? importSettings?.import_settings?.charts_of_accounts : ['Expense']), importVendorAsMerchant: new FormControl(importSettings?.import_settings?.import_vendors_as_merchants ?? false ), expenseFields: new FormArray(expenseFieldsArray) }); diff --git a/src/app/core/models/enum/enum.model.ts b/src/app/core/models/enum/enum.model.ts index 861f6cf26..5104c7f28 100644 --- a/src/app/core/models/enum/enum.model.ts +++ b/src/app/core/models/enum/enum.model.ts @@ -702,9 +702,8 @@ export enum Sage300ExportSettingDestinationOptionKey { } export enum BCExportSettingDestinationOptionKey { - ACCOUNT = 'ACCOUNT', VENDOR = 'VENDOR', - REIMBURSABLE_BANK_ACCOUNT = 'REIMBURSABLE_BANK_ACCOUNT' + BANK_ACCOUNT = 'BANK_ACCOUNT' } export enum QbdDirectExportSettingDestinationOptionKey { diff --git a/src/app/integrations/business-central/business-central-onboarding/business-central-onboarding-landing/business-central-onboarding-landing.component.html b/src/app/integrations/business-central/business-central-onboarding/business-central-onboarding-landing/business-central-onboarding-landing.component.html index a8428cf09..264ebdc7a 100644 --- a/src/app/integrations/business-central/business-central-onboarding/business-central-onboarding-landing/business-central-onboarding-landing.component.html +++ b/src/app/integrations/business-central/business-central-onboarding/business-central-onboarding-landing/business-central-onboarding-landing.component.html @@ -1,4 +1,4 @@ -