public SpecialPrice CountSpecialPrice(PriceList price)
        {
            SpecialPrice specialPrice = new SpecialPrice();

            specialPrice.priceType   = price.priceType;
            specialPrice.priceValue  = ConvertCurrencyIDR(price.priceValue);
            specialPrice.priceStatus = price.priceStatus;

            return(specialPrice);
        }
 //Prepare the document by denormalizing the entity tree
 public static SpecialPriceDocument FromSpecialPrice(SpecialPrice specialPrice)
 {
     return(new SpecialPriceDocument
     {
         Date = specialPrice.Date,
         Price = specialPrice.Price,
         IsDiscounted = specialPrice.IsDiscounted,
         Discount = specialPrice.Discount
     });
 }
Example #3
0
        /// <summary>
        /// Inserts a tax rate
        /// </summary>
        /// <param name="specialPrice">Tax rate</param>
        public virtual void Insert(SpecialPrice specialPrice)
        {
            if (specialPrice == null)
            {
                throw new ArgumentNullException("specialPrice");
            }

            var key = PrefixTemplate + specialPrice.ProductName;

            if (this._settingService.GetAllSettings().SingleOrDefault(x => x.Name == key) == null)
            {
                _settingService.SetSetting(key, specialPrice.ProductName + Separator + specialPrice.ProductPrice);
            }
        }
Example #4
0
        public ActionResult AddSpecial(FormCollection form)
        {
            SqlSugarClient db = new SqlSugarClient(
                new ConnectionConfig()
            {
                ConnectionString      = System.Web.Configuration.WebConfigurationManager.AppSettings["ConnectionString"],
                DbType                = DbType.Oracle,        //设置数据库类型
                IsAutoCloseConnection = true,                 //自动释放数据务,如果存在事务,在事务结束后释放
                InitKeyType           = InitKeyType.Attribute //从实体特性中读取主键自增列信息
            });

            try
            {
                DateTime           dt_begin_time, dt_end_time;
                DateTimeFormatInfo dtFormat = new DateTimeFormatInfo();
                dtFormat.ShortDatePattern = "yyyy/MM/dd";
                dt_begin_time             = Convert.ToDateTime(form["form-begin_time"], dtFormat);
                dt_end_time = Convert.ToDateTime(form["form-end_time"], dtFormat);

                var Isconflict = db.Queryable <SpecialPrice>().Where(it => it.end_date >= dt_begin_time && it.beginning_date <= dt_end_time && it.homestay_id == Convert.ToInt32(Request.Form["productID"])).ToArray();
                if (Isconflict.Length == 0)

                {
                    var data = new SpecialPrice()
                    {
                        homestay_id    = Convert.ToInt32(Request.Form["productID"]),
                        beginning_date = dt_begin_time,
                        end_date       = dt_end_time,
                        price          = Convert.ToDouble(form["form-price"])
                    };

                    db.Insertable(data).ExecuteCommand();
                    ViewBag.flag       = 1;
                    Session["message"] = "特殊价格发布成功!";
                    return(Redirect("~/HomeStay/Special"));
                }
                else
                {
                    ViewBag.flag       = 0;
                    Session["message"] = "特殊价格发布失败!";
                    return(Redirect("~/Home"));
                }
            }
            catch (Exception ex)
            {
                ViewBag.flag = 0;
                throw ex;
            }
        }
Example #5
0
        public void CalculateCombinationPricesTest()
        {
            var specialPrice = new SpecialPrice()
            {
                SpecialPriceName = "3 for 130", Quantity = 3, OfferPrice = 130
            };
            var sku = new Sku()
            {
                Name = "A", UnitPrice = 50, SpecialPrice = specialPrice
            };

            int cost = sku.CalculatePrice(5);

            Assert.Equal(230, cost);
        }
Example #6
0
        private SpecialPrice ParseExtraPrice(HtmlNode node, int productID)
        {
            var extraPrice = new SpecialPrice();

            extraPrice.ProductId = productID;
            string quantityString = string.Empty;
            int    quantity       = 0;
            var    extraQty       = node.SelectSingleNode(".//p[contains(@class,'c-pricetag__effect-type')]");
            var    ordinaryPrice  = node.SelectSingleNode(".//span[contains(@class, 'bold ordinal')]");

            if (extraQty != null)
            {
                quantityString      = Regex.Match(extraQty.InnerText, @"\d+").Value;
                quantity            = int.Parse(quantityString);
                extraPrice.Quantity = quantity;
            }
            if (ordinaryPrice != null)
            {
                string[] priceParts          = ordinaryPrice.InnerText.Split(',');
                var      integerPart         = new String(priceParts[0].Where(Char.IsDigit).ToArray());
                var      decimalPart         = new String(priceParts[1].Where(Char.IsDigit).ToArray());
                var      ordinaryPriceString = $"{integerPart}.{decimalPart}";
                var      priceValue          = double.Parse(ordinaryPriceString, CultureInfo.InvariantCulture);
                extraPrice.OrdinaryPrice = priceValue;
            }
            var integerPriceParseFail = node.SelectSingleNode(".//span[contains(@class,'integer')]").InnerText;
            var integerPriceString    = new String(integerPriceParseFail.Where(Char.IsDigit).ToArray());

            if (extraQty == null)
            {
                extraPrice.Extrapris = double.Parse(integerPriceString);
                //return double.Parse(integerPriceString);
            }
            //double newPrice = int.Parse(integerPriceString) / quantity;
            //return newPrice;
            return(extraPrice);
        }
Example #7
0
        public virtual IEnumerable <SpecialPrice> GetAll(bool isUpdateCacheFromInternet)
        {
            if (isUpdateCacheFromInternet)
            {
                DownloadNewSpecialPriceToCache();
            }

            var list       = _settingService.GetAllSettings().Where(x => x.Name.Contains(PrefixTemplate));
            var resultList = new List <SpecialPrice>();

            foreach (var curItem in list)
            {
                var arr      = curItem.Value.Split(Separator);
                var newPrice = new SpecialPrice()
                {
                    ProductName  = arr[0],
                    ProductPrice = decimal.Parse(arr[1])
                };

                resultList.Add(newPrice);
            }

            return(resultList);
        }
Example #8
0
        public override void Query(ResponseWriter writer, System.Collections.Specialized.NameValueCollection parames)
        {
            userInfo = AuthLogin.GetUserInfo(Username);

            AirQueryCommon airQuery = new AirQueryCommon();


            string cacheNameGuid = parames["cacheNameGuid"];
            string fullFlightNo  = parames["fullFlightNo"]; //航班号如3U8881
            string cairrGuid     = parames["cairrGuid"];    //航班唯一编号
            string policyGuid    = parames["policyGuid"];   //政策唯一编号

            #region 取基础航班信息
            PbProject.WebCommon.Utility.Cache.CacheByNet pwucc = new PbProject.WebCommon.Utility.Cache.CacheByNet();
            DataSet dsCacheData = pwucc.GetCacheData(cacheNameGuid);
            if (dsCacheData == null)
            {
                writer.WriteEx(541, "cache timeout", "缓存过期");
            }
            var dr = dsCacheData.Tables[fullFlightNo].Select("guid='" + cairrGuid + "'").FirstOrDefault();
            if (dr == null)
            {
                writer.WriteEx(541, "not found filght", "没有找到航班信息");
            }
            string CarrCode      = (string)dr["CarrCode"];      //承运人
            string FlightNo      = (string)dr["FlightNo"];      //航班号
            string StartCityCode = (string)dr["StartCityCode"]; //起飞城市
            string ToCityCode    = (string)dr["ToCityCode"];    //抵达城市
            string StartTime     = (string)dr["StartTime"];     //起飞时间
            string EndTime       = (string)dr["EndTime"];       //抵达时间
            string StartDate     = (string)dr["StartDate"];     //起飞日期
            string Space         = (string)dr["Space"];         //舱位
            string ABFare        = (string)dr["ABFee"];         //机建
            string RQFare        = (string)dr["FuelAdultFee"];  //燃油
            string XSFee         = (string)dr["XSFee"];         //舱位价格

            #endregion
            #region 取政策
            string DownPoint, DownReturnMoney, SpacePrice;
            List <Tb_Ticket_Policy> objList = Manage.CallMethod("Tb_Ticket_Policy", "GetList", null, new object[] { "id='" + policyGuid + "'" }) as List <Tb_Ticket_Policy>;
            if (objList.Count() == 0)
            {
                List <Tb_Ticket_BookPolicy> bList = Manage.CallMethod("Tb_Ticket_BookPolicy", "GetList", null, new object[] { "PolicyId='" + policyGuid + "'" }) as List <Tb_Ticket_BookPolicy>;
                if (bList.Count() == 0)
                {
                    writer.WriteEx(564, "not found policy", "没有找到政策:" + policyGuid);
                    return;
                }
                else
                {
                    var pi = bList[0];
                    DownPoint       = (pi.PReturn * 100).ToString();
                    DownReturnMoney = "0";
                    SpacePrice      = "0";
                }
            }
            else
            {
                var policyInfo = objList[0];
                DownPoint       = policyInfo.DownPoint.ToString();       //政策
                DownReturnMoney = policyInfo.DownReturnMoney.ToString(); //现返
                SpacePrice      = policyInfo.SpacePrice.ToString();      //固定特价
            }
            #endregion
            bool isGuding = false;


            if (airQuery.IsSpecialSpace(userInfo, Space, CarrCode))
            {
                SpecialPrice sp = PlyMatch(userInfo, StartCityCode, ToCityCode, StartTime, EndTime,
                                           StartDate, Space, CarrCode, FlightNo, DownPoint, DownReturnMoney, cairrGuid, SpacePrice,
                                           ABFare, RQFare, isGuding, XSFee);
                if (sp == null)
                {
                    writer.WriteEx(580, "get data error", "未查询到特价");
                }
                else
                {
                    writer.Write(sp);
                }
            }
            else
            {
                writer.WriteEx(570, "not a special space", "该舱位不是特价舱位");
            }
        }
Example #9
0
        /// <summary>
        /// 返回数据
        /// </summary>
        /// <param name="fromcity">起飞城市三字码</param>
        /// <param name="tocity">抵达城市三字码</param>
        /// <param name="totime">起飞时间</param>
        /// <param name="arrtime">抵达时间</param>
        /// <param name="starttime">起飞日期</param>
        /// <param name="cw">舱位</param>
        /// <param name="aircode">航空公司</param>
        /// <param name="aircono">航班号</param>
        /// <param name="fd">返点</param>
        /// <param name="strYh">现返</param>
        /// <param name="hidId">GUID</param>
        /// <param name="Fare">固定特价</param>
        /// <param name="TAX">基建</param>
        /// <param name="RQFare">燃油</param>
        /// <param name="isGuding">是否固定特价</param>
        /// <param name="Yprice">是否固定特价</param>
        private SpecialPrice PlyMatch(UserLoginInfo userInfo, string fromcity, string tocity, string totime, string arrtime, string starttime,
                                      string cw, string aircode, string aircono, string fd, string strYh, string hidId,
                                      string Fare, string TAX, string RQFare, bool isGuding, string Yprice
                                      )
        {
            SpecialPrice sp = new SpecialPrice();

            try
            {
                string[] strValue = new string[4];
                //非固定特价PATA数据
                if (!isGuding)
                {
                    #region pat 数据
                    // ig|SS MU747/X/30NOV/KMGSHANN1/0730 1025|pat:a&kmg226#1
                    //发送指令获取
                    DateTime dt      = DateTime.Parse(starttime);
                    string   cmd     = "SS " + aircode + aircono + "/" + cw + "/" + dt.ToString("R").Substring(4, 7).Replace(" ", "") + dt.Year.ToString().Substring(2) + "/" + fromcity + tocity + "NN1/" + totime.Replace(":", "") + " " + arrtime.Replace(":", "") + "|pat:a";
                    string   zhiling = cmd;
                    string   strVale = string.Empty;
                    //---------修改部分----------
                    if (userInfo.Configparam != null)
                    {
                        //开启使用特价缓存  true 开启 false关闭
                        bool IsUseSpCache = userInfo.FQP.KongZhiXiTong != null && userInfo.FQP.KongZhiXiTong.Contains("|99|");
                        //特价缓存
                        SpecialCabinPriceInfoBLL  SpBll     = new SpecialCabinPriceInfoBLL();
                        Tb_SpecialCabin_PriceInfo PriceInfo = null;
                        if (IsUseSpCache)
                        {
                            SpBll.GetSpPrice(aircode, aircono, DateTime.Parse(starttime + " " + totime + ":00"), fromcity, tocity, cw);
                        }
                        if (PriceInfo == null)
                        {
                            //格式化编码内容类
                            PnrAnalysis.FormatPNR pnrformat = new PnrAnalysis.FormatPNR();
                            //扩展参数
                            ParamEx pe = new ParamEx();
                            pe.UsePIDChannel = userInfo.FQP.KongZhiXiTong != null && userInfo.FQP.KongZhiXiTong.Contains("|48|") ? 2 : 0;
                            SendInsManage SendManage = new SendInsManage(userInfo.User.LoginName, userInfo.Company.UninCode, pe, userInfo.Configparam);
                            string        Office     = userInfo.Configparam.Office.Split('^')[0];
                            strVale = SendManage.Send(cmd, ref Office, 15);//发送获取特价指令
                            string  error = "";
                            decimal spFare = 0m, spABFare = 0m, spRQFare = 0m;
                            //价格实体
                            PnrAnalysis.PatModel Pat = pnrformat.GetPATInfo(strVale, out error);
                            if (Pat != null && Pat.UninuePatList.Count > 0)
                            {
                                strValue[0] = Pat.UninuePatList[0].Fare;   //舱位价
                                strValue[1] = Pat.UninuePatList[0].TAX;    //基建
                                strValue[2] = Pat.UninuePatList[0].RQFare; //燃油
                                strValue[3] = Pat.UninuePatList[0].Price;  //总计(舱位价+基建+燃油)
                                decimal.TryParse(strValue[0], out spFare);
                                decimal.TryParse(strValue[1], out spABFare);
                                decimal.TryParse(strValue[2], out spRQFare);
                            }
                            else
                            {
                                //-----------------2013-5-6添加----------------------------------------------
                                //没有PAT出价格 预订一个编码PAT价格后取消PNR 即使编码没有取消 后台程序自动取消
                                string ErrMsg = "";
                                if (ConfigIsSet(out ErrMsg))
                                {
                                    //----------构造航段和乘客---------------
                                    List <Tb_Ticket_Passenger> pList      = GetPassengerList();
                                    List <Tb_Ticket_SkyWay>    skywaylist = new List <Tb_Ticket_SkyWay>();
                                    Tb_Ticket_SkyWay           sky        = new Tb_Ticket_SkyWay();
                                    sky.CarryCode    = aircode;
                                    sky.FlightCode   = aircono;
                                    sky.FromDate     = DateTime.Parse(starttime + " " + totime + ":00");
                                    sky.ToDate       = DateTime.Parse(starttime + " " + arrtime + ":00");
                                    sky.FromCityCode = fromcity;
                                    sky.ToCityCode   = tocity;
                                    sky.Space        = cw;
                                    skywaylist.Add(sky);

                                    //-------------------------
                                    //预订编码 获取价格
                                    RePnrObj pnrObj      = GetPnrInfo(aircode, pList, skywaylist, out ErrMsg);
                                    string   AdultPnr    = string.Empty;
                                    Log_Pnr  logAdultPnr = null;
                                    //成人预订信息编码记录
                                    if (pnrObj.AdultYudingList.Count > 0)
                                    {
                                        AdultPnr = pnrObj.AdultPnr;
                                        if (string.IsNullOrEmpty(AdultPnr) || AdultPnr.Trim().Length != 6)
                                        {
                                            AdultPnr = "";
                                        }
                                        //记录编码日志
                                        YuDingPnrLog(pnrObj, pnrObj.AdultYudingList.Keys[0], pnrObj.AdultYudingList.Values[0], AdultPnr, pnrObj.Office, out logAdultPnr);
                                    }
                                    if (!string.IsNullOrEmpty(pnrObj.AdultPnr))
                                    {
                                        //取消编码
                                        if (SendManage.CancelPnr(pnrObj.AdultPnr, pnrObj.Office))
                                        {
                                            if (logAdultPnr != null)
                                            {
                                                //修改状态
                                                logAdultPnr.Flag = true;
                                                string tempSql = PbProject.Dal.Mapping.MappingHelper <Log_Pnr> .CreateUpdateModelSql(logAdultPnr, "id");

                                                Manage.ExecuteNonQuerySQLInfo(tempSql);
                                            }
                                        }
                                    }
                                    //获取价格
                                    if (pnrObj.PatModelList != null && pnrObj.PatModelList.Length > 0)
                                    {
                                        Pat = pnrObj.PatModelList[0];
                                        if (Pat != null && Pat.UninuePatList.Count > 0)
                                        {
                                            strValue[0] = Pat.UninuePatList[0].Fare;   //舱位价
                                            strValue[1] = Pat.UninuePatList[0].TAX;    //基建
                                            strValue[2] = Pat.UninuePatList[0].RQFare; //燃油
                                            strValue[3] = Pat.UninuePatList[0].Price;  //总计(舱位价+基建+燃油)
                                            decimal.TryParse(strValue[0], out spFare);
                                            decimal.TryParse(strValue[1], out spABFare);
                                            decimal.TryParse(strValue[2], out spRQFare);
                                        }
                                    }
                                }
                                //---------------------------------------------------------------
                            }
                            if (spFare != 0m)
                            {
                                //存入缓存
                                SpBll.SaveSpPrice(aircode.ToUpper(), aircono, DateTime.Parse(starttime + " " + totime + ":00"), fromcity, tocity, cw, spFare, spABFare, spRQFare);
                            }
                        }
                        else
                        {
                            strValue[0] = PriceInfo.SpPrice.ToString();  //舱位价
                            strValue[1] = PriceInfo.SpABFare.ToString(); //基建
                            strValue[2] = PriceInfo.SpRQFare.ToString(); //燃油
                            strValue[3] = (PriceInfo.SpPrice + PriceInfo.SpABFare + PriceInfo.SpRQFare).ToString();
                        }
                    }
                    #endregion
                }
                else
                {
                    strValue[0] = Fare;   //舱位价
                    strValue[1] = TAX;    //基建
                    strValue[2] = RQFare; //燃油
                    strValue[3] = (decimal.Parse(Fare) + decimal.Parse(TAX) + decimal.Parse(RQFare)).ToString();
                }

                //实付金额
                string sjvalue = new PbProject.Logic.Pay.Data(userInfo.Company.UninCode).CreatePassengerPayFee(decimal.Parse(strValue[0]), decimal.Parse(strValue[1]), decimal.Parse(strValue[2]), decimal.Parse(fd), decimal.Parse(strYh), 1).ToString();
                string pyj     = new PbProject.Logic.Pay.Data(userInfo.Company.UninCode).CreateCommissionCG(decimal.Parse(strValue[0]), decimal.Parse(fd)).ToString();

                string ZK = "";
                if (Yprice != "0")//如果传的有Y舱价格,则是特价类型的,则计算折扣
                {
                    PbProject.Logic.Pay.DataAction plpd = new PbProject.Logic.Pay.DataAction();
                    //特价时候需要计算折扣,让前台计算加入哪一个折扣范围
                    decimal tempFare = 0;
                    decimal.TryParse(strValue[0], out tempFare);
                    decimal tempYprice = 0;
                    decimal.TryParse(Yprice, out tempYprice);
                    //计算特价的折扣
                    ZK = (new PbProject.Logic.Pay.DataAction().FourToFiveNum((tempFare / tempYprice), 4) * 100).ToString("f2");
                    decimal tempZK = 0;
                    decimal.TryParse(ZK, out tempZK);
                    ZK = plpd.FourToFiveNum(tempZK, 0).ToString();
                }


                if (strValue[0] != "" || strValue[1] != "" || strValue[2] != "" || strValue[3] != "")
                {
                    decimal tempPrice = 0;
                    decimal.TryParse(strValue[0], out tempPrice);


                    #region  pat 有数据
                    sp.SpacePrice   = tempPrice.ToString("f0");
                    sp.Tax          = strValue[1];
                    sp.RQFare       = strValue[2];
                    sp.TotalPrice   = strValue[3];
                    sp.RealPayPrice = sjvalue;
                    sp.Commission   = pyj;
                    sp.GUID         = hidId;
                    sp.Discount     = ZK;
                    #endregion
                }
                else
                {
                    #region pat 没有数据

                    #endregion pat 出来没有数据
                }

                //最终sb格式 0舱位价@1基建@2燃油@3总计(舱位价+基建+燃油)@4实付金额@5佣金@6guid@7特价计算的折扣
                return(sp);
                //Response.Write("");
            }
            catch (Exception ex)
            {
                return(sp);
            }
        }
Example #10
0
        private decimal CalculatePrice(int productCategoryId,
                                       ProductLine productInVendor, bool isProductInVendorPrice,
                                       ProductLineVendor productInF5Price,
                                       ProductLine productInBoyarka, bool isProductInBoyarkaPrice,
                                       SpecialPrice productInSpecialPrice, bool isProductInSpecialPrice,
                                       IEnumerable <int> boyarkaCategoriesIds,
                                       out decimal appliedTaxPercent,
                                       out string priceCalcInfo)
        {
            decimal returnPrice = 0;


            decimal onePercentPrice = productInF5Price.PriceBase / 100;
            decimal f5Percent       = productInF5Price.PriceDiff / onePercentPrice;

            f5Percent = decimal.Round(f5Percent, 2, MidpointRounding.AwayFromZero);

            const decimal MyDiscontMnozhitelForCategoriesInBoyarka = 0.9m;                     // скидываем от цены в Наташином магазине (множитель на Наташину наценку)
            const decimal MyDiscontMnozhitelForCategoriesInBoyarkaForNotExistProducts = 0.50m; // скидываем от цены в Наташином магазине (множитель на Наташину наценку)
            const decimal MyPercentsForCategoriesNotInBoyarka = 20;                            // мой процент наценки для товаров, которыми Боярка не занимается
            //const decimal MyNatashasFeePercent = 2;// процент базовой стоимости, который отчисляется Наташе
            const decimal MyNatashasFeePercent = 50;                                           // процент дохода, который отчисляется Наташе
            const decimal MyMinFee             = 15;

            appliedTaxPercent = 0;

            bool isboyarkaCategory = true;
            var  appliedRule       = "Ни одно правило не сработало. Ошибка.";

            // Товар есть в Боярке?
            if (isProductInBoyarkaPrice)
            {
                appliedTaxPercent = f5Percent * MyDiscontMnozhitelForCategoriesInBoyarka;
                appliedRule       = "Сработало правило: товар есть в Боярке, умножаем наценку F5 на коэфициент " + MyDiscontMnozhitelForCategoriesInBoyarka.ToString("0.00");
            }
            else if (isProductInVendorPrice)            // Товара нет в Бояке, но есть в Киеве
            {
                isboyarkaCategory = boyarkaCategoriesIds.Contains(productCategoryId);

                // Хотя товара нет, но Товарная категория Боярская (ноуты)
                if (isboyarkaCategory)
                {
                    appliedTaxPercent = f5Percent * MyDiscontMnozhitelForCategoriesInBoyarkaForNotExistProducts;
                    appliedRule       = "Сработало правило: Хотя товара нет, но Товарная категория Боярская, умножаем наценку F5 на коэфициент " + MyDiscontMnozhitelForCategoriesInBoyarkaForNotExistProducts.ToString("0.00");
                }
                else                 // Товарная категория в Боярке не продается (холодильники)
                {
                    appliedTaxPercent = MyPercentsForCategoriesNotInBoyarka;
                    appliedRule       = "Сработало правило: Товарная категория в Боярке не продается, фиксированная наценка " + MyPercentsForCategoriesNotInBoyarka.ToString("0.00") + "%";
                }
            }
            else
            {
                throw new Exception("my Strange situation");
            }


            if (isProductInSpecialPrice)
            {
                // Товар имеет рекомендованную цену продажи. Расчитываем процент накрутки из конечной цены.
                appliedTaxPercent = (productInSpecialPrice.ProductPrice - productInF5Price.PriceBase) / onePercentPrice;
                appliedRule       = "Сработало правило рекомендованной цены производителя";
            }


            // Вычисляем цену c учетом наценки
            var totalFee = productInF5Price.PriceBase * (appliedTaxPercent / 100);

            returnPrice = productInF5Price.PriceBase + totalFee;


            // var natashasFee = productInF5Price.PriceBase * (MyNatashasFeePercent / 100); // это 2 процента от конечной стоимости
            var natashasFee = (totalFee / 100) * MyNatashasFeePercent;             // это 50 процента от дохода
            var myFee       = totalFee - natashasFee;


            // если моя прибыль меньше порога, то увеличиваем цену и пересчитваем общую наценку appliedTax
            if (myFee < MyMinFee)
            {
                appliedRule = "Сработало правило минимальной прибыли сайта в " + MyMinFee.ToString("0.00 грн");

                var myFeePercent = MyMinFee / onePercentPrice;
                appliedTaxPercent = myFeePercent * 2;

                totalFee    = productInF5Price.PriceBase * (appliedTaxPercent / 100);
                natashasFee = (totalFee / 100) * MyNatashasFeePercent;
                myFee       = totalFee - natashasFee;

                returnPrice = productInF5Price.PriceBase + totalFee;
            }


            priceCalcInfo =
                "----- Выставленные на сайте настройки ------ <br/>"

                + "Процент Наташе и Диме от общего дохода = " + MyNatashasFeePercent.ToString("0.00") + "%<br/>"
                + "Множитель на Процент выставленный на витрине F5 для присутсвующих товаров = " + MyDiscontMnozhitelForCategoriesInBoyarka.ToString("0.00") + "<br/><br/>"
                + "Множитель на Процент выставленный на витрине F5 для отсутсвующих сейчас товаров = " + MyDiscontMnozhitelForCategoriesInBoyarkaForNotExistProducts.ToString("0.00") + "<br/><br/>"
                + "Процент для непродающихся в Боярке вообще категорий товаров = " + MyPercentsForCategoriesNotInBoyarka.ToString("0.00") + "%<br/>"
                + "Минимальная прибыль сайта не меньше = " + MyMinFee.ToString("0.00 грн") + "<br/>"


                + "<br/>----- Что мы знаем о товаре  ------ <br/>"

                + "Есть в Боярке = " + isProductInBoyarkaPrice + "<br/>"
                + "Категория продается в Боярке = " + isboyarkaCategory + "<br/>"
                + "Закупочная цена = " + productInF5Price.PriceBase.ToString("0.00 грн") + "<br/>"
                + "Витринная цена F5 = " + productInF5Price.PriceRaschet.ToString("0.00 грн") + "<br/>"
                + "Процент выставленный на витрине F5= " + f5Percent.ToString("0.00") + "%<br/>"
                + "Этот товар в рекомендованных ценах? = " + isProductInSpecialPrice + "<br/>"
                + (isProductInSpecialPrice ? "Рекомендованная цена = " + productInSpecialPrice.ProductPrice.ToString("0.00 грн") + "<br/>" : "")


                + "<br/>----- Вычисляем цену и накрутку  ------ <br/>"

                + appliedRule + "<br/>"
                + "Вычесленный процент для этого товара = " + appliedTaxPercent.ToString("0.00") + "%<br/>"
                + "Общая прибыль = " + totalFee.ToString("0.00 грн") + "<br/>"
                + "Прибыль Наташи и Димы = " + natashasFee.ToString("0.00 грн") + "<br/>"
                + "Прибыль сайта = " + myFee.ToString("0.00 грн") + "<br/>";

            return(returnPrice);
        }