Beispiel #1
0
        public static IEnumerable <ResultPack> EvaluateConcept(ConfigBase evalConfig, Period evalPeriod, IPeriodProfile evalProfile,
                                                               Result <MasterItem.EvaluateSource, string> prepValues)
        {
            ITaxingProfile conceptProfile = evalProfile.Taxing();

            if (conceptProfile == null)
            {
                return(EvaluateUtils.DecoratedError(CONCEPT_DESCRIPTION_ERROR_FORMAT, CONCEPT_PROFILE_NULL_TEXT));
            }

            MasterItem.EvaluateSource conceptValues = prepValues.Value;
            // EVALUATION
            TAmountDec incomeGeneralRelated = conceptProfile.TaxableGeneralIncomes(evalPeriod, conceptValues.SummarizeType,
                                                                                   conceptValues.StatementType, conceptValues.DeclaracyType, conceptValues.ResidencyType,
                                                                                   conceptValues.TaxableIncome, conceptValues.PartnerIncome, conceptValues.ExcludeIncome);
            TAmountDec incomeGeneralExclude = conceptProfile.ExcludeGeneralIncomes(evalPeriod, conceptValues.SummarizeType,
                                                                                   conceptValues.StatementType, conceptValues.DeclaracyType, conceptValues.ResidencyType,
                                                                                   conceptValues.TaxableIncome, conceptValues.PartnerIncome, conceptValues.ExcludeIncome);
            TAmountDec incomeLolevelRelated = conceptProfile.TaxableLolevelIncomes(evalPeriod, conceptValues.SummarizeType,
                                                                                   conceptValues.StatementType, conceptValues.DeclaracyType, conceptValues.ResidencyType,
                                                                                   conceptValues.TaxableIncome, conceptValues.PartnerIncome, conceptValues.ExcludeIncome);
            TAmountDec incomeAgrWorkRelated = conceptProfile.TaxableAgrWorkIncomes(evalPeriod, conceptValues.SummarizeType,
                                                                                   conceptValues.StatementType, conceptValues.DeclaracyType, conceptValues.ResidencyType,
                                                                                   conceptValues.TaxableIncome, conceptValues.PartnerIncome, conceptValues.ExcludeIncome);
            TAmountDec incomePartnerRelated = conceptProfile.TaxablePartnerIncomes(evalPeriod, conceptValues.SummarizeType,
                                                                                   conceptValues.StatementType, conceptValues.DeclaracyType, conceptValues.ResidencyType,
                                                                                   conceptValues.TaxableIncome, conceptValues.PartnerIncome, conceptValues.ExcludeIncome);
            // EVALUATION

            IArticleResult conceptResult = new ArticleGeneralResult(evalConfig);

            // SET RESULT VALUES
            conceptResult.AddIncomeTaxGeneralValue(conceptValues.SummarizeType,
                                                   conceptValues.StatementType, conceptValues.ResidencyType,
                                                   incomeGeneralRelated, incomeGeneralExclude,
                                                   incomeLolevelRelated, incomeAgrWorkRelated, incomePartnerRelated);
            // SET RESULT VALUES

            return(EvaluateUtils.Results(conceptResult));
        }