/// <SUMmary> /// Create Product Line details /// </SUMmary> /// <param name="Parent">C_MasterForecastLine</param> /// <param name="Order_ID">Sales Order</param> /// <param name="OrderLine_ID">Sales Order line</param> /// <param name="Opportunity_ID">Opportunity</param> /// <param name="OppLine_ID">Opportunity Line</param> /// <param name="Forecast">Team Forecast</param> /// <param name="ForecastLine_ID">Forecast Line</param> /// <param name="C_Period_ID">Period</param> /// <param name="UOM_ID">UOM</param> /// <param name="Product_ID">Product</param> /// <param name="Quantity">Qunatity</param> /// <param name="Price">Price</param> /// <param name="M_AttributeSetInstance_ID">Attribute Set Instance</param> /// <returns>Product line detail Object</returns> private PO GenerateProductLineDetails(MMasterForecastLine Parent, int LineNo, int Order_ID, int OrderLine_ID, int Opportunity_ID, int OppLine_ID, int Forecast, int ForecastLine_ID, int C_Period_ID, int UOM_ID, int Product_ID, Decimal?Quantity, Decimal?Price, int M_AttributeSetInstance_ID) { //object of VA073_MasterForecastLineDetails po = tbl.GetPO(mf.GetCtx(), 0, mf.Get_Trx()); //LineNo = Util.GetValueOfInt(DB.ExecuteScalar("SELECT NVL(MAX(LineNo), 0) AS DefaultValue FROM VA073_MasterForecastLineDetail WHERE C_MasterForecastLine_ID=" + Parent.GetC_MasterForecastLine_ID(), null, mf.Get_Trx())); po.SetAD_Client_ID(Parent.GetAD_Client_ID()); po.SetAD_Org_ID(Parent.GetAD_Org_ID()); po.Set_Value("LineNo", LineNo); po.Set_Value("C_MasterForecastLine_ID", Parent.GetC_MasterForecastLine_ID()); po.Set_Value("C_Order_ID", Order_ID); po.Set_Value("C_OrderLine_ID", OrderLine_ID); po.Set_Value("C_Project_ID", Opportunity_ID); po.Set_Value("C_ProjectLine_ID", OppLine_ID); po.Set_Value("C_Forecast_ID", Forecast); po.Set_Value("C_ForecastLine_ID", ForecastLine_ID); po.Set_Value("C_Period_ID", C_Period_ID); po.Set_Value("C_UOM_ID", UOM_ID); po.Set_Value("M_Product_ID", Product_ID); po.Set_Value("QtyEntered", Quantity); po.Set_Value("Price", Price); po.Set_Value("M_AttributeSetInstance_ID", M_AttributeSetInstance_ID); return(po); }