/// <summary>ProcureConfigSettings</summary> public TaxConfigurationSettings ProcureConfigSettings(bool includeInternal) { TaxConfigurationSettings taxConfigurationSettings = null; if (!string.IsNullOrEmpty(ItemData)) { taxConfigurationSettings = JsonConvert.DeserializeObject <TaxConfigurationSettings>(ItemData); } if (!includeInternal) { taxConfigurationSettings.Internal = null; } return(taxConfigurationSettings); }
/// <summary>ProcureAfcEngineConfiguration</summary> public AfcEngineConfiguration ProcureAfcEngineConfiguration() { TaxConfigurationSettings settings = ProcureConfigSettings(true); AfcEngineConfiguration engCfg = null; if (settings != null) { engCfg = new AfcEngineConfiguration { ReturnNonbillable = settings.ReturnNonBillable ?? false }; if (settings.TrafficStudyOverrides != null && settings.TrafficStudyOverrides.Count > 0) { foreach (AfcTrafficStudyOverride trafficStudyOverride in settings.TrafficStudyOverrides) { engCfg.AfcTrafficStudy = new DataAccessService.Models.AfcTrafficStudyOverride( (SafeHarborType)trafficStudyOverride.TrafficStudyType, trafficStudyOverride.TrafficStudyFedPcnt); break; } } if (settings.TaxOnTaxAlgorithm.HasValue) { engCfg.TaxOnTaxAlgorithm = (DataAccessService.Models.TaxOnTaxAlgorithms)settings.TaxOnTaxAlgorithm; } if (settings.SelfTaxAlgorithm.HasValue) { engCfg.SelfTaxAlgorithm = (DataAccessService.Models.SelfTaxAlgorithms)settings.SelfTaxAlgorithm; } InternalProfileConfig internalProfileConfig = settings.Internal; if (internalProfileConfig != null) { engCfg.InternalUsage = new ConfigurationInternalUsage { CustomerOverrideMultiplier = internalProfileConfig.CustomerOverrideMultiplier ?? 1, EnableStatusFile = internalProfileConfig.EnableStatusFile ?? false, DisableTaxInclusiveSessionInit = internalProfileConfig.DisableTaxInclusiveSessionInit ?? false, AbortOnInitWarning = internalProfileConfig.AbortOnInitWarning ?? false }; } } return(engCfg); }