diff --git a/src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.ts b/src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.ts
index e5acc6df7..0f93ca7e7 100644
--- a/src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.ts
+++ b/src/app/shared/components/configuration/configuration-import-field/configuration-import-field.component.ts
@@ -126,6 +126,10 @@ export class ConfigurationImportFieldComponent implements OnInit {
(this.form.get('expenseFields') as FormArray).at(index)?.get('import_to_fyle')?.setValue(true);
}
+ if ( this.appName === AppName.SAGE300) {
+ this.form.controls.isDependentImportEnabled.setValue(true);
+ }
+
if (selectedValue === MappingSourceField.PROJECT && (this.form.get('expenseFields') as FormArray).at(index)?.get('source_field')?.value !== XeroFyleField.CUSTOMER && this.appName === AppName.XERO) {
this.isXeroProjectMapped = true;
this.xeroProjectMapping.emit(this.isXeroProjectMapped);
@@ -154,6 +158,13 @@ export class ConfigurationImportFieldComponent implements OnInit {
this.xeroProjectMapping.emit(this.isXeroProjectMapped);
}
+ onSwitchChanged(event: any, formGroup: AbstractControl): void {
+ this.onShowWarningForDependentFields(event, formGroup);
+ if (event.checked && this.appName === AppName.SAGE300) {
+ this.form.controls.isDependentImportEnabled.setValue(true);
+ }
+ }
+
onShowWarningForDependentFields(event: any, formGroup: AbstractControl): void {
if (!event.checked && formGroup.value.source_field === MappingSourceField.PROJECT) {
this.showWarningForDependentFields.emit();