/// <summary> /// GetPriceList /// </summary> /// <param name="ctx"></param> /// <param name="fields"></param> /// <returns></returns> public Dictionary <String, String> GetPriceList(Ctx ctx, string fields) { if (fields != null) { string[] paramValue = fields.ToString().Split(','); int M_PriceList_ID; //Assign parameter value M_PriceList_ID = Util.GetValueOfInt(paramValue[0].ToString()); //End Assign parameter value MPriceList prcLst = new MPriceList(ctx, M_PriceList_ID, null); Dictionary <String, String> retDic = new Dictionary <string, string>(); // Reset Orig Shipment MCurrency crncy = new MCurrency(ctx, prcLst.GetC_Currency_ID(), null); //retDic["StdPrecision"] = prcLst.GetPricePrecision().ToString(); //JID_1744 Precision should be as per currency percision retDic["StdPrecision"] = crncy.GetStdPrecision().ToString(); return(retDic); } else { return(null); } }
// Added by Bharat on 12/May/2017 public Dictionary <string, int> GetPriceList(Ctx ctx, string fields) { int M_PriceListVersion_ID = Util.GetValueOfInt(fields); Dictionary <string, int> retDic = new Dictionary <string, int>(); MPriceListVersion ver = new MPriceListVersion(ctx, M_PriceListVersion_ID, null); retDic["M_PriceList_ID"] = ver.GetM_PriceList_ID(); MPriceList list = new MPriceList(ctx, ver.GetM_PriceList_ID(), null); retDic["C_Currency_ID"] = list.GetC_Currency_ID(); return(retDic); }
/// <summary> /// Get the curency of the pricelist /// </summary> /// <param name="fields">Time expense ID</param> /// <returns>Currency ID</returns> public JsonResult GetPriceListCurrency(string fields) { string retJSON = ""; if (Session["ctx"] != null) { VAdvantage.Utility.Ctx ctx = Session["ctx"] as Ctx; MTimeExpense timeExpense = new MTimeExpense(ctx, Util.GetValueOfInt(fields), null); MPriceList priceList = new MPriceList(ctx, timeExpense.GetM_PriceList_ID(), null); retJSON = JsonConvert.SerializeObject(priceList.GetC_Currency_ID()); } return(Json(retJSON, JsonRequestBehavior.AllowGet)); }