Esempio n. 1
0
        /// <summary>
        /// часть, соответствующая НДФЛ сотрудников
        /// </summary>
        /// <param name="params"></param>
        /// <returns></returns>
        public static RurMoney CalculateEmployeeNdfl(TaxParameters @params)
        {
            var salaryRate = new Rate(1M / (1M - @params.NdflRate.Value));

            var salary = salaryRate.Value * @params.CustomerTaxParameters.Salary;

            var pfr = @params.InsuranceFeeParams.PfrRate.Value * salary;

            var ffoms = @params.InsuranceFeeParams.FfomsRate.Value * salary;

            var fss = @params.InsuranceFeeParams.FssRate.Value * salary;

            var ndfl = RurMoney.Round(@params.NdflRate.Value * salary);

            return(ndfl);
        }
Esempio n. 2
0
        public static IndividualOsnTaxAggregate Calculate(
            TaxCalculationBase @base,
            IndividualOsnTaxParameters @params)
        {
            var(salesNds, buyNds, totalNds) = CalculateNds(@params);

            var individualNdfl = CalculateIndividualNdfl();

            var(total, burgen) =
                CalculateTotal(individualNdfl + totalNds, @base.TotalFee, @params);

            return(new IndividualOsnTaxAggregate(
                       individualNdfl,
                       totalNds,
                       @params.SelfInsuranceFee,
                       @base.AdditionalFee,
                       @base.TotalFee,
                       @base.EmployeeFee,
                       @base.EmployeeNdfl,
                       total,
                       burgen
                       ));

            RurMoney CalculateIndividualNdfl()
            {
                var expense = @params.CustomerTaxParameters.Expense - buyNds + @params.SelfInsuranceFee.Total;

                var totalExpense = expense
                                   + @base.EmployeeFee.Total
                                   + @base.EmployeeNdfl
                                   + @params.CustomerTaxParameters.Salary;

                var profit = @params.CustomerTaxParameters.Income - salesNds - totalExpense;

                return(RurMoney.Round(@params.NdflRate.Value * profit));
            }
        }