/// <summary>
        /// GetMInOutLine
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="fields"></param>
        /// <returns></returns>
        public Dictionary <string, string> GetMInOutLine(Ctx ctx, string fields)
        {
            string[] paramValue = fields.Split(',');
            //Assign parameter value
            int Orig_InOutLine_ID = Util.GetValueOfInt(paramValue[0].ToString());
            //End Assign parameter value
            MInOutLine ioLine = new MInOutLine(ctx, Orig_InOutLine_ID, null);
            Dictionary <string, string> result = new Dictionary <string, string>();

            result["M_Locator_ID"]              = ioLine.GetM_Locator_ID().ToString();
            result["MovementQty"]               = ioLine.GetMovementQty().ToString();
            result["C_Project_ID"]              = ioLine.GetC_Project_ID().ToString();
            result["C_Campaign_ID"]             = ioLine.GetC_Campaign_ID().ToString();
            result["M_Product_ID"]              = ioLine.GetM_Product_ID().ToString();
            result["M_AttributeSetInstance_ID"] = ioLine.GetM_AttributeSetInstance_ID().ToString();
            result["C_UOM_ID"]   = ioLine.GetC_UOM_ID().ToString();
            result["IsDropShip"] = ioLine.IsDropShip() ? "Y" : "N";

            // JID_1310: On Selection of Shipment line on Customer/Vendor RMA. System should check Total Delivred - Total Return Qty From Sales PO line and Balance  show in qty field
            decimal qtyRMA = Util.GetValueOfDecimal(DB.ExecuteScalar(@"SELECT SUM(QtyEntered) FROM C_Order o INNER JOIN C_OrderLine ol ON o.C_Order_ID = ol.C_Order_ID                            
                            WHERE ol.Orig_InOutLine_ID = " + Orig_InOutLine_ID
                                                                     + @" AND ol.Isactive = 'Y' AND o.docstatus NOT IN ('RE' , 'VO')", null, null));
            decimal QtyNotDelivered = ioLine.GetQtyEntered() - qtyRMA;

            result["QtyEntered"] = QtyNotDelivered.ToString();

            //retlst.Add(retValue);
            return(result);
        }
        public JsonResult GetInOutLine(string param)
        {
            string retError = "";
            string retJSON  = "";

            if (Session["ctx"] != null)
            {
                VAdvantage.Utility.Ctx ctx         = Session["ctx"] as Ctx;
                string[] paramValue                = param.Split(',');
                Dictionary <String, String> retDic = new Dictionary <string, string>();
                int id;

                //Assign parameter value
                id = Util.GetValueOfInt(paramValue[0].ToString());
                MInOutLine Orig_InOutLine = new MInOutLine(ctx, id, null);
                retDic["MovementQty"]               = Orig_InOutLine.GetMovementQty().ToString();
                retDic["C_Project_ID"]              = Orig_InOutLine.GetC_Project_ID().ToString();
                retDic["C_Campaign_ID"]             = Orig_InOutLine.GetC_Campaign_ID().ToString();
                retDic["M_Product_ID"]              = Orig_InOutLine.GetM_Product_ID().ToString();
                retDic["M_AttributeSetInstance_ID"] = Orig_InOutLine.GetM_AttributeSetInstance_ID().ToString();
                retDic["C_UOM_ID"] = Orig_InOutLine.GetC_UOM_ID().ToString();
                //retlst.Add(retValue);

                //retVal.Add(notReserved);


                retJSON = JsonConvert.SerializeObject(retDic);
            }
            else
            {
                retError = "Session Expired";
            }
            return(Json(new { result = retJSON, error = retError }, JsonRequestBehavior.AllowGet));
        }
Exemple #3
0
        /// <summary>
        /// GetMInOutLine
        /// </summary>
        /// <param name="ctx"></param>
        /// <param name="fields"></param>
        /// <returns></returns>
        public Dictionary <string, string> GetMInOutLine(Ctx ctx, string fields)
        {
            string[] paramValue = fields.Split(',');
            //Assign parameter value
            int Orig_InOutLine_ID = Util.GetValueOfInt(paramValue[0].ToString());
            //End Assign parameter value
            MInOutLine ioLine = new MInOutLine(ctx, Orig_InOutLine_ID, null);
            Dictionary <string, string> result = new Dictionary <string, string>();

            result["M_Locator_ID"]              = ioLine.GetM_Locator_ID().ToString();
            result["MovementQty"]               = ioLine.GetMovementQty().ToString();
            result["C_Project_ID"]              = ioLine.GetC_Project_ID().ToString();
            result["C_Campaign_ID"]             = ioLine.GetC_Campaign_ID().ToString();
            result["M_Product_ID"]              = ioLine.GetM_Product_ID().ToString();
            result["M_AttributeSetInstance_ID"] = ioLine.GetM_AttributeSetInstance_ID().ToString();
            result["C_UOM_ID"] = ioLine.GetC_UOM_ID().ToString();
            //retlst.Add(retValue);
            return(result);
        }