@@ -8,11 +8,13 @@ import { DestinationAttribute } from 'src/app/core/models/db/destination-attribu
8
8
import { FyleField , IntegrationField } from 'src/app/core/models/db/mapping.model' ;
9
9
import { AppName , ConfigurationCta , ToastSeverity , XeroOnboardingState } from 'src/app/core/models/enum/enum.model' ;
10
10
import { XeroFyleField } from 'src/app/core/models/enum/enum.model' ;
11
+ import { Org } from 'src/app/core/models/org/org.model' ;
11
12
import { XeroWorkspaceGeneralSetting } from 'src/app/core/models/xero/db/xero-workspace-general-setting.model' ;
12
13
import { XeroImportSettingGet , XeroImportSettingModel } from 'src/app/core/models/xero/xero-configuration/xero-import-settings.model' ;
13
14
import { IntegrationsToastService } from 'src/app/core/services/common/integrations-toast.service' ;
14
15
import { MappingService } from 'src/app/core/services/common/mapping.service' ;
15
16
import { WorkspaceService } from 'src/app/core/services/common/workspace.service' ;
17
+ import { OrgService } from 'src/app/core/services/org/org.service' ;
16
18
import { XeroConnectorService } from 'src/app/core/services/xero/xero-configuration/xero-connector.service' ;
17
19
import { XeroImportSettingsService } from 'src/app/core/services/xero/xero-configuration/xero-import-settings.service' ;
18
20
import { XeroHelperService } from 'src/app/core/services/xero/xero-core/xero-helper.service' ;
@@ -72,6 +74,8 @@ export class XeroImportSettingsComponent implements OnInit {
72
74
73
75
isCustomerPresent : boolean ;
74
76
77
+ org : Org = this . orgService . getCachedOrg ( ) ;
78
+
75
79
readonly brandingFeatureConfig = brandingFeatureConfig ;
76
80
77
81
readonly brandingContent = brandingContent . xero . configuration . importSetting ;
@@ -87,6 +91,7 @@ export class XeroImportSettingsComponent implements OnInit {
87
91
private mappingService : MappingService ,
88
92
private xeroHelperService : XeroHelperService ,
89
93
@Inject ( FormBuilder ) private formBuilder : FormBuilder ,
94
+ private orgService : OrgService ,
90
95
private toastService : IntegrationsToastService ,
91
96
private xeroConnectorService : XeroConnectorService
92
97
) { }
@@ -266,7 +271,7 @@ export class XeroImportSettingsComponent implements OnInit {
266
271
267
272
this . importSettingsForm = XeroImportSettingModel . mapAPIResponseToFormGroup ( this . importSettings , this . xeroExpenseFields , this . isCustomerPresent , this . taxCodes ) ;
268
273
269
- if ( response [ 5 ] && response [ 5 ] . country !== 'US' ) {
274
+ if ( response [ 5 ] && response [ 5 ] . country !== 'US' && new Date ( this . org . created_at ) < new Date ( '2024-08-19' ) ) {
270
275
this . isTaxGroupSyncAllowed = true ;
271
276
}
272
277
// This is only for C1
0 commit comments