public static OrgUsnD_RTaxAggregate Calculate(
            TaxCalculationBase @base,
            OrganizationUsnD_RTaxParameters @params)
        {
            var totalExpenses = @base.EmployeeFee.Total
                                + @base.EmployeeNdfl
                                + @params.CustomerTaxParameters.Expense
                                + @params.CustomerTaxParameters.Salary;

            var chargedTax = CalculateUsnDRChargedTax(@params, totalExpenses);

            var sts = RurMoney.Max(chargedTax, @params.MinTaxRate.Value * @params.CustomerTaxParameters.Income);

            var(total, burgen) = CalculateTotal(sts + @base.EmployeeNdfl, @base.TotalFee, @params);

            return(new OrgUsnD_RTaxAggregate(
                       totalExpenses,
                       sts,
                       @base.EmployeeFee,
                       @base.EmployeeNdfl,
                       @base.TotalFee,
                       total,
                       burgen
                       ));
        }
Пример #2
0
        public static IndividualUsnD_RTaxAggregate Calculate(
            TaxCalculationBase @base,
            IndividualUsnD_RTaxParameters @params)
        {
            var totalExpenses = @params.SelfInsuranceFee.Total
                                + @base.EmployeeFee.Total
                                + @base.EmployeeNdfl
                                + @params.CustomerTaxParameters.Expense
                                + @params.CustomerTaxParameters.Salary;

            var chargedTax = CalculateUsnDRChargedTax(@params, totalExpenses);

            var taxTotal = RurMoney.Max(chargedTax, @params.MinTaxRate.Value * @params.CustomerTaxParameters.Income);

            var(total, burgen) = CalculateTotal(taxTotal + @base.EmployeeNdfl, @base.TotalFee, @params);

            return(new IndividualUsnD_RTaxAggregate(
                       totalExpenses,
                       taxTotal,
                       @params.SelfInsuranceFee,
                       @base.EmployeeFee,
                       @base.AdditionalFee,
                       @base.EmployeeNdfl,
                       @base.TotalFee,
                       total,
                       burgen
                       ));
        }