示例#1
0
 /**
  * Set Invoice Line. Does not set Quantity!
  *
  * @param iLine invoice line
  * @param M_Locator_ID locator
  * @param Qty qty only fo find suitable locator
  */
 public void setInvoiceLine(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty) {
   setC_OrderLine_ID(iLine.getC_OrderLine_ID());
   setLine(iLine.getLine());
   setC_UOM_ID(iLine.getC_UOM_ID());
   int M_Product_ID = iLine.getM_Product_ID();
   if (M_Product_ID == 0) {
     set_ValueNoCheck("M_Product_ID", null);
     set_ValueNoCheck("M_Locator_ID", null);
     set_ValueNoCheck("M_AttributeSetInstance_ID", null);
   } else {
     setM_Product_ID(M_Product_ID);
     setM_AttributeSetInstance_ID(iLine.getM_AttributeSetInstance_ID());
     if (M_Locator_ID == 0) setM_Locator_ID(Qty); // 	requires warehouse, product, asi
     else setM_Locator_ID(M_Locator_ID);
   }
   setC_Charge_ID(iLine.getC_Charge_ID());
   setDescription(iLine.getDescription());
   setIsDescription(iLine.isDescription());
   //
   setC_Project_ID(iLine.getC_Project_ID());
   setC_ProjectPhase_ID(iLine.getC_ProjectPhase_ID());
   setC_ProjectTask_ID(iLine.getC_ProjectTask_ID());
   setC_Activity_ID(iLine.getC_Activity_ID());
   setC_Campaign_ID(iLine.getC_Campaign_ID());
   setAD_OrgTrx_ID(iLine.getAD_OrgTrx_ID());
   setUser1_ID(iLine.getUser1_ID());
   setUser2_ID(iLine.getUser2_ID());
 } //	setInvoiceLine