Exemplo n.º 1
0
        public JsonResult GetNotReserved(string fields)
        {
            string retJSON = "";

            if (Session["ctx"] != null)
            {
                VAdvantage.Utility.Ctx ctx          = Session["ctx"] as Ctx;
                MOrderLineModel        objOrderLine = new MOrderLineModel();
                retJSON = JsonConvert.SerializeObject(objOrderLine.GetNotReserved(ctx, fields));
            }
            return(Json(retJSON, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
        /// <summary>
        /// Calculate Discout based on Discount Schema selected on Business Partner
        /// </summary>
        /// <param name="fields">List of Parameters</param>
        /// <returns>Discount value</returns>
        public JsonResult FlatDiscount(string fields)
        {
            String retJSON = "";

            if (Session["ctx"] != null)
            {
                string[] paramValue       = fields.Split(',');
                int      ProductId        = Util.GetValueOfInt(paramValue[0]);
                int      ClientId         = Util.GetValueOfInt(paramValue[1]);;
                decimal  amount           = Util.GetValueOfDecimal(paramValue[2]);
                int      DiscountSchemaId = Util.GetValueOfInt(paramValue[3]);
                decimal  FlatDiscount     = Util.GetValueOfDecimal(paramValue[4]);
                decimal  QtyEntered       = Util.GetValueOfDecimal(paramValue[5]);

                VAdvantage.Utility.Ctx ctx          = Session["ctx"] as Ctx;
                MOrderLineModel        objOrderLine = new MOrderLineModel();
                retJSON = JsonConvert.SerializeObject(objOrderLine.FlatDiscount(ProductId, ClientId, amount, DiscountSchemaId, FlatDiscount, QtyEntered));
            }
            return(Json(retJSON, JsonRequestBehavior.AllowGet));
        }