Skip to content

Commit

Permalink
sage 300 fix (#939)
Browse files Browse the repository at this point in the history
  • Loading branch information
DhaaraniCIT authored and Hrishabh17 committed Sep 3, 2024
1 parent cc816b4 commit 66f8df7
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ export class ConfigurationImportFieldComponent implements OnInit {
}

removeFilter(expenseField: AbstractControl) {
if ((expenseField as FormGroup).controls.import_to_fyle.value) {
this.onImportToFyleToggleChange({checked: false}, (expenseField as FormGroup).controls.destination_field.value);
}
(expenseField as FormGroup).controls.source_field.patchValue('');
(expenseField as FormGroup).controls.import_to_fyle.patchValue(false);
(expenseField as FormGroup).controls.import_to_fyle.enable();
this.onImportToFyleToggleChange({checked: false});
event?.stopPropagation();
this.isXeroProjectMapped = false;
this.xeroProjectMapping.emit(this.isXeroProjectMapped);
Expand All @@ -242,6 +244,9 @@ export class ConfigurationImportFieldComponent implements OnInit {
if (!event.checked && this.appName === AppName.SAGE300) {
formGroup?.get('import_code')?.clearValidators();
}
if (this.appName === AppName.SAGE300 && formGroup.get('source_field')?.value) {
this.onImportToFyleToggleChange(event, formGroup?.get('destination_field')?.value);
}
}

onImportToFyleToggleChange(event: any): void {
Expand Down

0 comments on commit 66f8df7

Please sign in to comment.