/** * Set Order Line. Does not set Quantity! * * @param oLine order line * @param M_Locator_ID locator * @param Qty used only to find suitable locator */ public void setOrderLine(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty) { setC_OrderLine_ID(oLine.getC_OrderLine_ID()); setLine(oLine.getLine()); setC_UOM_ID(oLine.getC_UOM_ID()); MProduct product = oLine.getProduct(); if (product == null) { set_ValueNoCheck("M_Product_ID", null); set_ValueNoCheck("M_AttributeSetInstance_ID", null); set_ValueNoCheck("M_Locator_ID", null); } else { setM_Product_ID(oLine.getM_Product_ID()); setM_AttributeSetInstance_ID(oLine.getM_AttributeSetInstance_ID()); // if (product.isItem()) { if (M_Locator_ID == 0) setM_Locator_ID(Qty); // requires warehouse, product, asi else setM_Locator_ID(M_Locator_ID); } else set_ValueNoCheck("M_Locator_ID", null); } setC_Charge_ID(oLine.getC_Charge_ID()); setDescription(oLine.getDescription()); setIsDescription(oLine.isDescription()); // setC_Project_ID(oLine.getC_Project_ID()); setC_ProjectPhase_ID(oLine.getC_ProjectPhase_ID()); setC_ProjectTask_ID(oLine.getC_ProjectTask_ID()); setC_Activity_ID(oLine.getC_Activity_ID()); setC_Campaign_ID(oLine.getC_Campaign_ID()); setAD_OrgTrx_ID(oLine.getAD_OrgTrx_ID()); setUser1_ID(oLine.getUser1_ID()); setUser2_ID(oLine.getUser2_ID()); } // setOrderLine