Implementing Subcontract Activity Control
http://sourceforge.net/tracker2/?func=detail&aid=2431672&group_id=176962&atid=879335
This commit is contained in:
parent
1448264d28
commit
938cf1a4ba
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program, if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -66,6 +57,19 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getAD_OrgTrx_ID();
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name C_Activity_ID */
|
||||
public static final String COLUMNNAME_C_Activity_ID = "C_Activity_ID";
|
||||
|
||||
|
@ -79,7 +83,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_Activity_ID();
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception;
|
||||
public I_C_Activity getC_Activity() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
@ -94,7 +98,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception;
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_BPartner_Location_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_Location_ID = "C_BPartner_Location_ID";
|
||||
|
@ -109,7 +113,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_BPartner_Location_ID();
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception;
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException;
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
@ -124,7 +128,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception;
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name C_Charge_ID */
|
||||
public static final String COLUMNNAME_C_Charge_ID = "C_Charge_ID";
|
||||
|
@ -139,7 +143,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_Charge_ID();
|
||||
|
||||
public I_C_Charge getC_Charge() throws Exception;
|
||||
public I_C_Charge getC_Charge() throws RuntimeException;
|
||||
|
||||
/** Column name C_Currency_ID */
|
||||
public static final String COLUMNNAME_C_Currency_ID = "C_Currency_ID";
|
||||
|
@ -154,22 +158,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_Currency_ID();
|
||||
|
||||
public I_C_Currency getC_Currency() throws Exception;
|
||||
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
||||
/** Set Order.
|
||||
* Order
|
||||
*/
|
||||
public void setC_Order_ID (int C_Order_ID);
|
||||
|
||||
/** Get Order.
|
||||
* Order
|
||||
*/
|
||||
public int getC_Order_ID();
|
||||
|
||||
public I_C_Order getC_Order() throws Exception;
|
||||
public I_C_Currency getC_Currency() throws RuntimeException;
|
||||
|
||||
/** Column name C_OrderLine_ID */
|
||||
public static final String COLUMNNAME_C_OrderLine_ID = "C_OrderLine_ID";
|
||||
|
@ -184,20 +173,20 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_OrderLine_ID();
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
||||
/** Set Project.
|
||||
* Financial Project
|
||||
/** Set Order.
|
||||
* Order
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID);
|
||||
public void setC_Order_ID (int C_Order_ID);
|
||||
|
||||
/** Get Project.
|
||||
* Financial Project
|
||||
/** Get Order.
|
||||
* Order
|
||||
*/
|
||||
public int getC_Project_ID();
|
||||
public int getC_Order_ID();
|
||||
|
||||
public I_C_Project getC_Project() throws Exception;
|
||||
public I_C_Order getC_Order() throws RuntimeException;
|
||||
|
||||
/** Column name C_ProjectPhase_ID */
|
||||
public static final String COLUMNNAME_C_ProjectPhase_ID = "C_ProjectPhase_ID";
|
||||
|
@ -212,7 +201,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_ProjectPhase_ID();
|
||||
|
||||
public I_C_ProjectPhase getC_ProjectPhase() throws Exception;
|
||||
public I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException;
|
||||
|
||||
/** Column name C_ProjectTask_ID */
|
||||
public static final String COLUMNNAME_C_ProjectTask_ID = "C_ProjectTask_ID";
|
||||
|
@ -227,7 +216,22 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_ProjectTask_ID();
|
||||
|
||||
public I_C_ProjectTask getC_ProjectTask() throws Exception;
|
||||
public I_C_ProjectTask getC_ProjectTask() throws RuntimeException;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
||||
/** Set Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID);
|
||||
|
||||
/** Get Project.
|
||||
* Financial Project
|
||||
*/
|
||||
public int getC_Project_ID();
|
||||
|
||||
public I_C_Project getC_Project() throws RuntimeException;
|
||||
|
||||
/** Column name C_Tax_ID */
|
||||
public static final String COLUMNNAME_C_Tax_ID = "C_Tax_ID";
|
||||
|
@ -242,7 +246,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_Tax_ID();
|
||||
|
||||
public I_C_Tax getC_Tax() throws Exception;
|
||||
public I_C_Tax getC_Tax() throws RuntimeException;
|
||||
|
||||
/** Column name C_UOM_ID */
|
||||
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
|
||||
|
@ -257,7 +261,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getC_UOM_ID();
|
||||
|
||||
public I_C_UOM getC_UOM() throws Exception;
|
||||
public I_C_UOM getC_UOM() throws RuntimeException;
|
||||
|
||||
/** Column name DateDelivered */
|
||||
public static final String COLUMNNAME_DateDelivered = "DateDelivered";
|
||||
|
@ -428,7 +432,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public I_M_Product getM_Product() throws Exception;
|
||||
public I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name M_Shipper_ID */
|
||||
public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
|
||||
|
@ -443,7 +447,7 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getM_Shipper_ID();
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception;
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException;
|
||||
|
||||
/** Column name M_Warehouse_ID */
|
||||
public static final String COLUMNNAME_M_Warehouse_ID = "M_Warehouse_ID";
|
||||
|
@ -458,6 +462,17 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public int getM_Warehouse_ID();
|
||||
|
||||
/** Column name PP_Cost_Collector_ID */
|
||||
public static final String COLUMNNAME_PP_Cost_Collector_ID = "PP_Cost_Collector_ID";
|
||||
|
||||
/** Set Manufacturing Cost Collector */
|
||||
public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID);
|
||||
|
||||
/** Get Manufacturing Cost Collector */
|
||||
public int getPP_Cost_Collector_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Cost_Collector getPP_Cost_Collector() throws RuntimeException;
|
||||
|
||||
/** Column name PriceActual */
|
||||
public static final String COLUMNNAME_PriceActual = "PriceActual";
|
||||
|
||||
|
@ -614,19 +629,6 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public BigDecimal getQtyReserved();
|
||||
|
||||
/** Column name Ref_OrderLine_ID */
|
||||
public static final String COLUMNNAME_Ref_OrderLine_ID = "Ref_OrderLine_ID";
|
||||
|
||||
/** Set Referenced Order Line.
|
||||
* Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public void setRef_OrderLine_ID (int Ref_OrderLine_ID);
|
||||
|
||||
/** Get Referenced Order Line.
|
||||
* Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public int getRef_OrderLine_ID();
|
||||
|
||||
/** Column name RRAmt */
|
||||
public static final String COLUMNNAME_RRAmt = "RRAmt";
|
||||
|
||||
|
@ -653,6 +655,19 @@ public interface I_C_OrderLine
|
|||
*/
|
||||
public Timestamp getRRStartDate();
|
||||
|
||||
/** Column name Ref_OrderLine_ID */
|
||||
public static final String COLUMNNAME_Ref_OrderLine_ID = "Ref_OrderLine_ID";
|
||||
|
||||
/** Set Referenced Order Line.
|
||||
* Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public void setRef_OrderLine_ID (int Ref_OrderLine_ID);
|
||||
|
||||
/** Get Referenced Order Line.
|
||||
* Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public int getRef_OrderLine_ID();
|
||||
|
||||
/** Column name S_ResourceAssignment_ID */
|
||||
public static final String COLUMNNAME_S_ResourceAssignment_ID = "S_ResourceAssignment_ID";
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ import java.util.Properties;
|
|||
import java.util.logging.Level;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.exceptions.FillMandatoryException;
|
||||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.process.DocAction;
|
||||
|
@ -465,9 +466,16 @@ public class MOrder extends X_C_Order implements DocAction
|
|||
setBill_Location_ID(locs[0].getC_BPartner_Location_ID());
|
||||
}
|
||||
if (getC_BPartner_Location_ID() == 0)
|
||||
{
|
||||
log.log(Level.SEVERE, "MOrder.setBPartner - Has no Ship To Address: " + bp);
|
||||
throw new AdempiereException("MOrder.setBPartner - Has no Ship To Address: "+bp);
|
||||
}
|
||||
|
||||
if (getBill_Location_ID() == 0)
|
||||
{
|
||||
log.log(Level.SEVERE, "MOrder.setBPartner - Has no Bill To Address: " + bp);
|
||||
throw new AdempiereException("MOrder.setBPartner - Has no Bill To Address: "+bp);
|
||||
}
|
||||
|
||||
// Set Contact
|
||||
MUser[] contacts = bp.getContacts(false);
|
||||
|
|
|
@ -47,8 +47,8 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
// @C_BPartner_Location_ID@
|
||||
setC_Currency_ID (0);
|
||||
// @C_Currency_ID@
|
||||
setC_Order_ID (0);
|
||||
setC_OrderLine_ID (0);
|
||||
setC_Order_ID (0);
|
||||
setC_Tax_ID (0);
|
||||
setC_UOM_ID (0);
|
||||
// @#C_UOM_ID@
|
||||
|
@ -107,8 +107,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
/** AD_OrgTrx_ID AD_Reference_ID=130 */
|
||||
public static final int AD_ORGTRX_ID_AD_Reference_ID=130;
|
||||
/** Set Trx Organization.
|
||||
@param AD_OrgTrx_ID
|
||||
Performing or initiating organization
|
||||
|
@ -132,7 +130,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Activity getC_Activity() throws Exception
|
||||
public I_C_Activity getC_Activity() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Activity.Table_Name);
|
||||
I_C_Activity result = null;
|
||||
|
@ -143,7 +141,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -171,7 +169,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws Exception
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner.Table_Name);
|
||||
I_C_BPartner result = null;
|
||||
|
@ -182,7 +180,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -210,7 +208,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws Exception
|
||||
public I_C_BPartner_Location getC_BPartner_Location() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_BPartner_Location.Table_Name);
|
||||
I_C_BPartner_Location result = null;
|
||||
|
@ -221,7 +219,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -248,7 +246,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws Exception
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Campaign.Table_Name);
|
||||
I_C_Campaign result = null;
|
||||
|
@ -259,7 +257,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -287,7 +285,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Charge getC_Charge() throws Exception
|
||||
public I_C_Charge getC_Charge() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Charge.Table_Name);
|
||||
I_C_Charge result = null;
|
||||
|
@ -298,7 +296,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -326,7 +324,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Currency getC_Currency() throws Exception
|
||||
public I_C_Currency getC_Currency() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Currency.Table_Name);
|
||||
I_C_Currency result = null;
|
||||
|
@ -337,7 +335,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -364,7 +362,29 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Order getC_Order() throws Exception
|
||||
/** Set Sales Order Line.
|
||||
@param C_OrderLine_ID
|
||||
Sales Order Line
|
||||
*/
|
||||
public void setC_OrderLine_ID (int C_OrderLine_ID)
|
||||
{
|
||||
if (C_OrderLine_ID < 1)
|
||||
throw new IllegalArgumentException ("C_OrderLine_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
|
||||
}
|
||||
|
||||
/** Get Sales Order Line.
|
||||
@return Sales Order Line
|
||||
*/
|
||||
public int getC_OrderLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Order getC_Order() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Order.Table_Name);
|
||||
I_C_Order result = null;
|
||||
|
@ -375,7 +395,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -410,68 +430,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return new KeyNamePair(get_ID(), String.valueOf(getC_Order_ID()));
|
||||
}
|
||||
|
||||
/** Set Sales Order Line.
|
||||
@param C_OrderLine_ID
|
||||
Sales Order Line
|
||||
*/
|
||||
public void setC_OrderLine_ID (int C_OrderLine_ID)
|
||||
{
|
||||
if (C_OrderLine_ID < 1)
|
||||
throw new IllegalArgumentException ("C_OrderLine_ID is mandatory.");
|
||||
set_ValueNoCheck (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));
|
||||
}
|
||||
|
||||
/** Get Sales Order Line.
|
||||
@return Sales Order Line
|
||||
*/
|
||||
public int getC_OrderLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws Exception
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
I_C_Project result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Project.
|
||||
@param C_Project_ID
|
||||
Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID)
|
||||
{
|
||||
if (C_Project_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Project_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
|
||||
}
|
||||
|
||||
/** Get Project.
|
||||
@return Financial Project
|
||||
*/
|
||||
public int getC_Project_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_ProjectPhase getC_ProjectPhase() throws Exception
|
||||
public I_C_ProjectPhase getC_ProjectPhase() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_ProjectPhase.Table_Name);
|
||||
I_C_ProjectPhase result = null;
|
||||
|
@ -482,7 +441,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -510,7 +469,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_ProjectTask getC_ProjectTask() throws Exception
|
||||
public I_C_ProjectTask getC_ProjectTask() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_ProjectTask.Table_Name);
|
||||
I_C_ProjectTask result = null;
|
||||
|
@ -521,7 +480,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -549,7 +508,46 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Tax getC_Tax() throws Exception
|
||||
public I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
I_C_Project result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Project)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Project_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Project.
|
||||
@param C_Project_ID
|
||||
Financial Project
|
||||
*/
|
||||
public void setC_Project_ID (int C_Project_ID)
|
||||
{
|
||||
if (C_Project_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Project_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Project_ID, Integer.valueOf(C_Project_ID));
|
||||
}
|
||||
|
||||
/** Get Project.
|
||||
@return Financial Project
|
||||
*/
|
||||
public int getC_Project_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Project_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Tax getC_Tax() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Tax.Table_Name);
|
||||
I_C_Tax result = null;
|
||||
|
@ -560,7 +558,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -587,7 +585,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_UOM getC_UOM() throws Exception
|
||||
public I_C_UOM getC_UOM() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_UOM.Table_Name);
|
||||
I_C_UOM result = null;
|
||||
|
@ -598,7 +596,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -820,8 +818,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return bd;
|
||||
}
|
||||
|
||||
/** Link_OrderLine_ID AD_Reference_ID=271 */
|
||||
public static final int LINK_ORDERLINE_ID_AD_Reference_ID=271;
|
||||
/** Set Linked Order Line.
|
||||
@param Link_OrderLine_ID
|
||||
This field links a sales order line to the purchase order line that is generated from it.
|
||||
|
@ -867,7 +863,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws Exception
|
||||
public I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Product.Table_Name);
|
||||
I_M_Product result = null;
|
||||
|
@ -878,7 +874,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -906,7 +902,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws Exception
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Shipper.Table_Name);
|
||||
I_M_Shipper result = null;
|
||||
|
@ -917,7 +913,7 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -945,8 +941,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** M_Warehouse_ID AD_Reference_ID=197 */
|
||||
public static final int M_WAREHOUSE_ID_AD_Reference_ID=197;
|
||||
/** Set Warehouse.
|
||||
@param M_Warehouse_ID
|
||||
Storage Warehouse and Service Point
|
||||
|
@ -969,6 +963,42 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Cost_Collector getPP_Cost_Collector() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Cost_Collector.Table_Name);
|
||||
org.eevolution.model.I_PP_Cost_Collector result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (org.eevolution.model.I_PP_Cost_Collector)constructor.newInstance(new Object[] {getCtx(), new Integer(getPP_Cost_Collector_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Manufacturing Cost Collector.
|
||||
@param PP_Cost_Collector_ID Manufacturing Cost Collector */
|
||||
public void setPP_Cost_Collector_ID (int PP_Cost_Collector_ID)
|
||||
{
|
||||
if (PP_Cost_Collector_ID < 1)
|
||||
set_Value (COLUMNNAME_PP_Cost_Collector_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_PP_Cost_Collector_ID, Integer.valueOf(PP_Cost_Collector_ID));
|
||||
}
|
||||
|
||||
/** Get Manufacturing Cost Collector.
|
||||
@return Manufacturing Cost Collector */
|
||||
public int getPP_Cost_Collector_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Cost_Collector_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Unit Price.
|
||||
@param PriceActual
|
||||
Actual Price
|
||||
|
@ -1233,31 +1263,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return bd;
|
||||
}
|
||||
|
||||
/** Ref_OrderLine_ID AD_Reference_ID=271 */
|
||||
public static final int REF_ORDERLINE_ID_AD_Reference_ID=271;
|
||||
/** Set Referenced Order Line.
|
||||
@param Ref_OrderLine_ID
|
||||
Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public void setRef_OrderLine_ID (int Ref_OrderLine_ID)
|
||||
{
|
||||
if (Ref_OrderLine_ID < 1)
|
||||
set_Value (COLUMNNAME_Ref_OrderLine_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID));
|
||||
}
|
||||
|
||||
/** Get Referenced Order Line.
|
||||
@return Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public int getRef_OrderLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_Ref_OrderLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Revenue Recognition Amt.
|
||||
@param RRAmt
|
||||
Revenue Recognition Amount
|
||||
|
@ -1295,6 +1300,29 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return (Timestamp)get_Value(COLUMNNAME_RRStartDate);
|
||||
}
|
||||
|
||||
/** Set Referenced Order Line.
|
||||
@param Ref_OrderLine_ID
|
||||
Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public void setRef_OrderLine_ID (int Ref_OrderLine_ID)
|
||||
{
|
||||
if (Ref_OrderLine_ID < 1)
|
||||
set_Value (COLUMNNAME_Ref_OrderLine_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_Ref_OrderLine_ID, Integer.valueOf(Ref_OrderLine_ID));
|
||||
}
|
||||
|
||||
/** Get Referenced Order Line.
|
||||
@return Reference to corresponding Sales/Purchase Order
|
||||
*/
|
||||
public int getRef_OrderLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_Ref_OrderLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Resource Assignment.
|
||||
@param S_ResourceAssignment_ID
|
||||
Resource Assignment
|
||||
|
@ -1318,8 +1346,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** User1_ID AD_Reference_ID=134 */
|
||||
public static final int USER1_ID_AD_Reference_ID=134;
|
||||
/** Set User List 1.
|
||||
@param User1_ID
|
||||
User defined list element #1
|
||||
|
@ -1343,8 +1369,6 @@ public class X_C_OrderLine extends PO implements I_C_OrderLine, I_Persistent
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** User2_ID AD_Reference_ID=137 */
|
||||
public static final int USER2_ID_AD_Reference_ID=137;
|
||||
/** Set User List 2.
|
||||
@param User2_ID
|
||||
User defined list element #2
|
||||
|
|
|
@ -1068,7 +1068,7 @@ public class DocumentEngine implements DocAction
|
|||
|| docStatus.equals(DocumentEngine.STATUS_InProgress)
|
||||
|| docStatus.equals(DocumentEngine.STATUS_Invalid))
|
||||
{
|
||||
//options[index++] = DocumentEngine.ACTION_Prepare;
|
||||
options[index++] = DocumentEngine.ACTION_Prepare;
|
||||
options[index++] = DocumentEngine.ACTION_Close;
|
||||
}
|
||||
// Complete .. CO
|
||||
|
|
|
@ -833,6 +833,11 @@ public class MWorkflow extends X_AD_Workflow
|
|||
errors.append(" - No Document Value Logic");
|
||||
//
|
||||
|
||||
//
|
||||
if (getWorkflowType().equals(MWorkflow.WORKFLOWTYPE_Manufacturing))
|
||||
{
|
||||
this.setAD_Table_ID(0);
|
||||
}
|
||||
|
||||
// final
|
||||
boolean valid = errors.length() == 0;
|
||||
|
|
|
@ -22,6 +22,8 @@ import java.util.Properties;
|
|||
import org.compiere.model.CalloutEngine;
|
||||
import org.compiere.model.GridField;
|
||||
import org.compiere.model.GridTab;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/**
|
||||
* Cost Collector Callout
|
||||
|
@ -38,6 +40,7 @@ public class CalloutCostCollector extends CalloutEngine
|
|||
return "";
|
||||
//
|
||||
MPPOrder order = new MPPOrder(ctx, PP_Order_ID, null);
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_AD_Org_ID, order.getAD_Org_ID());
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_C_DocTypeTarget_ID, order.getC_DocType_ID());
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_S_Resource_ID, order.getS_Resource_ID());
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_M_Product_ID, order.getM_Product_ID());
|
||||
|
@ -59,6 +62,7 @@ public class CalloutCostCollector extends CalloutEngine
|
|||
return "";
|
||||
//
|
||||
MPPOrderNode node = getPP_Order_Node(ctx, PP_Order_Node_ID);
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_IsSubcontracting, node.isSubcontracting());
|
||||
mTab.setValue(MPPCostCollector.COLUMNNAME_S_Resource_ID, node.getS_Resource_ID());
|
||||
|
||||
BigDecimal qtyToDeliver = node.getQtyRequiered()
|
||||
|
@ -87,6 +91,7 @@ public class CalloutCostCollector extends CalloutEngine
|
|||
m_node = new MPPOrderNode(ctx, PP_Order_Node_ID, null);
|
||||
return m_node;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -142,6 +142,21 @@ public interface I_PP_Cost_Collector
|
|||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
|
||||
/** Set Order.
|
||||
* Order
|
||||
*/
|
||||
public void setC_Order_ID (int C_Order_ID);
|
||||
|
||||
/** Get Order.
|
||||
* Order
|
||||
*/
|
||||
public int getC_Order_ID();
|
||||
|
||||
public I_C_Order getC_Order() throws RuntimeException;
|
||||
|
||||
/** Column name C_Project_ID */
|
||||
public static final String COLUMNNAME_C_Project_ID = "C_Project_ID";
|
||||
|
||||
|
@ -255,6 +270,15 @@ public interface I_PP_Cost_Collector
|
|||
/** Get Is BatchTime */
|
||||
public boolean isBatchTime();
|
||||
|
||||
/** Column name IsSubcontracting */
|
||||
public static final String COLUMNNAME_IsSubcontracting = "IsSubcontracting";
|
||||
|
||||
/** Set Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting);
|
||||
|
||||
/** Get Is Subcontracting */
|
||||
public boolean isSubcontracting();
|
||||
|
||||
/** Column name M_AttributeSetInstance_ID */
|
||||
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
|
||||
|
||||
|
@ -355,7 +379,7 @@ public interface I_PP_Cost_Collector
|
|||
/** Get Manufacturing Order BOM Line */
|
||||
public int getPP_Order_BOMLine_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws RuntimeException;
|
||||
public org.eevolution.model.I_PP_Order_BOMLine getPPOrderBOMLine() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_ID */
|
||||
public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID";
|
||||
|
@ -366,7 +390,7 @@ public interface I_PP_Cost_Collector
|
|||
/** Get Manufacturing Order */
|
||||
public int getPP_Order_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException;
|
||||
public org.eevolution.model.I_PP_Order getPPOrder() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_Node_ID */
|
||||
public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID";
|
||||
|
@ -377,7 +401,7 @@ public interface I_PP_Cost_Collector
|
|||
/** Get Manufacturing Order Activity */
|
||||
public int getPP_Order_Node_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException;
|
||||
public org.eevolution.model.I_PP_Order_Node getPPOrderNode() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_Workflow_ID */
|
||||
public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID";
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program, if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -53,6 +44,28 @@ public interface I_PP_Order_Node_Product
|
|||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name IsSubcontracting */
|
||||
public static final String COLUMNNAME_IsSubcontracting = "IsSubcontracting";
|
||||
|
||||
/** Set Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting);
|
||||
|
||||
/** Get Is Subcontracting */
|
||||
public boolean isSubcontracting();
|
||||
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
|
||||
|
@ -66,18 +79,18 @@ public interface I_PP_Order_Node_Product
|
|||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public I_M_Product getM_Product() throws Exception;
|
||||
public I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_ID */
|
||||
public static final String COLUMNNAME_PP_Order_ID = "PP_Order_ID";
|
||||
|
||||
/** Set PP_Order_ID */
|
||||
/** Set Manufacturing Order */
|
||||
public void setPP_Order_ID (int PP_Order_ID);
|
||||
|
||||
/** Get PP_Order_ID */
|
||||
/** Get Manufacturing Order */
|
||||
public int getPP_Order_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws Exception;
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_Node_ID */
|
||||
public static final String COLUMNNAME_PP_Order_Node_ID = "PP_Order_Node_ID";
|
||||
|
@ -88,27 +101,55 @@ public interface I_PP_Order_Node_Product
|
|||
/** Get Manufacturing Order Activity */
|
||||
public int getPP_Order_Node_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception;
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException;
|
||||
|
||||
/** Column name PP_Order_Node_Product_ID */
|
||||
public static final String COLUMNNAME_PP_Order_Node_Product_ID = "PP_Order_Node_Product_ID";
|
||||
|
||||
/** Set PP_Order_Node_Product_ID */
|
||||
/** Set Manufacturing Order Activity Product */
|
||||
public void setPP_Order_Node_Product_ID (int PP_Order_Node_Product_ID);
|
||||
|
||||
/** Get PP_Order_Node_Product_ID */
|
||||
/** Get Manufacturing Order Activity Product */
|
||||
public int getPP_Order_Node_Product_ID();
|
||||
|
||||
/** Column name PP_Order_Workflow_ID */
|
||||
public static final String COLUMNNAME_PP_Order_Workflow_ID = "PP_Order_Workflow_ID";
|
||||
|
||||
/** Set PP_Order_Workflow_ID */
|
||||
/** Set Manufacturing Order Workflow */
|
||||
public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID);
|
||||
|
||||
/** Get PP_Order_Workflow_ID */
|
||||
/** Get Manufacturing Order Workflow */
|
||||
public int getPP_Order_Workflow_ID();
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception;
|
||||
public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws RuntimeException;
|
||||
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
|
||||
/** Set Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public void setQty (BigDecimal Qty);
|
||||
|
||||
/** Get Quantity.
|
||||
* Quantity
|
||||
*/
|
||||
public BigDecimal getQty();
|
||||
|
||||
/** Column name SeqNo */
|
||||
public static final String COLUMNNAME_SeqNo = "SeqNo";
|
||||
|
||||
/** Set Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo);
|
||||
|
||||
/** Get Sequence.
|
||||
* Method of ordering records;
|
||||
lowest number comes first
|
||||
*/
|
||||
public int getSeqNo();
|
||||
|
||||
/** Column name Yield */
|
||||
public static final String COLUMNNAME_Yield = "Yield";
|
||||
|
|
|
@ -1,31 +1,22 @@
|
|||
/**********************************************************************
|
||||
* This file is part of Adempiere ERP Bazaar *
|
||||
* http://www.adempiere.org *
|
||||
* *
|
||||
* Copyright (C) Trifon Trifonov. *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software, you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation, either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY, without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program, if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - Trifon Trifonov (trifonnt@users.sourceforge.net) *
|
||||
* *
|
||||
* Sponsors: *
|
||||
* - Company (http://www.site.com) *
|
||||
**********************************************************************/
|
||||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
@ -53,6 +44,19 @@ public interface I_PP_WF_Node_Product
|
|||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Org_ID */
|
||||
public static final String COLUMNNAME_AD_Org_ID = "AD_Org_ID";
|
||||
|
||||
/** Set Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public void setAD_Org_ID (int AD_Org_ID);
|
||||
|
||||
/** Get Organization.
|
||||
* Organizational entity within client
|
||||
*/
|
||||
public int getAD_Org_ID();
|
||||
|
||||
/** Column name AD_WF_Node_ID */
|
||||
public static final String COLUMNNAME_AD_WF_Node_ID = "AD_WF_Node_ID";
|
||||
|
||||
|
@ -66,7 +70,7 @@ public interface I_PP_WF_Node_Product
|
|||
*/
|
||||
public int getAD_WF_Node_ID();
|
||||
|
||||
public I_AD_WF_Node getAD_WF_Node() throws Exception;
|
||||
public I_AD_WF_Node getAD_WF_Node() throws RuntimeException;
|
||||
|
||||
/** Column name ConfigurationLevel */
|
||||
public static final String COLUMNNAME_ConfigurationLevel = "ConfigurationLevel";
|
||||
|
@ -96,6 +100,15 @@ public interface I_PP_WF_Node_Product
|
|||
*/
|
||||
public String getEntityType();
|
||||
|
||||
/** Column name IsSubcontracting */
|
||||
public static final String COLUMNNAME_IsSubcontracting = "IsSubcontracting";
|
||||
|
||||
/** Set Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting);
|
||||
|
||||
/** Get Is Subcontracting */
|
||||
public boolean isSubcontracting();
|
||||
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
|
||||
|
@ -109,15 +122,15 @@ public interface I_PP_WF_Node_Product
|
|||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public I_M_Product getM_Product() throws Exception;
|
||||
public I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name PP_WF_Node_Product_ID */
|
||||
public static final String COLUMNNAME_PP_WF_Node_Product_ID = "PP_WF_Node_Product_ID";
|
||||
|
||||
/** Set PP_WF_Node_Product_ID */
|
||||
/** Set Workflow Node Product */
|
||||
public void setPP_WF_Node_Product_ID (int PP_WF_Node_Product_ID);
|
||||
|
||||
/** Get PP_WF_Node_Product_ID */
|
||||
/** Get Workflow Node Product */
|
||||
public int getPP_WF_Node_Product_ID();
|
||||
|
||||
/** Column name Qty */
|
||||
|
@ -147,4 +160,13 @@ public interface I_PP_WF_Node_Product
|
|||
lowest number comes first
|
||||
*/
|
||||
public int getSeqNo();
|
||||
|
||||
/** Column name Yield */
|
||||
public static final String COLUMNNAME_Yield = "Yield";
|
||||
|
||||
/** Set Yield */
|
||||
public void setYield (int Yield);
|
||||
|
||||
/** Get Yield */
|
||||
public int getYield();
|
||||
}
|
||||
|
|
|
@ -15,15 +15,21 @@
|
|||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MInOut;
|
||||
import org.compiere.model.MInOutLine;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MRequisitionLine;
|
||||
import org.compiere.model.ModelValidationEngine;
|
||||
import org.compiere.model.ModelValidator;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.Query;
|
||||
import org.eevolution.model.MForecastLine;
|
||||
import org.compiere.util.CLogger;
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -69,6 +75,7 @@ public class LiberoValidator implements ModelValidator
|
|||
engine.addModelChange(MDDOrderLine.Table_Name, this);
|
||||
engine.addModelChange(MPPOrder.Table_Name, this);
|
||||
engine.addModelChange(MPPOrderBOMLine.Table_Name, this);
|
||||
engine.addDocValidate(MInOut.Table_Name, this);
|
||||
} // initialize
|
||||
|
||||
public String modelChange (PO po, int type) throws Exception
|
||||
|
@ -263,6 +270,30 @@ public class LiberoValidator implements ModelValidator
|
|||
public String docValidate (PO po, int timing)
|
||||
{
|
||||
log.info(po.get_TableName() + " Timing: "+timing);
|
||||
if (po.get_TableName().equals(MInOut.Table_Name) && timing == TIMING_AFTER_COMPLETE)
|
||||
{
|
||||
MInOut inout = (MInOut)po;
|
||||
for (MInOutLine line : inout.getLines())
|
||||
{
|
||||
String whereClause = "C_OrderLine_ID=? AND PP_Cost_Collector_ID IS NOT NULL";
|
||||
Collection<MOrderLine> olines = new Query(po.getCtx(), MOrderLine.Table_Name, whereClause, po.get_TrxName())
|
||||
.setParameters(new Object[]{line.getC_OrderLine_ID()}).list();
|
||||
|
||||
for (MOrderLine oline: olines)
|
||||
{
|
||||
if(oline.getQtyOrdered().compareTo(oline.getQtyDelivered()) >= 0)
|
||||
{
|
||||
MPPCostCollector cc = new MPPCostCollector(po.getCtx(), oline.getPP_Cost_Collector_ID(), po.get_TrxName());
|
||||
cc.completeIt();
|
||||
cc.setDocStatus(MPPCostCollector.DOCSTATUS_Completed);
|
||||
cc.setDocAction(MPPCostCollector.DOCACTION_Close);
|
||||
cc.saveEx();
|
||||
return Msg.translate(po.getCtx(), "PP_Order_ID")+":"+cc.getPPOrder().getDocumentNo()+Msg.translate(po.getCtx(),"PP_Order_Node_ID")+":"+cc.getPPOrderNode().getValue();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return null;
|
||||
} // docValidate
|
||||
|
||||
|
|
|
@ -23,18 +23,21 @@ import java.sql.PreparedStatement;
|
|||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.adempiere.exceptions.AdempiereException;
|
||||
import org.adempiere.exceptions.DBException;
|
||||
import org.compiere.model.MAttributeSetInstance;
|
||||
import org.compiere.model.MBPartner;
|
||||
import org.compiere.model.MClient;
|
||||
import org.compiere.model.MDocType;
|
||||
import org.compiere.model.MOrder;
|
||||
import org.compiere.model.MOrderLine;
|
||||
import org.compiere.model.MPeriod;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MProductPO;
|
||||
import org.compiere.model.MStorage;
|
||||
import org.compiere.model.MTransaction;
|
||||
import org.compiere.model.ModelValidationEngine;
|
||||
|
@ -43,8 +46,10 @@ import org.compiere.model.Query;
|
|||
import org.compiere.print.ReportEngine;
|
||||
import org.compiere.process.DocAction;
|
||||
import org.compiere.process.DocumentEngine;
|
||||
import org.compiere.util.CCache;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.compiere.util.TimeUtil;
|
||||
|
||||
/**
|
||||
|
@ -125,6 +130,15 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
private String m_processMsg = null;
|
||||
/** Just Prepared Flag */
|
||||
private boolean m_justPrepared = false;
|
||||
|
||||
/** Manufacturing Order **/
|
||||
private MPPOrder m_pporder = null;
|
||||
|
||||
/** Manufacturing Order Activity **/
|
||||
private MPPOrderNode m_orderNode = null;
|
||||
|
||||
/** Manufacturing Order BOM Line **/
|
||||
private MPPOrderBOMLine m_bomLine = null;
|
||||
|
||||
// @Override
|
||||
public boolean unlockIt()
|
||||
|
@ -155,6 +169,57 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
// Convert/Check DocType
|
||||
setC_DocType_ID(getC_DocTypeTarget_ID());
|
||||
|
||||
//
|
||||
// Operation Activity
|
||||
if(isCostCollectorType(COSTCOLLECTORTYPE_ActivityControlReport))
|
||||
{
|
||||
MPPOrderNode activity = getPPOrderNode();
|
||||
if(activity.getDocStatus().equals(MPPOrderNode.DOCACTION_Complete))
|
||||
{
|
||||
m_processMsg = "Activity was completed before";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
if (activity.isSubcontracting())
|
||||
{
|
||||
if(activity.getDocStatus().equals(MPPOrderNode.DOCSTATUS_InProgress) && getDocStatus().equals(MPPCostCollector.DOCSTATUS_InProgress))
|
||||
{
|
||||
return MPPOrderNode.DOCSTATUS_InProgress;
|
||||
}
|
||||
else if(activity.getDocStatus().equals(MPPOrderNode.DOCSTATUS_InProgress) && getDocStatus().equals(MPPCostCollector.DOCSTATUS_Drafted))
|
||||
{
|
||||
m_processMsg = "Activity was processed before";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
createPOrder(activity);
|
||||
}
|
||||
|
||||
activity.setDocStatus(DOCSTATUS_InProgress);
|
||||
activity.setQtyDelivered(activity.getQtyDelivered().add(getMovementQty()));
|
||||
activity.setQtyScrap(activity.getQtyScrap().add(getScrappedQty()));
|
||||
activity.setQtyReject(activity.getQtyReject().add(getQtyReject()));
|
||||
activity.setDurationReal(activity.getDurationReal()+getDurationReal().intValue());
|
||||
activity.setSetupTimeReal(activity.getSetupTimeReal()+getSetupTimeReal().intValue());
|
||||
activity.saveEx();
|
||||
|
||||
if (MPPOrderNode.isLastNode(getCtx(), getPP_Order_Node_ID(), get_TrxName()))
|
||||
{
|
||||
String whereClause ="AND PP_Order_ID=? AND PP_Order_Node_ID<>?"
|
||||
+" AND NOT EXISTS (SELECT 1 FROM PP_Cost_Collector cc "
|
||||
+" WHERE cc.PP_Order_ID=PP_Order_Node.PP_Order_ID AND cc.PP_Order_Node_ID=PP_Order_Node.PP_Order_Node_ID)";
|
||||
|
||||
List<MPPOrderNode> nodes = new Query(getCtx(), MPPOrderNode.Table_Name, whereClause, this.get_TrxName())
|
||||
.setParameters(new Object[]{getPP_Order_ID(),getPP_Order_Node_ID()})
|
||||
.setOnlyActiveRecords(true)
|
||||
.list();
|
||||
for (MPPOrderNode node : nodes)
|
||||
{
|
||||
createNewNode(node);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
m_justPrepared = true;
|
||||
if (!DOCACTION_Complete.equals(getDocAction()))
|
||||
{
|
||||
|
@ -226,7 +291,7 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
// Only for Production Issue records
|
||||
if (isIssue())
|
||||
{
|
||||
checkMaterialPolicy(getPP_Order_BOMLine(), getMovementQty());
|
||||
checkMaterialPolicy(getPPOrderBOMLine(), getMovementQty());
|
||||
}
|
||||
|
||||
log.fine("Material Transaction");
|
||||
|
@ -293,10 +358,11 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
}
|
||||
} // stock movement
|
||||
|
||||
|
||||
if (isIssue())
|
||||
{
|
||||
// Update PP Order Line
|
||||
MPPOrderBOMLine obomline = getPP_Order_BOMLine();
|
||||
MPPOrderBOMLine obomline = getPPOrderBOMLine();
|
||||
if (obomline != null)
|
||||
{
|
||||
obomline.setQtyDelivered(obomline.getQtyDelivered().add(getMovementQty()));
|
||||
|
@ -313,7 +379,7 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
else if (isReceipt())
|
||||
{
|
||||
// Update PP Order
|
||||
MPPOrder order = getPP_Order();
|
||||
MPPOrder order = getPPOrder();
|
||||
order.setQtyDelivered(order.getQtyDelivered().add(getMovementQty()));
|
||||
order.setQtyScrap(order.getQtyScrap().add(getScrappedQty()));
|
||||
order.setQtyReject(order.getQtyReject().add(getQtyReject()));
|
||||
|
@ -324,60 +390,60 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
log.fine("Order -> Delivered=" + order.getQtyDelivered());
|
||||
}
|
||||
}
|
||||
//
|
||||
// Operation Activity
|
||||
else // isCostCollectorType(COSTCOLLECTORTYPE_ActivityControlReport)
|
||||
else if(isCostCollectorType(COSTCOLLECTORTYPE_ActivityControlReport))
|
||||
{
|
||||
MPPOrderNode onodeact = getPP_Order_Node();
|
||||
onodeact.setDocStatus(DOCSTATUS_Completed);
|
||||
onodeact.setQtyDelivered(onodeact.getQtyDelivered().add(getMovementQty()));
|
||||
onodeact.setQtyScrap(onodeact.getQtyScrap().add(getScrappedQty()));
|
||||
onodeact.setQtyReject(onodeact.getQtyReject().add(getQtyReject()));
|
||||
onodeact.setDurationReal(onodeact.getDurationReal()+getDurationReal().intValue());
|
||||
onodeact.setSetupTimeReal(onodeact.getSetupTimeReal()+getSetupTimeReal().intValue());
|
||||
onodeact.saveEx();
|
||||
|
||||
if (MPPOrderNode.isLastNode(getCtx(), getPP_Order_Node_ID(), get_TrxName()))
|
||||
MPPOrderNode activity = getPPOrderNode();
|
||||
if(activity.getDocStatus().equals(MPPOrderNode.DOCSTATUS_Completed))
|
||||
{
|
||||
PreparedStatement pstmt = null;
|
||||
ResultSet rs = null;
|
||||
try
|
||||
{
|
||||
String sql = "SELECT DocStatus,PP_Order_Node_ID,DurationRequiered FROM PP_Order_Node n"
|
||||
+ " WHERE IsActive='Y' AND PP_Order_ID=? AND PP_Order_Node_ID<>?"
|
||||
+" AND NOT EXISTS (SELECT 1 FROM PP_Cost_Collector cc "
|
||||
+" WHERE cc.PP_Order_ID=n.PP_Order_ID AND cc.PP_Order_Node_ID=n.PP_Order_Node_ID)";
|
||||
|
||||
pstmt = DB.prepareStatement(sql, get_TrxName());
|
||||
pstmt.setInt(1, getPP_Order_ID());
|
||||
pstmt.setInt(2, getPP_Order_Node_ID());
|
||||
rs = pstmt.executeQuery();
|
||||
while (rs.next())
|
||||
{
|
||||
createNewNode(rs.getInt(2), rs.getBigDecimal(3));
|
||||
}
|
||||
}
|
||||
catch (SQLException e)
|
||||
{
|
||||
throw new DBException(e);
|
||||
}
|
||||
finally
|
||||
{
|
||||
DB.close(rs, pstmt);
|
||||
rs = null; pstmt = null;
|
||||
}
|
||||
m_processMsg = "Activity was completed before";
|
||||
return DocAction.STATUS_Invalid;
|
||||
}
|
||||
|
||||
|
||||
if (onodeact.isSubcontracting())
|
||||
{
|
||||
createPOrder();
|
||||
if(isSubcontracting())
|
||||
{
|
||||
String whereClause = "PP_Cost_Collector_ID =?";
|
||||
Collection<MOrderLine> olines = new Query(getCtx(), MOrderLine.Table_Name, whereClause, get_TrxName())
|
||||
.setParameters(new Object[]{this.getPP_Cost_Collector_ID()}).list();
|
||||
String DocStatus = MPPOrderNode.DOCSTATUS_Completed;
|
||||
StringBuffer msg = new StringBuffer("The quantity do not is complete for next Purchase Order :");
|
||||
for (MOrderLine oline: olines)
|
||||
{
|
||||
if(oline.getQtyDelivered().compareTo(oline.getQtyOrdered()) < 0)
|
||||
DocStatus = MPPOrderNode.DOCSTATUS_InProgress;
|
||||
|
||||
msg.append(oline.getParent().getDocumentNo()).append(",");
|
||||
}
|
||||
|
||||
if(DocStatus.equals(MPPOrderNode.DOCSTATUS_InProgress))
|
||||
{
|
||||
m_processMsg = msg.toString();
|
||||
return DocStatus;
|
||||
}
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
setDocStatus(DOCSTATUS_Completed);
|
||||
activity.setDocStatus(DOCSTATUS_Completed);
|
||||
activity.saveEx();
|
||||
|
||||
setDocAction(DOCACTION_Complete);
|
||||
setDocStatus(DOCSTATUS_InProgress);
|
||||
return DOCSTATUS_InProgress;
|
||||
}
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
if(activity.getQtyDelivered().compareTo(activity.getQtyRequiered()) >= 0)
|
||||
{
|
||||
activity.setDocStatus(DOCSTATUS_Completed);
|
||||
activity.saveEx();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// for all lines
|
||||
setProcessed(true);
|
||||
setDocAction(DOCACTION_Close);
|
||||
setDocStatus(DOCSTATUS_Completed); //fjv e-evolution set DocStatus
|
||||
setDocStatus(DOCSTATUS_Completed);
|
||||
|
||||
return DocAction.STATUS_Completed;
|
||||
} // completeIt
|
||||
|
@ -525,12 +591,12 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
return "" + get_ID();
|
||||
}
|
||||
|
||||
private void createNewNode(int PP_Order_Node_ID, BigDecimal duration)
|
||||
private void createNewNode(MPPOrderNode node)
|
||||
{
|
||||
String whereClause = COLUMNNAME_PP_Order_ID+"=? AND "+COLUMNNAME_PP_Order_Node_ID+"=?";
|
||||
boolean exists = new Query(getCtx(), Table_Name, whereClause, get_TrxName())
|
||||
.setOnlyActiveRecords(true)
|
||||
.setParameters(new Object[]{getPP_Order_ID(), PP_Order_Node_ID})
|
||||
.setParameters(new Object[]{getPP_Order_ID(), node.getPP_Order_Node_ID()})
|
||||
.match();
|
||||
if (!exists)
|
||||
{
|
||||
|
@ -550,10 +616,8 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
costnew.setMovementQty(getMovementQty());
|
||||
//costnew.setDurationUnit(getDurationUnit());
|
||||
costnew.setCostCollectorType(getCostCollectorType());
|
||||
//
|
||||
costnew.setPP_Order_Node_ID(PP_Order_Node_ID);
|
||||
costnew.setDurationReal(duration);
|
||||
//
|
||||
costnew.setPP_Order_Node_ID(node.getPP_Order_Node_ID());
|
||||
costnew.setDurationReal(new BigDecimal(node.getDuration()));
|
||||
costnew.saveEx();
|
||||
// costnew.completeIt();
|
||||
}
|
||||
|
@ -567,10 +631,10 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
@Override
|
||||
protected boolean beforeSave(boolean newRecord)
|
||||
{
|
||||
if (newRecord)
|
||||
/*if (newRecord)
|
||||
{
|
||||
setDocStatus(DOCSTATUS_InProgress);
|
||||
}
|
||||
}*/
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -685,7 +749,7 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
} // outgoing Trx
|
||||
} // checkMaterialPolicy
|
||||
|
||||
public MPPOrderNode getPP_Order_Node()
|
||||
public MPPOrderNode getPPOrderNode()
|
||||
{
|
||||
int node_id = getPP_Order_Node_ID();
|
||||
if (node_id <= 0)
|
||||
|
@ -701,9 +765,9 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
return m_orderNode;
|
||||
}
|
||||
|
||||
private MPPOrderNode m_orderNode = null;
|
||||
|
||||
public MPPOrderBOMLine getPP_Order_BOMLine()
|
||||
|
||||
public MPPOrderBOMLine getPPOrderBOMLine()
|
||||
{
|
||||
int id = getPP_Order_BOMLine_ID();
|
||||
if (id <= 0)
|
||||
|
@ -718,9 +782,9 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
m_bomLine.set_TrxName(get_TrxName());
|
||||
return m_bomLine;
|
||||
}
|
||||
private MPPOrderBOMLine m_bomLine = null;
|
||||
|
||||
|
||||
public MPPOrder getPP_Order()
|
||||
public MPPOrder getPPOrder()
|
||||
{
|
||||
int id = getPP_Order_ID();
|
||||
if (id <= 0)
|
||||
|
@ -735,59 +799,108 @@ public class MPPCostCollector extends X_PP_Cost_Collector implements DocAction
|
|||
m_pporder.set_TrxName(get_TrxName());
|
||||
return m_pporder;
|
||||
}
|
||||
private MPPOrder m_pporder = null;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Create Purchase Order (in case of Subcontracting)
|
||||
*/
|
||||
private void createPOrder()
|
||||
private void createPOrder(MPPOrderNode activity)
|
||||
{
|
||||
// create purchase order on complete
|
||||
BigDecimal m_MovementQty = getMovementQty();
|
||||
|
||||
// if(isSubcontracting())
|
||||
|
||||
int M_Product_ID = DB.getSQLValue(get_TrxName(),
|
||||
"SELECT M_Product_ID FROM PP_Order_Node WHERE IsActive='Y' AND PP_Order_Node_ID=?",
|
||||
getPP_Order_Node_ID());
|
||||
if (M_Product_ID <= 0)
|
||||
{
|
||||
throw new AdempiereException("There is no service associated to this subcontract");
|
||||
}
|
||||
// create purchase order on complete
|
||||
String whereClause = "PP_Order_ID=? AND PP_Order_Node_ID=? AND IsSubcontracting=?";
|
||||
Collection<MPPOrderNodeProduct> subctracts = new Query(getCtx(),MPPOrderNodeProduct.Table_Name,whereClause, get_TrxName())
|
||||
.setParameters(new Object[]{getPP_Order_ID(), activity.getPP_Order_Node_ID(),"Y"})
|
||||
.setOnlyActiveRecords(true)
|
||||
.list();
|
||||
|
||||
BigDecimal DeliveryTime = DB.getSQLValueBD(get_TrxName(),
|
||||
"SELECT DeliveryTime_Promised FROM PP_Product_Planning WHERE IsActive='Y' AND M_Product_ID=?",
|
||||
M_Product_ID);
|
||||
int C_BPartner_ID = -1 ;
|
||||
CCache<Integer,MOrder> orders = new CCache<Integer,MOrder>(MOrder.Table_Name, 5);
|
||||
|
||||
int C_BPartner_ID = DB.getSQLValue(get_TrxName(),
|
||||
"SELECT C_BPartner_ID FROM M_Product_PO WHERE IsActive='Y' AND M_Product_ID=? ",
|
||||
M_Product_ID);;
|
||||
if (C_BPartner_ID <= 0)
|
||||
|
||||
for (MPPOrderNodeProduct subctract: subctracts )
|
||||
{
|
||||
throw new AdempiereException("There is no vendor associated with this subcontract");
|
||||
MProduct product = MProduct.get(getCtx(), subctract.getM_Product_ID());
|
||||
MProductPO m_product_po = null;
|
||||
if(product.isPurchased() && product.getProductType().equals(MProduct.PRODUCTTYPE_Service))
|
||||
{
|
||||
C_BPartner_ID = activity.getC_BPartner_ID();
|
||||
|
||||
MProductPO[] ppos = MProductPO.getOfProduct(getCtx(), product.getM_Product_ID(), get_TrxName());
|
||||
for (MProductPO ppo : ppos)
|
||||
{
|
||||
if(C_BPartner_ID == ppo.getC_BPartner_ID())
|
||||
{
|
||||
C_BPartner_ID = ppo.getC_BPartner_ID();
|
||||
m_product_po = ppo;
|
||||
break;
|
||||
}
|
||||
if (ppo.isCurrentVendor() && ppo.getC_BPartner_ID() != 0)
|
||||
{
|
||||
C_BPartner_ID = ppo.getC_BPartner_ID();
|
||||
m_product_po = ppo;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(C_BPartner_ID == -1)
|
||||
throw new AdempiereException(Msg.getMsg(getCtx(), "no.vendor.was.found.for")+" "
|
||||
+Msg.getMsg(getCtx(),"M_Product_ID") + ":" + product.getName());
|
||||
|
||||
Timestamp today = new Timestamp(System.currentTimeMillis());
|
||||
Timestamp datePromised = TimeUtil.addDays(today, m_product_po.getDeliveryTime_Promised());
|
||||
|
||||
MOrder order = orders.get(C_BPartner_ID);
|
||||
if(order == null)
|
||||
{
|
||||
order = new MOrder(getCtx(), 0, get_TrxName());
|
||||
MBPartner vendor = new MBPartner (getCtx(), C_BPartner_ID, get_TrxName());
|
||||
order.setBPartner(vendor);
|
||||
order.setIsSOTrx(false);
|
||||
order.setC_DocTypeTarget_ID();
|
||||
order.setDatePromised(datePromised);
|
||||
order.setDescription(getPPOrder().getDocumentNo());
|
||||
order.setDocStatus(MOrder.DOCSTATUS_Drafted);
|
||||
order.setDocAction(MOrder.DOCACTION_Complete);
|
||||
order.setAD_User_ID(getAD_User_ID());
|
||||
//order.setSalesRep_ID(getAD_User_ID());
|
||||
order.saveEx();
|
||||
setDescription(getDescription() == null ? order.getDocumentNo() :
|
||||
getDescription().concat(Msg.translate(getCtx(), "C_Order_ID")+":"+order.getDocumentNo()));
|
||||
orders.put(C_BPartner_ID, order);
|
||||
}
|
||||
|
||||
BigDecimal QtyOrdered = Env.ZERO;
|
||||
// Check Order Min
|
||||
if(subctract.getQty().signum() > 0 && m_product_po.getOrder_Min().signum() > 0)
|
||||
{
|
||||
QtyOrdered = QtyOrdered.max(m_product_po.getOrder_Min());
|
||||
}
|
||||
|
||||
// Check Order Pack
|
||||
if (m_product_po.getOrder_Pack().signum() > 0 && QtyOrdered.signum() > 0)
|
||||
{
|
||||
QtyOrdered = m_product_po.getOrder_Pack().multiply(QtyOrdered.divide(m_product_po.getOrder_Pack(), 0 , BigDecimal.ROUND_UP));
|
||||
}
|
||||
|
||||
MOrderLine oline = new MOrderLine(order);
|
||||
oline.setM_Product_ID(product.getM_Product_ID());
|
||||
oline.setDescription(activity.getDescription());
|
||||
oline.setQty(QtyOrdered);
|
||||
//line.setPrice(m_product_po.getPricePO());
|
||||
//oline.setPriceList(m_product_po.getPriceList());
|
||||
oline.setPP_Cost_Collector_ID(get_ID());
|
||||
oline.setDatePromised(datePromised);
|
||||
oline.saveEx();
|
||||
setProcessed(true);
|
||||
}
|
||||
}
|
||||
|
||||
Timestamp today = new Timestamp(System.currentTimeMillis());
|
||||
Timestamp datePromised = TimeUtil.addDays(today, DeliveryTime.intValue());
|
||||
|
||||
MOrder order = new MOrder(getCtx(), 0, get_TrxName());
|
||||
order.setC_BPartner_ID(C_BPartner_ID);
|
||||
order.setIsSOTrx(false);
|
||||
order.setC_DocTypeTarget_ID();
|
||||
order.setDatePromised(datePromised);
|
||||
order.setDescription(getPP_Order().getDocumentNo());
|
||||
order.saveEx();
|
||||
|
||||
MOrderLine oline = new MOrderLine(order);
|
||||
oline.setM_Product_ID(M_Product_ID);
|
||||
oline.setQty(m_MovementQty);
|
||||
oline.setDatePromised(datePromised);
|
||||
oline.saveEx();
|
||||
|
||||
setDescription(order.getDocumentNo());
|
||||
|
||||
}
|
||||
|
||||
|
||||
public boolean isIssue()
|
||||
{
|
||||
return isCostCollectorType(COSTCOLLECTORTYPE_ComponentIssue);
|
||||
|
|
|
@ -928,6 +928,26 @@ public class MPPOrder extends X_PP_Order implements DocAction
|
|||
nodenext.setAD_Org_ID(getAD_Org_ID());
|
||||
nodenext.saveEx();
|
||||
}// for NodeNext
|
||||
|
||||
for (MPPWFNodeProduct wfnp : MPPWFNodeProduct.get(getCtx(), AD_WF_Node.get_ID() , get_TrxName()))
|
||||
{
|
||||
MPPOrderNodeProduct nodeorderproduct = new MPPOrderNodeProduct(wfnp);
|
||||
nodeorderproduct.setAD_Org_ID(getAD_Org_ID());
|
||||
nodeorderproduct.setPP_Order_ID(getPP_Order_ID());
|
||||
nodeorderproduct.setPP_Order_Workflow_ID(PP_Order_Node.getPP_Order_Workflow_ID());
|
||||
nodeorderproduct.setPP_Order_Node_ID(PP_Order_Node.getPP_Order_Node_ID());
|
||||
nodeorderproduct.saveEx();
|
||||
}// for NodeNext
|
||||
|
||||
for (MPPWFNodeAsset wfna : MPPWFNodeAsset.get(getCtx(), AD_WF_Node.get_ID() , get_TrxName()))
|
||||
{
|
||||
MPPOrderNodeAsset nodeorderasset = new MPPOrderNodeAsset(wfna);
|
||||
nodeorderasset.setAD_Org_ID(getAD_Org_ID());
|
||||
nodeorderasset.setPP_Order_ID(getPP_Order_ID());
|
||||
nodeorderasset.setPP_Order_Workflow_ID(PP_Order_Node.getPP_Order_Workflow_ID());
|
||||
nodeorderasset.setPP_Order_Node_ID(PP_Order_Node.getPP_Order_Node_ID());
|
||||
nodeorderasset.saveEx();
|
||||
}
|
||||
}// for node
|
||||
|
||||
}
|
||||
|
|
|
@ -81,29 +81,29 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine
|
|||
{
|
||||
this(bomLine.getCtx(), 0, trxName);
|
||||
|
||||
this.setPP_Order_BOM_ID(PP_Order_BOM_ID);
|
||||
this.setPP_Order_ID(PP_Order_ID);
|
||||
this.setM_Warehouse_ID(M_Warehouse_ID);
|
||||
setPP_Order_BOM_ID(PP_Order_BOM_ID);
|
||||
setPP_Order_ID(PP_Order_ID);
|
||||
setM_Warehouse_ID(M_Warehouse_ID);
|
||||
//
|
||||
this.setM_ChangeNotice_ID(bomLine.getM_ChangeNotice_ID());
|
||||
this.setDescription(bomLine.getDescription());
|
||||
this.setHelp(bomLine.getHelp());
|
||||
this.setAssay(bomLine.getAssay());
|
||||
this.setQtyBatch(bomLine.getQtyBatch());
|
||||
this.setQtyBOM(bomLine.getQtyBOM());
|
||||
this.setIsQtyPercentage(bomLine.isQtyPercentage());
|
||||
this.setComponentType(bomLine.getComponentType());
|
||||
this.setC_UOM_ID(bomLine.getC_UOM_ID());
|
||||
this.setForecast(bomLine.getForecast());
|
||||
this.setIsCritical(bomLine.isCritical());
|
||||
this.setIssueMethod(bomLine.getIssueMethod());
|
||||
this.setLeadTimeOffset(bomLine.getLeadTimeOffset());
|
||||
this.setM_AttributeSetInstance_ID(bomLine.getM_AttributeSetInstance_ID());
|
||||
this.setM_Product_ID(bomLine.getM_Product_ID());
|
||||
this.setScrap(bomLine.getScrap());
|
||||
this.setValidFrom(bomLine.getValidFrom());
|
||||
this.setValidTo(bomLine.getValidTo());
|
||||
this.setBackflushGroup(bomLine.getBackflushGroup());
|
||||
setM_ChangeNotice_ID(bomLine.getM_ChangeNotice_ID());
|
||||
setDescription(bomLine.getDescription());
|
||||
setHelp(bomLine.getHelp());
|
||||
setAssay(bomLine.getAssay());
|
||||
setQtyBatch(bomLine.getQtyBatch());
|
||||
setQtyBOM(bomLine.getQtyBOM());
|
||||
setIsQtyPercentage(bomLine.isQtyPercentage());
|
||||
setComponentType(bomLine.getComponentType());
|
||||
setC_UOM_ID(bomLine.getC_UOM_ID());
|
||||
setForecast(bomLine.getForecast());
|
||||
setIsCritical(bomLine.isCritical());
|
||||
setIssueMethod(bomLine.getIssueMethod());
|
||||
setLeadTimeOffset(bomLine.getLeadTimeOffset());
|
||||
setM_AttributeSetInstance_ID(bomLine.getM_AttributeSetInstance_ID());
|
||||
setM_Product_ID(bomLine.getM_Product_ID());
|
||||
setScrap(bomLine.getScrap());
|
||||
setValidFrom(bomLine.getValidFrom());
|
||||
setValidTo(bomLine.getValidTo());
|
||||
setBackflushGroup(bomLine.getBackflushGroup());
|
||||
}
|
||||
|
||||
private MPPOrder m_parent = null;
|
||||
|
@ -190,53 +190,53 @@ public class MPPOrderBOMLine extends X_PP_Order_BOMLine
|
|||
public void setQtyOrdered(BigDecimal QtyOrdered)
|
||||
{
|
||||
// Set Qty Required
|
||||
if (this.isQtyPercentage())
|
||||
if (isQtyPercentage())
|
||||
{
|
||||
BigDecimal qty = this.getQtyBatch().multiply(QtyOrdered);
|
||||
if (this.getComponentType().equals(COMPONENTTYPE_Component)
|
||||
|| this.getComponentType().equals(COMPONENTTYPE_Phantom))
|
||||
BigDecimal qty = getQtyBatch().multiply(QtyOrdered);
|
||||
if (getComponentType().equals(COMPONENTTYPE_Component)
|
||||
|| getComponentType().equals(COMPONENTTYPE_Phantom))
|
||||
{
|
||||
this.setQtyRequiered(qty.divide(Env.ONEHUNDRED, 8, BigDecimal.ROUND_UP));
|
||||
setQtyRequiered(qty.divide(Env.ONEHUNDRED, 8, BigDecimal.ROUND_UP));
|
||||
}
|
||||
else if (this.getComponentType().equals(COMPONENTTYPE_Packing))
|
||||
else if (getComponentType().equals(COMPONENTTYPE_Packing))
|
||||
{
|
||||
this.setQtyRequiered(qty.divide(Env.ONEHUNDRED, 8, BigDecimal.ROUND_UP));
|
||||
setQtyRequiered(qty.divide(Env.ONEHUNDRED, 8, BigDecimal.ROUND_UP));
|
||||
}
|
||||
else if (this.getComponentType().equals(COMPONENTTYPE_Tools))
|
||||
else if (getComponentType().equals(COMPONENTTYPE_Tools))
|
||||
{
|
||||
this.setQtyRequiered(this.getQtyBOM());
|
||||
setQtyRequiered(getQtyBOM());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType());
|
||||
throw new AdempiereException("@NotSupported@ @ComponentType@ "+getComponentType());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (this.getComponentType().equals(COMPONENTTYPE_Component)
|
||||
|| this.getComponentType().equals(COMPONENTTYPE_Phantom))
|
||||
if (getComponentType().equals(COMPONENTTYPE_Component)
|
||||
|| getComponentType().equals(COMPONENTTYPE_Phantom))
|
||||
{
|
||||
this.setQtyRequiered(this.getQtyBOM().multiply(QtyOrdered));
|
||||
setQtyRequiered(getQtyBOM().multiply(QtyOrdered));
|
||||
}
|
||||
else if (this.getComponentType().equals(COMPONENTTYPE_Packing))
|
||||
else if (getComponentType().equals(COMPONENTTYPE_Packing))
|
||||
{
|
||||
this.setQtyRequiered(this.getQtyBOM().multiply(QtyOrdered));
|
||||
setQtyRequiered(getQtyBOM().multiply(QtyOrdered));
|
||||
}
|
||||
else if (this.getComponentType().equals(COMPONENTTYPE_Tools))
|
||||
else if (getComponentType().equals(COMPONENTTYPE_Tools))
|
||||
{
|
||||
this.setQtyRequiered(this.getQtyBOM());
|
||||
setQtyRequiered(getQtyBOM());
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AdempiereException("@NotSupported@ @ComponentType@ "+this.getComponentType());
|
||||
throw new AdempiereException("@NotSupported@ @ComponentType@ "+getComponentType());
|
||||
}
|
||||
}
|
||||
|
||||
// Set Scrap of Component
|
||||
BigDecimal Scrap = this.getScrap();
|
||||
BigDecimal Scrap = getScrap();
|
||||
if (Scrap.signum() != 0) {
|
||||
Scrap = Scrap.divide(Env.ONEHUNDRED, 8, BigDecimal.ROUND_UP);
|
||||
this.setQtyRequiered(this.getQtyRequiered().divide(Env.ONE.subtract(Scrap), 8, BigDecimal.ROUND_HALF_UP));
|
||||
setQtyRequiered(getQtyRequiered().divide(Env.ONE.subtract(Scrap), 8, BigDecimal.ROUND_HALF_UP));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,6 +90,7 @@ public class MPPOrderNode extends X_PP_Order_Node
|
|||
setWaitingTime (0);
|
||||
setXPosition (0);
|
||||
setYPosition (0);
|
||||
setDocStatus(MPPOrderNode.DOCSTATUS_Drafted);
|
||||
}
|
||||
// Save to Cache
|
||||
if (get_ID() != 0)
|
||||
|
@ -131,6 +132,8 @@ public class MPPOrderNode extends X_PP_Order_Node
|
|||
setAD_WF_Node_ID(wfNode.getAD_WF_Node_ID());
|
||||
setAD_WF_Responsible_ID(wfNode.getAD_WF_Responsible_ID());
|
||||
setAD_Workflow_ID(wfNode.getAD_Workflow_ID());
|
||||
this.setIsSubcontracting(wfNode.isSubcontracting());
|
||||
this.setC_BPartner_ID(wfNode.getC_BPartner_ID());
|
||||
setCost(wfNode.getCost());
|
||||
setDuration(wfNode.getDuration());
|
||||
setEntityType(wfNode.getEntityType());
|
||||
|
@ -166,6 +169,7 @@ public class MPPOrderNode extends X_PP_Order_Node
|
|||
setValidTo(wfNode.getValidTo());
|
||||
//
|
||||
setQtyOrdered(qtyOrdered);
|
||||
setDocStatus(MPPOrderNode.DOCSTATUS_Drafted);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -196,9 +200,10 @@ public class MPPOrderNode extends X_PP_Order_Node
|
|||
private void loadNext()
|
||||
{
|
||||
boolean splitAnd = SPLITELEMENT_AND.equals(getSplitElement());
|
||||
String whereClause = "PP_Order_Node_ID=? AND IsActive='Y'";
|
||||
String whereClause = "PP_Order_Node_ID=? ";
|
||||
m_next = new Query(getCtx(), MPPOrderNodeNext.Table_Name, whereClause, get_TrxName())
|
||||
.setParameters(new Object[]{get_ID()})
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy(MPPOrderNodeNext.COLUMNNAME_SeqNo)
|
||||
.list();
|
||||
for (MPPOrderNodeNext next : m_next) {
|
||||
|
|
|
@ -0,0 +1,91 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
|
||||
/**
|
||||
* Forcast Line Model
|
||||
*
|
||||
* @author Victor Perez www.e-evolution.com
|
||||
* @version $Id: MPPWFNodeAsset.java,v 1.11 2005/05/17 05:29:52 vpj-cd vpj-cd $
|
||||
*/
|
||||
public class MPPOrderNodeAsset extends X_PP_Order_Node_Asset
|
||||
{
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param M_ForecastLine_ID id
|
||||
*/
|
||||
public MPPOrderNodeAsset (Properties ctx, int PP_Order_Node_Asset_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_Order_Node_Asset_ID, trxName);
|
||||
if (PP_Order_Node_Asset_ID == 0)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new MPPOrderNodeAsset based in MPPWFNodeProduct
|
||||
* @param np
|
||||
*/
|
||||
public MPPOrderNodeAsset (MPPWFNodeAsset na)
|
||||
{
|
||||
this(na.getCtx(), 0, na.get_TrxName());
|
||||
//setSeqNo(na.getSeqNo());
|
||||
setIsActive(na.isActive());
|
||||
setA_Asset_ID(na.getA_Asset_ID());
|
||||
}
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
*/
|
||||
public MPPOrderNodeAsset (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MPPWFNodeAsset
|
||||
|
||||
/** Lines */
|
||||
private static Collection<MPPOrderNodeAsset> m_lines = new ArrayList<MPPOrderNodeAsset>();
|
||||
|
||||
/**
|
||||
* Get Lines
|
||||
* @return array of lines
|
||||
*/
|
||||
public Collection<MPPOrderNodeAsset> getNodeAsset()
|
||||
{
|
||||
if(!m_lines.isEmpty())
|
||||
return m_lines;
|
||||
|
||||
String whereClause = "PP_Order_Node_Asset_ID=? ";
|
||||
m_lines = new Query(getCtx(), MPPOrderNodeAsset.Table_Name, whereClause, get_TrxName())
|
||||
.setParameters(new Object[]{get_ID()})
|
||||
.setOnlyActiveRecords(true)
|
||||
//.setOrderBy(MPPOrderNodeAsset.COLUMNNAME_SeqNo)
|
||||
.list();
|
||||
return m_lines;
|
||||
} // getLines
|
||||
} // MPPWFNodeAsset
|
|
@ -0,0 +1,99 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
|
||||
/**
|
||||
* Forcast Line Model
|
||||
*
|
||||
* @author Victor Perez www.e-evolution.com
|
||||
* @version $Id: MPPWFNodeProduct.java,v 1.11 2005/05/17 05:29:52 vpj-cd vpj-cd $
|
||||
*/
|
||||
public class MPPOrderNodeProduct extends X_PP_Order_Node_Product
|
||||
{
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param M_ForecastLine_ID id
|
||||
*/
|
||||
public MPPOrderNodeProduct (Properties ctx, int PP_WF_Order_Product_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_WF_Order_Product_ID, trxName);
|
||||
if (PP_WF_Order_Product_ID == 0)
|
||||
{
|
||||
}
|
||||
|
||||
} // MQMSpecification
|
||||
|
||||
/**
|
||||
* Create a new MPPOrderNodeProduct based in MPPWFNodeProduct
|
||||
* @param np
|
||||
*/
|
||||
public MPPOrderNodeProduct (MPPWFNodeProduct np)
|
||||
{
|
||||
this(np.getCtx(), 0, np.get_TrxName());
|
||||
setSeqNo(np.getSeqNo());
|
||||
setIsActive(np.isActive());
|
||||
setM_Product_ID(np.getM_Product_ID());
|
||||
setQty(np.getQty());
|
||||
setIsSubcontracting(np.isSubcontracting());
|
||||
setYield(np.getYield());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
*/
|
||||
public MPPOrderNodeProduct (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MQMSpecification
|
||||
|
||||
/** Lines */
|
||||
private static Collection<MPPOrderNodeProduct> m_lines = new ArrayList<MPPOrderNodeProduct>();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @param AD_WF_Node_ID
|
||||
* @param trxName
|
||||
* @return
|
||||
*/
|
||||
public Collection<MPPOrderNodeProduct> getNodeProduct()
|
||||
{
|
||||
if(!m_lines.isEmpty())
|
||||
return m_lines;
|
||||
|
||||
String whereClause = "PP_Order_Node_Product_ID=? ";
|
||||
m_lines = new Query(getCtx(), MPPOrderNodeProduct.Table_Name, whereClause, get_TrxName())
|
||||
.setParameters(new Object[]{get_ID()})
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy(MPPOrderNodeProduct.COLUMNNAME_SeqNo)
|
||||
.list();
|
||||
return m_lines;
|
||||
} // getMPPOrderNodeProduct
|
||||
|
||||
} // MPPWFNodeProduct
|
|
@ -0,0 +1,84 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
|
||||
/**
|
||||
* Forcast Line Model
|
||||
*
|
||||
* @author Victor Perez www.e-evolution.com
|
||||
* @version $Id: MPPWFNodeAsset.java,v 1.11 2005/05/17 05:29:52 vpj-cd vpj-cd $
|
||||
*/
|
||||
public class MPPWFNodeAsset extends X_PP_WF_Node_Asset
|
||||
{
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param M_ForecastLine_ID id
|
||||
*/
|
||||
public MPPWFNodeAsset (Properties ctx, int PP_WF_Node_Asset_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_WF_Node_Asset_ID, trxName);
|
||||
if (PP_WF_Node_Asset_ID == 0)
|
||||
{
|
||||
}
|
||||
|
||||
} // MQMSpecification
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
*/
|
||||
public MPPWFNodeAsset (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MPPWFNodeAsset
|
||||
|
||||
|
||||
|
||||
/** Lines */
|
||||
private static Collection <MPPWFNodeAsset> m_lines = new ArrayList<MPPWFNodeAsset>();
|
||||
|
||||
/**
|
||||
*
|
||||
* @param ctx
|
||||
* @param AD_WF_Node_ID
|
||||
* @param trxName
|
||||
* @return
|
||||
*/
|
||||
public static Collection<MPPWFNodeAsset> get(Properties ctx, int AD_WF_Node_ID , String trxName)
|
||||
{
|
||||
if(!m_lines.isEmpty())
|
||||
return m_lines;
|
||||
|
||||
String whereClause = "AD_WF_Node_ID=? ";
|
||||
m_lines = new Query(ctx, MPPWFNodeAsset.Table_Name, whereClause, trxName)
|
||||
.setParameters(new Object[]{AD_WF_Node_ID})
|
||||
.setOnlyActiveRecords(true)
|
||||
//.setOrderBy(MPPOrderNodeAsset.COLUMNNAME_SeqNo)
|
||||
.list();
|
||||
return m_lines;
|
||||
} // getLines
|
||||
} // MPPWFNodeAsset
|
|
@ -0,0 +1,81 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY; without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program; if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* Copyright (C) 2003-2007 e-Evolution,SC. All Rights Reserved. *
|
||||
* Contributor(s): Victor Perez www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.*;
|
||||
import java.sql.*;
|
||||
import java.util.*;
|
||||
import java.util.logging.*;
|
||||
|
||||
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.*;
|
||||
import org.compiere.wf.MWFNode;
|
||||
|
||||
/**
|
||||
* Forcast Line Model
|
||||
*
|
||||
* @author Victor Perez www.e-evolution.com
|
||||
* @version $Id: MPPWFNodeProduct.java,v 1.11 2005/05/17 05:29:52 vpj-cd vpj-cd $
|
||||
*/
|
||||
public class MPPWFNodeProduct extends X_PP_WF_Node_Product
|
||||
{
|
||||
/**
|
||||
* Standard Constructor
|
||||
* @param ctx context
|
||||
* @param M_ForecastLine_ID id
|
||||
*/
|
||||
public MPPWFNodeProduct (Properties ctx, int PP_WF_Node_Product_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_WF_Node_Product_ID, trxName);
|
||||
if (PP_WF_Node_Product_ID == 0)
|
||||
{
|
||||
}
|
||||
|
||||
} // MQMSpecification
|
||||
|
||||
/**
|
||||
* Load Constructor
|
||||
* @param ctx context
|
||||
* @param rs result set
|
||||
*/
|
||||
public MPPWFNodeProduct (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super(ctx, rs, trxName);
|
||||
} // MQMSpecification
|
||||
|
||||
/** Lines */
|
||||
private static Collection <MPPWFNodeProduct> m_lines = new ArrayList<MPPWFNodeProduct>();
|
||||
|
||||
/**
|
||||
* Get Lines
|
||||
* @return array of lines
|
||||
*/
|
||||
public static Collection<MPPWFNodeProduct> get(Properties ctx, int AD_WF_Node_ID , String trxName)
|
||||
{
|
||||
if(!m_lines.isEmpty())
|
||||
return m_lines;
|
||||
|
||||
String whereClause = "AD_WF_Node_ID=?";
|
||||
m_lines = new Query(ctx, MPPWFNodeProduct.Table_Name, whereClause, trxName)
|
||||
.setParameters(new Object[]{AD_WF_Node_ID})
|
||||
.setOnlyActiveRecords(true)
|
||||
.setOrderBy(MPPWFNodeProduct.COLUMNNAME_SeqNo)
|
||||
.list();
|
||||
return m_lines;
|
||||
} // getMPPOrderNodeProduct
|
||||
|
||||
} // MPPWFNodeProduct
|
|
@ -46,6 +46,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
{
|
||||
setC_DocTypeTarget_ID (0);
|
||||
setC_DocType_ID (0);
|
||||
// 0
|
||||
setCostCollectorType (null);
|
||||
setDateAcct (new Timestamp( System.currentTimeMillis() ));
|
||||
// @#Date@
|
||||
setM_Locator_ID (0);
|
||||
|
@ -275,6 +277,45 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Order getC_Order() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Order.Table_Name);
|
||||
I_C_Order result = null;
|
||||
try {
|
||||
Constructor<?> constructor = null;
|
||||
constructor = clazz.getDeclaredConstructor(new Class[]{Properties.class, int.class, String.class});
|
||||
result = (I_C_Order)constructor.newInstance(new Object[] {getCtx(), new Integer(getC_Order_ID()), get_TrxName()});
|
||||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set Order.
|
||||
@param C_Order_ID
|
||||
Order
|
||||
*/
|
||||
public void setC_Order_ID (int C_Order_ID)
|
||||
{
|
||||
if (C_Order_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Order_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Order_ID, Integer.valueOf(C_Order_ID));
|
||||
}
|
||||
|
||||
/** Get Order.
|
||||
@return Order
|
||||
*/
|
||||
public int getC_Order_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Order_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_C_Project.Table_Name);
|
||||
|
@ -375,8 +416,8 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
*/
|
||||
public void setCostCollectorType (String CostCollectorType)
|
||||
{
|
||||
|
||||
if (CostCollectorType == null || CostCollectorType.equals("100") || CostCollectorType.equals("110") || CostCollectorType.equals("120") || CostCollectorType.equals("130") || CostCollectorType.equals("140") || CostCollectorType.equals("150") || CostCollectorType.equals("160")); else throw new IllegalArgumentException ("CostCollectorType Invalid value - " + CostCollectorType + " - Reference_ID=53287 - 100 - 110 - 120 - 130 - 140 - 150 - 160"); set_Value (COLUMNNAME_CostCollectorType, CostCollectorType);
|
||||
if (CostCollectorType == null) throw new IllegalArgumentException ("CostCollectorType is mandatory");
|
||||
if (CostCollectorType.equals("100") || CostCollectorType.equals("110") || CostCollectorType.equals("120") || CostCollectorType.equals("130") || CostCollectorType.equals("140") || CostCollectorType.equals("150") || CostCollectorType.equals("160")); else throw new IllegalArgumentException ("CostCollectorType Invalid value - " + CostCollectorType + " - Reference_ID=53287 - 100 - 110 - 120 - 130 - 140 - 150 - 160"); set_Value (COLUMNNAME_CostCollectorType, CostCollectorType);
|
||||
}
|
||||
|
||||
/** Get Cost Collector Type.
|
||||
|
@ -553,6 +594,27 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set Is Subcontracting.
|
||||
@param IsSubcontracting Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting)
|
||||
{
|
||||
set_ValueNoCheck (COLUMNNAME_IsSubcontracting, Boolean.valueOf(IsSubcontracting));
|
||||
}
|
||||
|
||||
/** Get Is Subcontracting.
|
||||
@return Is Subcontracting */
|
||||
public boolean isSubcontracting ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSubcontracting);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Attribute Set Instance.
|
||||
@param M_AttributeSetInstance_ID
|
||||
Product Attribute Set Instance
|
||||
|
@ -742,7 +804,7 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order_BOMLine getPP_Order_BOMLine() throws RuntimeException
|
||||
public org.eevolution.model.I_PP_Order_BOMLine getPPOrderBOMLine() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order_BOMLine.Table_Name);
|
||||
org.eevolution.model.I_PP_Order_BOMLine result = null;
|
||||
|
@ -778,7 +840,7 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException
|
||||
public org.eevolution.model.I_PP_Order getPPOrder() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name);
|
||||
org.eevolution.model.I_PP_Order result = null;
|
||||
|
@ -813,7 +875,7 @@ public class X_PP_Cost_Collector extends PO implements I_PP_Cost_Collector, I_Pe
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException
|
||||
public org.eevolution.model.I_PP_Order_Node getPPOrderNode() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name);
|
||||
org.eevolution.model.I_PP_Order_Node result = null;
|
||||
|
|
|
@ -18,10 +18,12 @@
|
|||
package org.eevolution.model;
|
||||
|
||||
import java.lang.reflect.Constructor;
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/** Generated Model for PP_Order_Node_Product
|
||||
* @author Adempiere (generated)
|
||||
|
@ -76,7 +78,28 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws Exception
|
||||
/** Set Is Subcontracting.
|
||||
@param IsSubcontracting Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsSubcontracting, Boolean.valueOf(IsSubcontracting));
|
||||
}
|
||||
|
||||
/** Get Is Subcontracting.
|
||||
@return Is Subcontracting */
|
||||
public boolean isSubcontracting ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSubcontracting);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Product.Table_Name);
|
||||
I_M_Product result = null;
|
||||
|
@ -87,7 +110,7 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -114,7 +137,7 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws Exception
|
||||
public org.eevolution.model.I_PP_Order getPP_Order() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order.Table_Name);
|
||||
org.eevolution.model.I_PP_Order result = null;
|
||||
|
@ -125,13 +148,13 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set PP_Order_ID.
|
||||
@param PP_Order_ID PP_Order_ID */
|
||||
/** Set Manufacturing Order.
|
||||
@param PP_Order_ID Manufacturing Order */
|
||||
public void setPP_Order_ID (int PP_Order_ID)
|
||||
{
|
||||
if (PP_Order_ID < 1)
|
||||
|
@ -139,8 +162,8 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
set_ValueNoCheck (COLUMNNAME_PP_Order_ID, Integer.valueOf(PP_Order_ID));
|
||||
}
|
||||
|
||||
/** Get PP_Order_ID.
|
||||
@return PP_Order_ID */
|
||||
/** Get Manufacturing Order.
|
||||
@return Manufacturing Order */
|
||||
public int getPP_Order_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_ID);
|
||||
|
@ -149,7 +172,7 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws Exception
|
||||
public org.eevolution.model.I_PP_Order_Node getPP_Order_Node() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Node.Table_Name);
|
||||
org.eevolution.model.I_PP_Order_Node result = null;
|
||||
|
@ -160,7 +183,7 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -184,8 +207,8 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set PP_Order_Node_Product_ID.
|
||||
@param PP_Order_Node_Product_ID PP_Order_Node_Product_ID */
|
||||
/** Set Manufacturing Order Activity Product.
|
||||
@param PP_Order_Node_Product_ID Manufacturing Order Activity Product */
|
||||
public void setPP_Order_Node_Product_ID (int PP_Order_Node_Product_ID)
|
||||
{
|
||||
if (PP_Order_Node_Product_ID < 1)
|
||||
|
@ -193,8 +216,8 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
set_ValueNoCheck (COLUMNNAME_PP_Order_Node_Product_ID, Integer.valueOf(PP_Order_Node_Product_ID));
|
||||
}
|
||||
|
||||
/** Get PP_Order_Node_Product_ID.
|
||||
@return PP_Order_Node_Product_ID */
|
||||
/** Get Manufacturing Order Activity Product.
|
||||
@return Manufacturing Order Activity Product */
|
||||
public int getPP_Order_Node_Product_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Node_Product_ID);
|
||||
|
@ -203,7 +226,7 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws Exception
|
||||
public org.eevolution.model.I_PP_Order_Workflow getPP_Order_Workflow() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(org.eevolution.model.I_PP_Order_Workflow.Table_Name);
|
||||
org.eevolution.model.I_PP_Order_Workflow result = null;
|
||||
|
@ -214,13 +237,13 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/** Set PP_Order_Workflow_ID.
|
||||
@param PP_Order_Workflow_ID PP_Order_Workflow_ID */
|
||||
/** Set Manufacturing Order Workflow.
|
||||
@param PP_Order_Workflow_ID Manufacturing Order Workflow */
|
||||
public void setPP_Order_Workflow_ID (int PP_Order_Workflow_ID)
|
||||
{
|
||||
if (PP_Order_Workflow_ID < 1)
|
||||
|
@ -228,8 +251,8 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
set_ValueNoCheck (COLUMNNAME_PP_Order_Workflow_ID, Integer.valueOf(PP_Order_Workflow_ID));
|
||||
}
|
||||
|
||||
/** Get PP_Order_Workflow_ID.
|
||||
@return PP_Order_Workflow_ID */
|
||||
/** Get Manufacturing Order Workflow.
|
||||
@return Manufacturing Order Workflow */
|
||||
public int getPP_Order_Workflow_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PP_Order_Workflow_ID);
|
||||
|
@ -238,6 +261,46 @@ public class X_PP_Order_Node_Product extends PO implements I_PP_Order_Node_Produ
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Quantity.
|
||||
@param Qty
|
||||
Quantity
|
||||
*/
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value (COLUMNNAME_Qty, Qty);
|
||||
}
|
||||
|
||||
/** Get Quantity.
|
||||
@return Quantity
|
||||
*/
|
||||
public BigDecimal getQty ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_Qty);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Sequence.
|
||||
@param SeqNo
|
||||
Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public void setSeqNo (int SeqNo)
|
||||
{
|
||||
set_Value (COLUMNNAME_SeqNo, Integer.valueOf(SeqNo));
|
||||
}
|
||||
|
||||
/** Get Sequence.
|
||||
@return Method of ordering records; lowest number comes first
|
||||
*/
|
||||
public int getSeqNo ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_SeqNo);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Yield.
|
||||
@param Yield Yield */
|
||||
public void setYield (int Yield)
|
||||
|
|
|
@ -1,536 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOM
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOM extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOM_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM (Properties ctx, int PP_ProfileBOM_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOM_ID, trxName);
|
||||
/** if (PP_ProfileBOM_ID == 0)
|
||||
{
|
||||
setM_Product_Category_ID (0);
|
||||
setName (null);
|
||||
setPP_ProfileBOM_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOM */
|
||||
public static final String Table_Name="PP_ProfileBOM";
|
||||
|
||||
/** AD_Table_ID=50011 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Business Partner .
|
||||
@param C_BPartner_ID Identifies a Business Partner */
|
||||
public void setC_BPartner_ID (int C_BPartner_ID)
|
||||
{
|
||||
if (C_BPartner_ID <= 0) set_Value ("C_BPartner_ID", null);
|
||||
else
|
||||
set_Value ("C_BPartner_ID", Integer.valueOf(C_BPartner_ID));
|
||||
}
|
||||
/** Get Business Partner .
|
||||
@return Identifies a Business Partner */
|
||||
public int getC_BPartner_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("C_BPartner_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
/** Set Order.
|
||||
@param C_Order_ID Order */
|
||||
public void setC_Order_ID (String C_Order_ID)
|
||||
{
|
||||
if (C_Order_ID != null && C_Order_ID.length() > 22)
|
||||
{
|
||||
log.warning("Length > 22 - truncated");
|
||||
C_Order_ID = C_Order_ID.substring(0,21);
|
||||
}
|
||||
set_Value ("C_Order_ID", C_Order_ID);
|
||||
}
|
||||
/** Get Order.
|
||||
@return Order */
|
||||
public String getC_Order_ID()
|
||||
{
|
||||
return (String)get_Value("C_Order_ID");
|
||||
}
|
||||
/** Column name C_Order_ID */
|
||||
public static final String COLUMNNAME_C_Order_ID = "C_Order_ID";
|
||||
/** Set UOM.
|
||||
@param C_UOM_ID Unit of Measure */
|
||||
public void setC_UOM_ID (int C_UOM_ID)
|
||||
{
|
||||
if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null);
|
||||
else
|
||||
set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID));
|
||||
}
|
||||
/** Get UOM.
|
||||
@return Unit of Measure */
|
||||
public int getC_UOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("C_UOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name C_UOM_ID */
|
||||
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
|
||||
/** Set Copy From.
|
||||
@param CopyFrom Copy From Record */
|
||||
public void setCopyFrom (String CopyFrom)
|
||||
{
|
||||
if (CopyFrom != null && CopyFrom.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
CopyFrom = CopyFrom.substring(0,0);
|
||||
}
|
||||
set_Value ("CopyFrom", CopyFrom);
|
||||
}
|
||||
/** Get Copy From.
|
||||
@return Copy From Record */
|
||||
public String getCopyFrom()
|
||||
{
|
||||
return (String)get_Value("CopyFrom");
|
||||
}
|
||||
/** Column name CopyFrom */
|
||||
public static final String COLUMNNAME_CopyFrom = "CopyFrom";
|
||||
/** Set CopyToNutrients.
|
||||
@param CopyToNutrients CopyToNutrients */
|
||||
public void setCopyToNutrients (String CopyToNutrients)
|
||||
{
|
||||
if (CopyToNutrients != null && CopyToNutrients.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
CopyToNutrients = CopyToNutrients.substring(0,0);
|
||||
}
|
||||
set_Value ("CopyToNutrients", CopyToNutrients);
|
||||
}
|
||||
/** Get CopyToNutrients.
|
||||
@return CopyToNutrients */
|
||||
public String getCopyToNutrients()
|
||||
{
|
||||
return (String)get_Value("CopyToNutrients");
|
||||
}
|
||||
/** Column name CopyToNutrients */
|
||||
public static final String COLUMNNAME_CopyToNutrients = "CopyToNutrients";
|
||||
/** Set Rate.
|
||||
@param CurrencyRate Currency Conversion Rate */
|
||||
public void setCurrencyRate (BigDecimal CurrencyRate)
|
||||
{
|
||||
set_Value ("CurrencyRate", CurrencyRate);
|
||||
}
|
||||
/** Get Rate.
|
||||
@return Currency Conversion Rate */
|
||||
public BigDecimal getCurrencyRate()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("CurrencyRate");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name CurrencyRate */
|
||||
public static final String COLUMNNAME_CurrencyRate = "CurrencyRate";
|
||||
/** Set Document Date.
|
||||
@param DateDoc Date of the Document */
|
||||
public void setDateDoc (Timestamp DateDoc)
|
||||
{
|
||||
set_Value ("DateDoc", DateDoc);
|
||||
}
|
||||
/** Get Document Date.
|
||||
@return Date of the Document */
|
||||
public Timestamp getDateDoc()
|
||||
{
|
||||
return (Timestamp)get_Value("DateDoc");
|
||||
}
|
||||
/** Column name DateDoc */
|
||||
public static final String COLUMNNAME_DateDoc = "DateDoc";
|
||||
/** Set Description.
|
||||
@param Description Optional short description of the record */
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
if (Description != null && Description.length() > 250)
|
||||
{
|
||||
log.warning("Length > 250 - truncated");
|
||||
Description = Description.substring(0,249);
|
||||
}
|
||||
set_Value ("Description", Description);
|
||||
}
|
||||
/** Get Description.
|
||||
@return Optional short description of the record */
|
||||
public String getDescription()
|
||||
{
|
||||
return (String)get_Value("Description");
|
||||
}
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
/** Set Generate To.
|
||||
@param GenerateTo Generate To */
|
||||
public void setGenerateTo (String GenerateTo)
|
||||
{
|
||||
if (GenerateTo != null && GenerateTo.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
GenerateTo = GenerateTo.substring(0,0);
|
||||
}
|
||||
set_Value ("GenerateTo", GenerateTo);
|
||||
}
|
||||
/** Get Generate To.
|
||||
@return Generate To */
|
||||
public String getGenerateTo()
|
||||
{
|
||||
return (String)get_Value("GenerateTo");
|
||||
}
|
||||
/** Column name GenerateTo */
|
||||
public static final String COLUMNNAME_GenerateTo = "GenerateTo";
|
||||
/** Set Published.
|
||||
@param IsPublished The Topic is published and can be viewed */
|
||||
public void setIsPublished (boolean IsPublished)
|
||||
{
|
||||
set_Value ("IsPublished", Boolean.valueOf(IsPublished));
|
||||
}
|
||||
/** Get Published.
|
||||
@return The Topic is published and can be viewed */
|
||||
public boolean isPublished()
|
||||
{
|
||||
Object oo = get_Value("IsPublished");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPublished */
|
||||
public static final String COLUMNNAME_IsPublished = "IsPublished";
|
||||
/** Set Line Amount.
|
||||
@param LineNetAmt Line Extended Amount (Quantity * Actual Price) without Freight and Charges */
|
||||
public void setLineNetAmt (BigDecimal LineNetAmt)
|
||||
{
|
||||
set_Value ("LineNetAmt", LineNetAmt);
|
||||
}
|
||||
/** Get Line Amount.
|
||||
@return Line Extended Amount (Quantity * Actual Price) without Freight and Charges */
|
||||
public BigDecimal getLineNetAmt()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("LineNetAmt");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name LineNetAmt */
|
||||
public static final String COLUMNNAME_LineNetAmt = "LineNetAmt";
|
||||
/** Set Attribute Set Instance.
|
||||
@param M_AttributeSetInstance_ID Product Attribute Set Instance */
|
||||
public void setM_AttributeSetInstance_ID (int M_AttributeSetInstance_ID)
|
||||
{
|
||||
if (M_AttributeSetInstance_ID <= 0) set_Value ("M_AttributeSetInstance_ID", null);
|
||||
else
|
||||
set_Value ("M_AttributeSetInstance_ID", Integer.valueOf(M_AttributeSetInstance_ID));
|
||||
}
|
||||
/** Get Attribute Set Instance.
|
||||
@return Product Attribute Set Instance */
|
||||
public int getM_AttributeSetInstance_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_AttributeSetInstance_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_AttributeSetInstance_ID */
|
||||
public static final String COLUMNNAME_M_AttributeSetInstance_ID = "M_AttributeSetInstance_ID";
|
||||
/** Set Product Category.
|
||||
@param M_Product_Category_ID Category of a Product */
|
||||
public void setM_Product_Category_ID (int M_Product_Category_ID)
|
||||
{
|
||||
if (M_Product_Category_ID < 1) throw new IllegalArgumentException ("M_Product_Category_ID is mandatory.");
|
||||
set_Value ("M_Product_Category_ID", Integer.valueOf(M_Product_Category_ID));
|
||||
}
|
||||
/** Get Product Category.
|
||||
@return Category of a Product */
|
||||
public int getM_Product_Category_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Product_Category_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Product_Category_ID */
|
||||
public static final String COLUMNNAME_M_Product_Category_ID = "M_Product_Category_ID";
|
||||
/** Set Product.
|
||||
@param M_Product_ID Product, Service, Item */
|
||||
public void setM_Product_ID (int M_Product_ID)
|
||||
{
|
||||
if (M_Product_ID <= 0) set_Value ("M_Product_ID", null);
|
||||
else
|
||||
set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID));
|
||||
}
|
||||
/** Get Product.
|
||||
@return Product, Service, Item */
|
||||
public int getM_Product_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Product_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
/** Set Margin %.
|
||||
@param Margin Margin for a product as a percentage */
|
||||
public void setMargin (BigDecimal Margin)
|
||||
{
|
||||
set_Value ("Margin", Margin);
|
||||
}
|
||||
/** Get Margin %.
|
||||
@return Margin for a product as a percentage */
|
||||
public BigDecimal getMargin()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Margin");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Margin */
|
||||
public static final String COLUMNNAME_Margin = "Margin";
|
||||
/** Set Name.
|
||||
@param Name Alphanumeric identifier of the entity */
|
||||
public void setName (String Name)
|
||||
{
|
||||
if (Name == null) throw new IllegalArgumentException ("Name is mandatory.");
|
||||
if (Name.length() > 60)
|
||||
{
|
||||
log.warning("Length > 60 - truncated");
|
||||
Name = Name.substring(0,59);
|
||||
}
|
||||
set_Value ("Name", Name);
|
||||
}
|
||||
/** Get Name.
|
||||
@return Alphanumeric identifier of the entity */
|
||||
public String getName()
|
||||
{
|
||||
return (String)get_Value("Name");
|
||||
}
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
/** Set Old Value.
|
||||
@param OldValue The old file data */
|
||||
public void setOldValue (String OldValue)
|
||||
{
|
||||
if (OldValue != null && OldValue.length() > 40)
|
||||
{
|
||||
log.warning("Length > 40 - truncated");
|
||||
OldValue = OldValue.substring(0,39);
|
||||
}
|
||||
set_Value ("OldValue", OldValue);
|
||||
}
|
||||
/** Get Old Value.
|
||||
@return The old file data */
|
||||
public String getOldValue()
|
||||
{
|
||||
return (String)get_Value("OldValue");
|
||||
}
|
||||
/** Column name OldValue */
|
||||
public static final String COLUMNNAME_OldValue = "OldValue";
|
||||
/** Set BOM.
|
||||
@param PP_Product_BOM_ID BOM */
|
||||
public void setPP_Product_BOM_ID (int PP_Product_BOM_ID)
|
||||
{
|
||||
if (PP_Product_BOM_ID <= 0) set_Value ("PP_Product_BOM_ID", null);
|
||||
else
|
||||
set_Value ("PP_Product_BOM_ID", Integer.valueOf(PP_Product_BOM_ID));
|
||||
}
|
||||
/** Get BOM.
|
||||
@return BOM */
|
||||
public int getPP_Product_BOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_Product_BOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_Product_BOM_ID */
|
||||
public static final String COLUMNNAME_PP_Product_BOM_ID = "PP_Product_BOM_ID";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set List Price.
|
||||
@param PriceList List Price */
|
||||
public void setPriceList (BigDecimal PriceList)
|
||||
{
|
||||
set_Value ("PriceList", PriceList);
|
||||
}
|
||||
/** Get List Price.
|
||||
@return List Price */
|
||||
public BigDecimal getPriceList()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("PriceList");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name PriceList */
|
||||
public static final String COLUMNNAME_PriceList = "PriceList";
|
||||
/** Set Process Now.
|
||||
@param Processing Process Now */
|
||||
public void setProcessing (boolean Processing)
|
||||
{
|
||||
set_Value ("Processing", Boolean.valueOf(Processing));
|
||||
}
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
public boolean isProcessing()
|
||||
{
|
||||
Object oo = get_Value("Processing");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name Processing */
|
||||
public static final String COLUMNNAME_Processing = "Processing";
|
||||
/** Set Quantity.
|
||||
@param Qty Quantity */
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value ("Qty", Qty);
|
||||
}
|
||||
/** Get Quantity.
|
||||
@return Quantity */
|
||||
public BigDecimal getQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Qty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
/** Set Valid from.
|
||||
@param ValidFrom Valid from including this date (first day) */
|
||||
public void setValidFrom (Timestamp ValidFrom)
|
||||
{
|
||||
set_Value ("ValidFrom", ValidFrom);
|
||||
}
|
||||
/** Get Valid from.
|
||||
@return Valid from including this date (first day) */
|
||||
public Timestamp getValidFrom()
|
||||
{
|
||||
return (Timestamp)get_Value("ValidFrom");
|
||||
}
|
||||
/** Column name ValidFrom */
|
||||
public static final String COLUMNNAME_ValidFrom = "ValidFrom";
|
||||
/** Set Valid to.
|
||||
@param ValidTo Valid to including this date (last day) */
|
||||
public void setValidTo (Timestamp ValidTo)
|
||||
{
|
||||
set_Value ("ValidTo", ValidTo);
|
||||
}
|
||||
/** Get Valid to.
|
||||
@return Valid to including this date (last day) */
|
||||
public Timestamp getValidTo()
|
||||
{
|
||||
return (Timestamp)get_Value("ValidTo");
|
||||
}
|
||||
/** Column name ValidTo */
|
||||
public static final String COLUMNNAME_ValidTo = "ValidTo";
|
||||
/** Set Search Key.
|
||||
@param Value Search key for the record in the format required - must be unique */
|
||||
public void setValue (String Value)
|
||||
{
|
||||
if (Value != null && Value.length() > 22)
|
||||
{
|
||||
log.warning("Length > 22 - truncated");
|
||||
Value = Value.substring(0,21);
|
||||
}
|
||||
set_Value ("Value", Value);
|
||||
}
|
||||
/** Get Search Key.
|
||||
@return Search key for the record in the format required - must be unique */
|
||||
public String getValue()
|
||||
{
|
||||
return (String)get_Value("Value");
|
||||
}
|
||||
/** Get Record ID/ColumnName
|
||||
@return ID/ColumnName pair
|
||||
*/public KeyNamePair getKeyNamePair()
|
||||
{
|
||||
return new KeyNamePair(get_ID(), getValue());
|
||||
}
|
||||
/** Column name Value */
|
||||
public static final String COLUMNNAME_Value = "Value";
|
||||
}
|
|
@ -1,366 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOMCost
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOMCost extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOMCost_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOMCost (Properties ctx, int PP_ProfileBOMCost_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOMCost_ID, trxName);
|
||||
/** if (PP_ProfileBOMCost_ID == 0)
|
||||
{
|
||||
setPP_ProfileBOMCost_ID (0);
|
||||
setPP_ProfileBOM_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOMCost (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOMCost */
|
||||
public static final String Table_Name="PP_ProfileBOMCost";
|
||||
|
||||
/** AD_Table_ID=50015 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOMCost[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Date Ordered.
|
||||
@param DateOrdered Date of Order */
|
||||
public void setDateOrdered (Timestamp DateOrdered)
|
||||
{
|
||||
set_Value ("DateOrdered", DateOrdered);
|
||||
}
|
||||
/** Get Date Ordered.
|
||||
@return Date of Order */
|
||||
public Timestamp getDateOrdered()
|
||||
{
|
||||
return (Timestamp)get_Value("DateOrdered");
|
||||
}
|
||||
/** Column name DateOrdered */
|
||||
public static final String COLUMNNAME_DateOrdered = "DateOrdered";
|
||||
/** Set Description.
|
||||
@param Description Optional short description of the record */
|
||||
public void setDescription (String Description)
|
||||
{
|
||||
if (Description != null && Description.length() > 255)
|
||||
{
|
||||
log.warning("Length > 255 - truncated");
|
||||
Description = Description.substring(0,254);
|
||||
}
|
||||
set_Value ("Description", Description);
|
||||
}
|
||||
/** Get Description.
|
||||
@return Optional short description of the record */
|
||||
public String getDescription()
|
||||
{
|
||||
return (String)get_Value("Description");
|
||||
}
|
||||
/** Column name Description */
|
||||
public static final String COLUMNNAME_Description = "Description";
|
||||
/** Set Generate To.
|
||||
@param GenerateTo Generate To */
|
||||
public void setGenerateTo (String GenerateTo)
|
||||
{
|
||||
if (GenerateTo != null && GenerateTo.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
GenerateTo = GenerateTo.substring(0,0);
|
||||
}
|
||||
set_Value ("GenerateTo", GenerateTo);
|
||||
}
|
||||
/** Get Generate To.
|
||||
@return Generate To */
|
||||
public String getGenerateTo()
|
||||
{
|
||||
return (String)get_Value("GenerateTo");
|
||||
}
|
||||
/** Column name GenerateTo */
|
||||
public static final String COLUMNNAME_GenerateTo = "GenerateTo";
|
||||
/** Set IsPacking.
|
||||
@param IsPacking IsPacking */
|
||||
public void setIsPacking (boolean IsPacking)
|
||||
{
|
||||
set_Value ("IsPacking", Boolean.valueOf(IsPacking));
|
||||
}
|
||||
/** Get IsPacking.
|
||||
@return IsPacking */
|
||||
public boolean isPacking()
|
||||
{
|
||||
Object oo = get_Value("IsPacking");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPacking */
|
||||
public static final String COLUMNNAME_IsPacking = "IsPacking";
|
||||
/** Set IsUSD.
|
||||
@param IsUSD IsUSD */
|
||||
public void setIsUSD (boolean IsUSD)
|
||||
{
|
||||
set_Value ("IsUSD", Boolean.valueOf(IsUSD));
|
||||
}
|
||||
/** Get IsUSD.
|
||||
@return IsUSD */
|
||||
public boolean isUSD()
|
||||
{
|
||||
Object oo = get_Value("IsUSD");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsUSD */
|
||||
public static final String COLUMNNAME_IsUSD = "IsUSD";
|
||||
/** Set Line Amount.
|
||||
@param LineNetAmt Line Extended Amount (Quantity * Actual Price) without Freight and Charges */
|
||||
public void setLineNetAmt (BigDecimal LineNetAmt)
|
||||
{
|
||||
set_Value ("LineNetAmt", LineNetAmt);
|
||||
}
|
||||
/** Get Line Amount.
|
||||
@return Line Extended Amount (Quantity * Actual Price) without Freight and Charges */
|
||||
public BigDecimal getLineNetAmt()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("LineNetAmt");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name LineNetAmt */
|
||||
public static final String COLUMNNAME_LineNetAmt = "LineNetAmt";
|
||||
/** Set Line Total.
|
||||
@param LineTotalAmt Total line amount incl. Tax */
|
||||
public void setLineTotalAmt (BigDecimal LineTotalAmt)
|
||||
{
|
||||
set_Value ("LineTotalAmt", LineTotalAmt);
|
||||
}
|
||||
/** Get Line Total.
|
||||
@return Total line amount incl. Tax */
|
||||
public BigDecimal getLineTotalAmt()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("LineTotalAmt");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name LineTotalAmt */
|
||||
public static final String COLUMNNAME_LineTotalAmt = "LineTotalAmt";
|
||||
/** Set Price List.
|
||||
@param M_PriceList_ID Unique identifier of a Price List */
|
||||
public void setM_PriceList_ID (int M_PriceList_ID)
|
||||
{
|
||||
if (M_PriceList_ID <= 0) set_Value ("M_PriceList_ID", null);
|
||||
else
|
||||
set_Value ("M_PriceList_ID", Integer.valueOf(M_PriceList_ID));
|
||||
}
|
||||
/** Get Price List.
|
||||
@return Unique identifier of a Price List */
|
||||
public int getM_PriceList_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_PriceList_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_PriceList_ID */
|
||||
public static final String COLUMNNAME_M_PriceList_ID = "M_PriceList_ID";
|
||||
/** Set M_ProductEt_ID.
|
||||
@param M_ProductEt_ID M_ProductEt_ID */
|
||||
public void setM_ProductEt_ID (int M_ProductEt_ID)
|
||||
{
|
||||
if (M_ProductEt_ID <= 0) set_Value ("M_ProductEt_ID", null);
|
||||
else
|
||||
set_Value ("M_ProductEt_ID", Integer.valueOf(M_ProductEt_ID));
|
||||
}
|
||||
/** Get M_ProductEt_ID.
|
||||
@return M_ProductEt_ID */
|
||||
public int getM_ProductEt_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_ProductEt_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_ProductEt_ID */
|
||||
public static final String COLUMNNAME_M_ProductEt_ID = "M_ProductEt_ID";
|
||||
/** Set Margin %.
|
||||
@param Margin Margin for a product as a percentage */
|
||||
public void setMargin (BigDecimal Margin)
|
||||
{
|
||||
set_Value ("Margin", Margin);
|
||||
}
|
||||
/** Get Margin %.
|
||||
@return Margin for a product as a percentage */
|
||||
public BigDecimal getMargin()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Margin");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Margin */
|
||||
public static final String COLUMNNAME_Margin = "Margin";
|
||||
/** Set Offer Amount.
|
||||
@param OfferAmt Amount of the Offer */
|
||||
public void setOfferAmt (BigDecimal OfferAmt)
|
||||
{
|
||||
set_Value ("OfferAmt", OfferAmt);
|
||||
}
|
||||
/** Get Offer Amount.
|
||||
@return Amount of the Offer */
|
||||
public BigDecimal getOfferAmt()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("OfferAmt");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name OfferAmt */
|
||||
public static final String COLUMNNAME_OfferAmt = "OfferAmt";
|
||||
/** Set Profile BOM Cost.
|
||||
@param PP_ProfileBOMCost_ID Profile BOM Cost */
|
||||
public void setPP_ProfileBOMCost_ID (int PP_ProfileBOMCost_ID)
|
||||
{
|
||||
if (PP_ProfileBOMCost_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOMCost_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOMCost_ID", Integer.valueOf(PP_ProfileBOMCost_ID));
|
||||
}
|
||||
/** Get Profile BOM Cost.
|
||||
@return Profile BOM Cost */
|
||||
public int getPP_ProfileBOMCost_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOMCost_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOMCost_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOMCost_ID = "PP_ProfileBOMCost_ID";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set QtyEt.
|
||||
@param QtyEt QtyEt */
|
||||
public void setQtyEt (BigDecimal QtyEt)
|
||||
{
|
||||
set_Value ("QtyEt", QtyEt);
|
||||
}
|
||||
/** Get QtyEt.
|
||||
@return QtyEt */
|
||||
public BigDecimal getQtyEt()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("QtyEt");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name QtyEt */
|
||||
public static final String COLUMNNAME_QtyEt = "QtyEt";
|
||||
/** Set Ordered Quantity.
|
||||
@param QtyOrdered Ordered Quantity */
|
||||
public void setQtyOrdered (BigDecimal QtyOrdered)
|
||||
{
|
||||
set_Value ("QtyOrdered", QtyOrdered);
|
||||
}
|
||||
/** Get Ordered Quantity.
|
||||
@return Ordered Quantity */
|
||||
public BigDecimal getQtyOrdered()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("QtyOrdered");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name QtyOrdered */
|
||||
public static final String COLUMNNAME_QtyOrdered = "QtyOrdered";
|
||||
/** Set Resource.
|
||||
@param S_Resource_ID Resource */
|
||||
public void setS_Resource_ID (int S_Resource_ID)
|
||||
{
|
||||
if (S_Resource_ID <= 0) set_Value ("S_Resource_ID", null);
|
||||
else
|
||||
set_Value ("S_Resource_ID", Integer.valueOf(S_Resource_ID));
|
||||
}
|
||||
/** Get Resource.
|
||||
@return Resource */
|
||||
public int getS_Resource_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("S_Resource_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name S_Resource_ID */
|
||||
public static final String COLUMNNAME_S_Resource_ID = "S_Resource_ID";
|
||||
}
|
|
@ -1,213 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOMLine
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOMLine extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOMLine_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOMLine (Properties ctx, int PP_ProfileBOMLine_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOMLine_ID, trxName);
|
||||
/** if (PP_ProfileBOMLine_ID == 0)
|
||||
{
|
||||
setM_Attribute_ID (0);
|
||||
setPP_ProfileBOMLine_ID (0);
|
||||
setPP_ProfileBOM_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOMLine (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOMLine */
|
||||
public static final String Table_Name="PP_ProfileBOMLine";
|
||||
|
||||
/** AD_Table_ID=50016 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOMLine[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Printed.
|
||||
@param IsPrinted Indicates if this document / line is printed */
|
||||
public void setIsPrinted (boolean IsPrinted)
|
||||
{
|
||||
set_Value ("IsPrinted", Boolean.valueOf(IsPrinted));
|
||||
}
|
||||
/** Get Printed.
|
||||
@return Indicates if this document / line is printed */
|
||||
public boolean isPrinted()
|
||||
{
|
||||
Object oo = get_Value("IsPrinted");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPrinted */
|
||||
public static final String COLUMNNAME_IsPrinted = "IsPrinted";
|
||||
/** Set Attribute.
|
||||
@param M_Attribute_ID Product Attribute */
|
||||
public void setM_Attribute_ID (int M_Attribute_ID)
|
||||
{
|
||||
if (M_Attribute_ID < 1) throw new IllegalArgumentException ("M_Attribute_ID is mandatory.");
|
||||
set_Value ("M_Attribute_ID", Integer.valueOf(M_Attribute_ID));
|
||||
}
|
||||
/** Get Attribute.
|
||||
@return Product Attribute */
|
||||
public int getM_Attribute_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Attribute_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Attribute_ID */
|
||||
public static final String COLUMNNAME_M_Attribute_ID = "M_Attribute_ID";
|
||||
/** Set Profile BOM Line.
|
||||
@param PP_ProfileBOMLine_ID Profile BOM Line */
|
||||
public void setPP_ProfileBOMLine_ID (int PP_ProfileBOMLine_ID)
|
||||
{
|
||||
if (PP_ProfileBOMLine_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOMLine_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOMLine_ID", Integer.valueOf(PP_ProfileBOMLine_ID));
|
||||
}
|
||||
/** Get Profile BOM Line.
|
||||
@return Profile BOM Line */
|
||||
public int getPP_ProfileBOMLine_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOMLine_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOMLine_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOMLine_ID = "PP_ProfileBOMLine_ID";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set Search Key.
|
||||
@param Value Search key for the record in the format required - must be unique */
|
||||
public void setValue (String Value)
|
||||
{
|
||||
if (Value != null && Value.length() > 40)
|
||||
{
|
||||
log.warning("Length > 40 - truncated");
|
||||
Value = Value.substring(0,39);
|
||||
}
|
||||
set_Value ("Value", Value);
|
||||
}
|
||||
/** Get Search Key.
|
||||
@return Search key for the record in the format required - must be unique */
|
||||
public String getValue()
|
||||
{
|
||||
return (String)get_Value("Value");
|
||||
}
|
||||
/** Column name Value */
|
||||
public static final String COLUMNNAME_Value = "Value";
|
||||
/** Set Max. Value.
|
||||
@param ValueMax Maximum Value for a field */
|
||||
public void setValueMax (BigDecimal ValueMax)
|
||||
{
|
||||
set_Value ("ValueMax", ValueMax);
|
||||
}
|
||||
/** Get Max. Value.
|
||||
@return Maximum Value for a field */
|
||||
public BigDecimal getValueMax()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("ValueMax");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name ValueMax */
|
||||
public static final String COLUMNNAME_ValueMax = "ValueMax";
|
||||
/** Set Min. Value.
|
||||
@param ValueMin Minimum Value for a field */
|
||||
public void setValueMin (BigDecimal ValueMin)
|
||||
{
|
||||
set_Value ("ValueMin", ValueMin);
|
||||
}
|
||||
/** Get Min. Value.
|
||||
@return Minimum Value for a field */
|
||||
public BigDecimal getValueMin()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("ValueMin");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name ValueMin */
|
||||
public static final String COLUMNNAME_ValueMin = "ValueMin";
|
||||
}
|
|
@ -1,338 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOM_Product
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOM_Product extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOM_Product_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Product (Properties ctx, int PP_ProfileBOM_Product_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOM_Product_ID, trxName);
|
||||
/** if (PP_ProfileBOM_Product_ID == 0)
|
||||
{
|
||||
setM_Product_ID (0);
|
||||
setPP_ProfileBOM_ID (0);
|
||||
setPP_ProfileBOM_Product_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Product (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOM_Product */
|
||||
public static final String Table_Name="PP_ProfileBOM_Product";
|
||||
|
||||
/** AD_Table_ID=50012 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Product[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Alias.
|
||||
@param Alias Defines an alternate method of indicating an account combination. */
|
||||
public void setAlias (boolean Alias)
|
||||
{
|
||||
set_Value ("Alias", Boolean.valueOf(Alias));
|
||||
}
|
||||
/** Get Alias.
|
||||
@return Defines an alternate method of indicating an account combination. */
|
||||
public boolean isAlias()
|
||||
{
|
||||
Object oo = get_Value("Alias");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name Alias */
|
||||
public static final String COLUMNNAME_Alias = "Alias";
|
||||
/** Set UOM.
|
||||
@param C_UOM_ID Unit of Measure */
|
||||
public void setC_UOM_ID (int C_UOM_ID)
|
||||
{
|
||||
if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null);
|
||||
else
|
||||
set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID));
|
||||
}
|
||||
/** Get UOM.
|
||||
@return Unit of Measure */
|
||||
public int getC_UOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("C_UOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name C_UOM_ID */
|
||||
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
|
||||
/** Set Generate To.
|
||||
@param GenerateTo Generate To */
|
||||
public void setGenerateTo (String GenerateTo)
|
||||
{
|
||||
if (GenerateTo != null && GenerateTo.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
GenerateTo = GenerateTo.substring(0,0);
|
||||
}
|
||||
set_Value ("GenerateTo", GenerateTo);
|
||||
}
|
||||
/** Get Generate To.
|
||||
@return Generate To */
|
||||
public String getGenerateTo()
|
||||
{
|
||||
return (String)get_Value("GenerateTo");
|
||||
}
|
||||
/** Column name GenerateTo */
|
||||
public static final String COLUMNNAME_GenerateTo = "GenerateTo";
|
||||
/** Set Printed.
|
||||
@param IsPrinted Indicates if this document / line is printed */
|
||||
public void setIsPrinted (boolean IsPrinted)
|
||||
{
|
||||
set_Value ("IsPrinted", Boolean.valueOf(IsPrinted));
|
||||
}
|
||||
/** Get Printed.
|
||||
@return Indicates if this document / line is printed */
|
||||
public boolean isPrinted()
|
||||
{
|
||||
Object oo = get_Value("IsPrinted");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPrinted */
|
||||
public static final String COLUMNNAME_IsPrinted = "IsPrinted";
|
||||
/** Set Line No.
|
||||
@param Line Unique line for this document */
|
||||
public void setLine (int Line)
|
||||
{
|
||||
set_Value ("Line", Integer.valueOf(Line));
|
||||
}
|
||||
/** Get Line No.
|
||||
@return Unique line for this document */
|
||||
public int getLine()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("Line");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name Line */
|
||||
public static final String COLUMNNAME_Line = "Line";
|
||||
/** Set Product.
|
||||
@param M_Product_ID Product, Service, Item */
|
||||
public void setM_Product_ID (int M_Product_ID)
|
||||
{
|
||||
if (M_Product_ID < 1) throw new IllegalArgumentException ("M_Product_ID is mandatory.");
|
||||
set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID));
|
||||
}
|
||||
/** Get Product.
|
||||
@return Product, Service, Item */
|
||||
public int getM_Product_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Product_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
/** Set Maximum Length.
|
||||
@param MaxLength Maximum Length of Data */
|
||||
public void setMaxLength (BigDecimal MaxLength)
|
||||
{
|
||||
set_Value ("MaxLength", MaxLength);
|
||||
}
|
||||
/** Get Maximum Length.
|
||||
@return Maximum Length of Data */
|
||||
public BigDecimal getMaxLength()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("MaxLength");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name MaxLength */
|
||||
public static final String COLUMNNAME_MaxLength = "MaxLength";
|
||||
/** Set Minimum Quantity.
|
||||
@param MinQty Minimum quantity for the business partner */
|
||||
public void setMinQty (BigDecimal MinQty)
|
||||
{
|
||||
set_Value ("MinQty", MinQty);
|
||||
}
|
||||
/** Get Minimum Quantity.
|
||||
@return Minimum quantity for the business partner */
|
||||
public BigDecimal getMinQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("MinQty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name MinQty */
|
||||
public static final String COLUMNNAME_MinQty = "MinQty";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set Profile BOM Product.
|
||||
@param PP_ProfileBOM_Product_ID Profile BOM Product */
|
||||
public void setPP_ProfileBOM_Product_ID (int PP_ProfileBOM_Product_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_Product_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Product_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_Product_ID", Integer.valueOf(PP_ProfileBOM_Product_ID));
|
||||
}
|
||||
/** Get Profile BOM Product.
|
||||
@return Profile BOM Product */
|
||||
public int getPP_ProfileBOM_Product_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_Product_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_Product_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_Product_ID = "PP_ProfileBOM_Product_ID";
|
||||
/** Set List Price.
|
||||
@param PriceList List Price */
|
||||
public void setPriceList (BigDecimal PriceList)
|
||||
{
|
||||
set_Value ("PriceList", PriceList);
|
||||
}
|
||||
/** Get List Price.
|
||||
@return List Price */
|
||||
public BigDecimal getPriceList()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("PriceList");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name PriceList */
|
||||
public static final String COLUMNNAME_PriceList = "PriceList";
|
||||
/** Set Process Now.
|
||||
@param Processing Process Now */
|
||||
public void setProcessing (boolean Processing)
|
||||
{
|
||||
set_Value ("Processing", Boolean.valueOf(Processing));
|
||||
}
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
public boolean isProcessing()
|
||||
{
|
||||
Object oo = get_Value("Processing");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name Processing */
|
||||
public static final String COLUMNNAME_Processing = "Processing";
|
||||
/** Set Quantity.
|
||||
@param Qty Quantity */
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value ("Qty", Qty);
|
||||
}
|
||||
/** Get Quantity.
|
||||
@return Quantity */
|
||||
public BigDecimal getQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Qty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
/** Set Search Key.
|
||||
@param Value Search key for the record in the format required - must be unique */
|
||||
public void setValue (String Value)
|
||||
{
|
||||
if (Value != null && Value.length() > 80)
|
||||
{
|
||||
log.warning("Length > 80 - truncated");
|
||||
Value = Value.substring(0,79);
|
||||
}
|
||||
set_Value ("Value", Value);
|
||||
}
|
||||
/** Get Search Key.
|
||||
@return Search key for the record in the format required - must be unique */
|
||||
public String getValue()
|
||||
{
|
||||
return (String)get_Value("Value");
|
||||
}
|
||||
/** Column name Value */
|
||||
public static final String COLUMNNAME_Value = "Value";
|
||||
}
|
|
@ -1,229 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOM_Real
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOM_Real extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOM_Real_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Real (Properties ctx, int PP_ProfileBOM_Real_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOM_Real_ID, trxName);
|
||||
/** if (PP_ProfileBOM_Real_ID == 0)
|
||||
{
|
||||
setM_Attribute_ID (0);
|
||||
setPP_ProfileBOM_ID (0);
|
||||
setPP_ProfileBOM_Real_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Real (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOM_Real */
|
||||
public static final String Table_Name="PP_ProfileBOM_Real";
|
||||
|
||||
/** AD_Table_ID=50014 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Real[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Printed.
|
||||
@param IsPrinted Indicates if this document / line is printed */
|
||||
public void setIsPrinted (boolean IsPrinted)
|
||||
{
|
||||
set_Value ("IsPrinted", Boolean.valueOf(IsPrinted));
|
||||
}
|
||||
/** Get Printed.
|
||||
@return Indicates if this document / line is printed */
|
||||
public boolean isPrinted()
|
||||
{
|
||||
Object oo = get_Value("IsPrinted");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPrinted */
|
||||
public static final String COLUMNNAME_IsPrinted = "IsPrinted";
|
||||
/** Set Attribute.
|
||||
@param M_Attribute_ID Product Attribute */
|
||||
public void setM_Attribute_ID (int M_Attribute_ID)
|
||||
{
|
||||
if (M_Attribute_ID < 1) throw new IllegalArgumentException ("M_Attribute_ID is mandatory.");
|
||||
set_Value ("M_Attribute_ID", Integer.valueOf(M_Attribute_ID));
|
||||
}
|
||||
/** Get Attribute.
|
||||
@return Product Attribute */
|
||||
public int getM_Attribute_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Attribute_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Attribute_ID */
|
||||
public static final String COLUMNNAME_M_Attribute_ID = "M_Attribute_ID";
|
||||
/** Set Max Height.
|
||||
@param MaxHeight Maximum Height in 1/72 if an inch - 0 = no restriction */
|
||||
public void setMaxHeight (BigDecimal MaxHeight)
|
||||
{
|
||||
set_Value ("MaxHeight", MaxHeight);
|
||||
}
|
||||
/** Get Max Height.
|
||||
@return Maximum Height in 1/72 if an inch - 0 = no restriction */
|
||||
public BigDecimal getMaxHeight()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("MaxHeight");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name MaxHeight */
|
||||
public static final String COLUMNNAME_MaxHeight = "MaxHeight";
|
||||
/** Set Minimum Quantity.
|
||||
@param MinQty Minimum quantity for the business partner */
|
||||
public void setMinQty (BigDecimal MinQty)
|
||||
{
|
||||
set_Value ("MinQty", MinQty);
|
||||
}
|
||||
/** Get Minimum Quantity.
|
||||
@return Minimum quantity for the business partner */
|
||||
public BigDecimal getMinQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("MinQty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name MinQty */
|
||||
public static final String COLUMNNAME_MinQty = "MinQty";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set Profile BOM Real.
|
||||
@param PP_ProfileBOM_Real_ID Profile BOM Real */
|
||||
public void setPP_ProfileBOM_Real_ID (int PP_ProfileBOM_Real_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_Real_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Real_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_Real_ID", Integer.valueOf(PP_ProfileBOM_Real_ID));
|
||||
}
|
||||
/** Get Profile BOM Real.
|
||||
@return Profile BOM Real */
|
||||
public int getPP_ProfileBOM_Real_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_Real_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_Real_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_Real_ID = "PP_ProfileBOM_Real_ID";
|
||||
/** Set Quantity.
|
||||
@param Qty Quantity */
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value ("Qty", Qty);
|
||||
}
|
||||
/** Get Quantity.
|
||||
@return Quantity */
|
||||
public BigDecimal getQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Qty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
/** Set Search Key.
|
||||
@param Value Search key for the record in the format required - must be unique */
|
||||
public void setValue (String Value)
|
||||
{
|
||||
if (Value != null && Value.length() > 40)
|
||||
{
|
||||
log.warning("Length > 40 - truncated");
|
||||
Value = Value.substring(0,39);
|
||||
}
|
||||
set_Value ("Value", Value);
|
||||
}
|
||||
/** Get Search Key.
|
||||
@return Search key for the record in the format required - must be unique */
|
||||
public String getValue()
|
||||
{
|
||||
return (String)get_Value("Value");
|
||||
}
|
||||
/** Column name Value */
|
||||
public static final String COLUMNNAME_Value = "Value";
|
||||
}
|
|
@ -1,342 +0,0 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2007 ComPiere, Inc. All Rights Reserved. *
|
||||
* This program is free software;
|
||||
you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
* by the Free Software Foundation. This program is distributed in the hope *
|
||||
* that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
without even the implied *
|
||||
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *
|
||||
* See the GNU General Public License for more details. *
|
||||
* You should have received a copy of the GNU General Public License along *
|
||||
* with this program;
|
||||
if not, write to the Free Software Foundation, Inc., *
|
||||
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
|
||||
* For the text or an alternative of this public license, you may reach us *
|
||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.model;
|
||||
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
import org.compiere.model.*;
|
||||
import java.util.*;
|
||||
import java.sql.*;
|
||||
import java.math.*;
|
||||
import org.compiere.util.*;
|
||||
/** Generated Model for PP_ProfileBOM_Selected
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.3.0 - $Id$ */
|
||||
public class X_PP_ProfileBOM_Selected extends PO
|
||||
{
|
||||
/** Standard Constructor
|
||||
@param ctx context
|
||||
@param PP_ProfileBOM_Selected_ID id
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Selected (Properties ctx, int PP_ProfileBOM_Selected_ID, String trxName)
|
||||
{
|
||||
super (ctx, PP_ProfileBOM_Selected_ID, trxName);
|
||||
/** if (PP_ProfileBOM_Selected_ID == 0)
|
||||
{
|
||||
setPP_ProfileBOM_ID (0);
|
||||
setPP_ProfileBOM_Selected_ID (0);
|
||||
}
|
||||
*/
|
||||
}
|
||||
/** Load Constructor
|
||||
@param ctx context
|
||||
@param rs result set
|
||||
@param trxName transaction
|
||||
*/
|
||||
public X_PP_ProfileBOM_Selected (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
/** TableName=PP_ProfileBOM_Selected */
|
||||
public static final String Table_Name="PP_ProfileBOM_Selected";
|
||||
|
||||
/** AD_Table_ID=50013 */
|
||||
public static final int Table_ID=MTable.getTable_ID(Table_Name);
|
||||
|
||||
protected static KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
protected BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
/** AccessLevel
|
||||
@return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
/** Load Meta Data
|
||||
@param ctx context
|
||||
@return PO Info
|
||||
*/
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID);
|
||||
return poi;
|
||||
}
|
||||
/** Info
|
||||
@return info
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_PP_ProfileBOM_Selected[").append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
/** Set Alias.
|
||||
@param Alias Defines an alternate method of indicating an account combination. */
|
||||
public void setAlias (boolean Alias)
|
||||
{
|
||||
set_Value ("Alias", Boolean.valueOf(Alias));
|
||||
}
|
||||
/** Get Alias.
|
||||
@return Defines an alternate method of indicating an account combination. */
|
||||
public boolean isAlias()
|
||||
{
|
||||
Object oo = get_Value("Alias");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name Alias */
|
||||
public static final String COLUMNNAME_Alias = "Alias";
|
||||
/** Set UOM.
|
||||
@param C_UOM_ID Unit of Measure */
|
||||
public void setC_UOM_ID (int C_UOM_ID)
|
||||
{
|
||||
if (C_UOM_ID <= 0) set_Value ("C_UOM_ID", null);
|
||||
else
|
||||
set_Value ("C_UOM_ID", Integer.valueOf(C_UOM_ID));
|
||||
}
|
||||
/** Get UOM.
|
||||
@return Unit of Measure */
|
||||
public int getC_UOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("C_UOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name C_UOM_ID */
|
||||
public static final String COLUMNNAME_C_UOM_ID = "C_UOM_ID";
|
||||
/** Set Generate To.
|
||||
@param GenerateTo Generate To */
|
||||
public void setGenerateTo (String GenerateTo)
|
||||
{
|
||||
if (GenerateTo != null && GenerateTo.length() > 1)
|
||||
{
|
||||
log.warning("Length > 1 - truncated");
|
||||
GenerateTo = GenerateTo.substring(0,0);
|
||||
}
|
||||
set_Value ("GenerateTo", GenerateTo);
|
||||
}
|
||||
/** Get Generate To.
|
||||
@return Generate To */
|
||||
public String getGenerateTo()
|
||||
{
|
||||
return (String)get_Value("GenerateTo");
|
||||
}
|
||||
/** Column name GenerateTo */
|
||||
public static final String COLUMNNAME_GenerateTo = "GenerateTo";
|
||||
/** Set IsCritical.
|
||||
@param IsCritical IsCritical */
|
||||
public void setIsCritical (boolean IsCritical)
|
||||
{
|
||||
set_Value ("IsCritical", Boolean.valueOf(IsCritical));
|
||||
}
|
||||
/** Get IsCritical.
|
||||
@return IsCritical */
|
||||
public boolean isCritical()
|
||||
{
|
||||
Object oo = get_Value("IsCritical");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsCritical */
|
||||
public static final String COLUMNNAME_IsCritical = "IsCritical";
|
||||
/** Set Printed.
|
||||
@param IsPrinted Indicates if this document / line is printed */
|
||||
public void setIsPrinted (boolean IsPrinted)
|
||||
{
|
||||
set_Value ("IsPrinted", Boolean.valueOf(IsPrinted));
|
||||
}
|
||||
/** Get Printed.
|
||||
@return Indicates if this document / line is printed */
|
||||
public boolean isPrinted()
|
||||
{
|
||||
Object oo = get_Value("IsPrinted");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name IsPrinted */
|
||||
public static final String COLUMNNAME_IsPrinted = "IsPrinted";
|
||||
/** Set Line No.
|
||||
@param Line Unique line for this document */
|
||||
public void setLine (int Line)
|
||||
{
|
||||
set_Value ("Line", Integer.valueOf(Line));
|
||||
}
|
||||
/** Get Line No.
|
||||
@return Unique line for this document */
|
||||
public int getLine()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("Line");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name Line */
|
||||
public static final String COLUMNNAME_Line = "Line";
|
||||
/** Set Product.
|
||||
@param M_Product_ID Product, Service, Item */
|
||||
public void setM_Product_ID (int M_Product_ID)
|
||||
{
|
||||
if (M_Product_ID <= 0) set_Value ("M_Product_ID", null);
|
||||
else
|
||||
set_Value ("M_Product_ID", Integer.valueOf(M_Product_ID));
|
||||
}
|
||||
/** Get Product.
|
||||
@return Product, Service, Item */
|
||||
public int getM_Product_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("M_Product_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
/** Set Profile BOM.
|
||||
@param PP_ProfileBOM_ID Profile BOM */
|
||||
public void setPP_ProfileBOM_ID (int PP_ProfileBOM_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_ID", Integer.valueOf(PP_ProfileBOM_ID));
|
||||
}
|
||||
/** Get Profile BOM.
|
||||
@return Profile BOM */
|
||||
public int getPP_ProfileBOM_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_ID = "PP_ProfileBOM_ID";
|
||||
/** Set Profile BOM Selected.
|
||||
@param PP_ProfileBOM_Selected_ID Profile BOM Selected */
|
||||
public void setPP_ProfileBOM_Selected_ID (int PP_ProfileBOM_Selected_ID)
|
||||
{
|
||||
if (PP_ProfileBOM_Selected_ID < 1) throw new IllegalArgumentException ("PP_ProfileBOM_Selected_ID is mandatory.");
|
||||
set_ValueNoCheck ("PP_ProfileBOM_Selected_ID", Integer.valueOf(PP_ProfileBOM_Selected_ID));
|
||||
}
|
||||
/** Get Profile BOM Selected.
|
||||
@return Profile BOM Selected */
|
||||
public int getPP_ProfileBOM_Selected_ID()
|
||||
{
|
||||
Integer ii = (Integer)get_Value("PP_ProfileBOM_Selected_ID");
|
||||
if (ii == null) return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
/** Column name PP_ProfileBOM_Selected_ID */
|
||||
public static final String COLUMNNAME_PP_ProfileBOM_Selected_ID = "PP_ProfileBOM_Selected_ID";
|
||||
/** Set Percent.
|
||||
@param Percent Percentage */
|
||||
public void setPercent (BigDecimal Percent)
|
||||
{
|
||||
set_Value ("Percent", Percent);
|
||||
}
|
||||
/** Get Percent.
|
||||
@return Percentage */
|
||||
public BigDecimal getPercent()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Percent");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Percent */
|
||||
public static final String COLUMNNAME_Percent = "Percent";
|
||||
/** Set List Price.
|
||||
@param PriceList List Price */
|
||||
public void setPriceList (BigDecimal PriceList)
|
||||
{
|
||||
set_Value ("PriceList", PriceList);
|
||||
}
|
||||
/** Get List Price.
|
||||
@return List Price */
|
||||
public BigDecimal getPriceList()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("PriceList");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name PriceList */
|
||||
public static final String COLUMNNAME_PriceList = "PriceList";
|
||||
/** Set Process Now.
|
||||
@param Processing Process Now */
|
||||
public void setProcessing (boolean Processing)
|
||||
{
|
||||
set_Value ("Processing", Boolean.valueOf(Processing));
|
||||
}
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
public boolean isProcessing()
|
||||
{
|
||||
Object oo = get_Value("Processing");
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean) return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
/** Column name Processing */
|
||||
public static final String COLUMNNAME_Processing = "Processing";
|
||||
/** Set Quantity.
|
||||
@param Qty Quantity */
|
||||
public void setQty (BigDecimal Qty)
|
||||
{
|
||||
set_Value ("Qty", Qty);
|
||||
}
|
||||
/** Get Quantity.
|
||||
@return Quantity */
|
||||
public BigDecimal getQty()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value("Qty");
|
||||
if (bd == null) return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
/** Column name Qty */
|
||||
public static final String COLUMNNAME_Qty = "Qty";
|
||||
/** Set Search Key.
|
||||
@param Value Search key for the record in the format required - must be unique */
|
||||
public void setValue (String Value)
|
||||
{
|
||||
if (Value != null && Value.length() > 80)
|
||||
{
|
||||
log.warning("Length > 80 - truncated");
|
||||
Value = Value.substring(0,79);
|
||||
}
|
||||
set_Value ("Value", Value);
|
||||
}
|
||||
/** Get Search Key.
|
||||
@return Search key for the record in the format required - must be unique */
|
||||
public String getValue()
|
||||
{
|
||||
return (String)get_Value("Value");
|
||||
}
|
||||
/** Column name Value */
|
||||
public static final String COLUMNNAME_Value = "Value";
|
||||
}
|
|
@ -78,7 +78,7 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_AD_WF_Node getAD_WF_Node() throws Exception
|
||||
public I_AD_WF_Node getAD_WF_Node() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_AD_WF_Node.Table_Name);
|
||||
I_AD_WF_Node result = null;
|
||||
|
@ -89,7 +89,7 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -161,7 +161,28 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
return (String)get_Value(COLUMNNAME_EntityType);
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws Exception
|
||||
/** Set Is Subcontracting.
|
||||
@param IsSubcontracting Is Subcontracting */
|
||||
public void setIsSubcontracting (boolean IsSubcontracting)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsSubcontracting, Boolean.valueOf(IsSubcontracting));
|
||||
}
|
||||
|
||||
/** Get Is Subcontracting.
|
||||
@return Is Subcontracting */
|
||||
public boolean isSubcontracting ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsSubcontracting);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
Class<?> clazz = MTable.getClass(I_M_Product.Table_Name);
|
||||
I_M_Product result = null;
|
||||
|
@ -172,7 +193,7 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
} catch (Exception e) {
|
||||
log.log(Level.SEVERE, "(id) - Table=" + Table_Name + ",Class=" + clazz, e);
|
||||
log.saveError("Error", "Table=" + Table_Name + ",Class=" + clazz);
|
||||
throw e;
|
||||
throw new RuntimeException( e );
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -199,8 +220,8 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set PP_WF_Node_Product_ID.
|
||||
@param PP_WF_Node_Product_ID PP_WF_Node_Product_ID */
|
||||
/** Set Workflow Node Product.
|
||||
@param PP_WF_Node_Product_ID Workflow Node Product */
|
||||
public void setPP_WF_Node_Product_ID (int PP_WF_Node_Product_ID)
|
||||
{
|
||||
if (PP_WF_Node_Product_ID < 1)
|
||||
|
@ -208,8 +229,8 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
set_ValueNoCheck (COLUMNNAME_PP_WF_Node_Product_ID, Integer.valueOf(PP_WF_Node_Product_ID));
|
||||
}
|
||||
|
||||
/** Get PP_WF_Node_Product_ID.
|
||||
@return PP_WF_Node_Product_ID */
|
||||
/** Get Workflow Node Product.
|
||||
@return Workflow Node Product */
|
||||
public int getPP_WF_Node_Product_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_PP_WF_Node_Product_ID);
|
||||
|
@ -257,4 +278,21 @@ public class X_PP_WF_Node_Product extends PO implements I_PP_WF_Node_Product, I_
|
|||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Yield.
|
||||
@param Yield Yield */
|
||||
public void setYield (int Yield)
|
||||
{
|
||||
set_Value (COLUMNNAME_Yield, Integer.valueOf(Yield));
|
||||
}
|
||||
|
||||
/** Get Yield.
|
||||
@return Yield */
|
||||
public int getYield ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_Yield);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue