Importer the Inventory Move
kind regards Victor Perez www.e-evolution.com Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=3018857
This commit is contained in:
parent
b090c30bc6
commit
ff654a1f2d
|
@ -0,0 +1,582 @@
|
|||
/******************************************************************************
|
||||
* 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;
|
||||
import java.sql.Timestamp;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.KeyNamePair;
|
||||
|
||||
/** Generated Interface for I_Movement
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.6.0LTS
|
||||
*/
|
||||
public interface I_I_Movement
|
||||
{
|
||||
|
||||
/** TableName=I_Movement */
|
||||
public static final String Table_Name = "I_Movement";
|
||||
|
||||
/** AD_Table_ID=53278 */
|
||||
public static final int Table_ID = MTable.getTable_ID(Table_Name);
|
||||
|
||||
KeyNamePair Model = new KeyNamePair(Table_ID, Table_Name);
|
||||
|
||||
/** AccessLevel = 3 - Client - Org
|
||||
*/
|
||||
BigDecimal accessLevel = BigDecimal.valueOf(3);
|
||||
|
||||
/** Load Meta Data */
|
||||
|
||||
/** Column name AD_Client_ID */
|
||||
public static final String COLUMNNAME_AD_Client_ID = "AD_Client_ID";
|
||||
|
||||
/** Get Client.
|
||||
* Client/Tenant for this installation.
|
||||
*/
|
||||
public int getAD_Client_ID();
|
||||
|
||||
/** Column name AD_OrgTrx_ID */
|
||||
public static final String COLUMNNAME_AD_OrgTrx_ID = "AD_OrgTrx_ID";
|
||||
|
||||
/** Set Trx Organization.
|
||||
* Performing or initiating organization
|
||||
*/
|
||||
public void setAD_OrgTrx_ID (int AD_OrgTrx_ID);
|
||||
|
||||
/** Get Trx Organization.
|
||||
* Performing or initiating organization
|
||||
*/
|
||||
public int getAD_OrgTrx_ID();
|
||||
|
||||
public I_AD_Org getAD_OrgTrx() throws RuntimeException;
|
||||
|
||||
/** 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_User_ID */
|
||||
public static final String COLUMNNAME_AD_User_ID = "AD_User_ID";
|
||||
|
||||
/** Set Usuario.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID);
|
||||
|
||||
/** Get Usuario.
|
||||
* User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID();
|
||||
|
||||
public I_AD_User getAD_User() throws RuntimeException;
|
||||
|
||||
/** Column name BPartnerValue */
|
||||
public static final String COLUMNNAME_BPartnerValue = "BPartnerValue";
|
||||
|
||||
/** Set Business Partner Key.
|
||||
* Key of the Business Partner
|
||||
*/
|
||||
public void setBPartnerValue (String BPartnerValue);
|
||||
|
||||
/** Get Business Partner Key.
|
||||
* Key of the Business Partner
|
||||
*/
|
||||
public String getBPartnerValue();
|
||||
|
||||
/** Column name C_BPartner_ID */
|
||||
public static final String COLUMNNAME_C_BPartner_ID = "C_BPartner_ID";
|
||||
|
||||
/** Set Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID);
|
||||
|
||||
/** Get Business Partner .
|
||||
* Identifies a Business Partner
|
||||
*/
|
||||
public int getC_BPartner_ID();
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException;
|
||||
|
||||
/** Column name C_Campaign_ID */
|
||||
public static final String COLUMNNAME_C_Campaign_ID = "C_Campaign_ID";
|
||||
|
||||
/** Set Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID);
|
||||
|
||||
/** Get Campaign.
|
||||
* Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID();
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException;
|
||||
|
||||
/** Column name C_DocType_ID */
|
||||
public static final String COLUMNNAME_C_DocType_ID = "C_DocType_ID";
|
||||
|
||||
/** Set Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID);
|
||||
|
||||
/** Get Document Type.
|
||||
* Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID();
|
||||
|
||||
public I_C_DocType getC_DocType() 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 CampaignValue */
|
||||
public static final String COLUMNNAME_CampaignValue = "CampaignValue";
|
||||
|
||||
/** Set CampaignValue */
|
||||
public void setCampaignValue (String CampaignValue);
|
||||
|
||||
/** Get CampaignValue */
|
||||
public String getCampaignValue();
|
||||
|
||||
/** Column name Created */
|
||||
public static final String COLUMNNAME_Created = "Created";
|
||||
|
||||
/** Get Created.
|
||||
* Date this record was created
|
||||
*/
|
||||
public Timestamp getCreated();
|
||||
|
||||
/** Column name CreatedBy */
|
||||
public static final String COLUMNNAME_CreatedBy = "CreatedBy";
|
||||
|
||||
/** Get Created By.
|
||||
* User who created this records
|
||||
*/
|
||||
public int getCreatedBy();
|
||||
|
||||
/** Column name DeliveryRule */
|
||||
public static final String COLUMNNAME_DeliveryRule = "DeliveryRule";
|
||||
|
||||
/** Set Delivery Rule.
|
||||
* Defines the timing of Delivery
|
||||
*/
|
||||
public void setDeliveryRule (String DeliveryRule);
|
||||
|
||||
/** Get Delivery Rule.
|
||||
* Defines the timing of Delivery
|
||||
*/
|
||||
public String getDeliveryRule();
|
||||
|
||||
/** Column name DeliveryViaRule */
|
||||
public static final String COLUMNNAME_DeliveryViaRule = "DeliveryViaRule";
|
||||
|
||||
/** Set Delivery Via.
|
||||
* How the order will be delivered
|
||||
*/
|
||||
public void setDeliveryViaRule (String DeliveryViaRule);
|
||||
|
||||
/** Get Delivery Via.
|
||||
* How the order will be delivered
|
||||
*/
|
||||
public String getDeliveryViaRule();
|
||||
|
||||
/** Column name DocTypeName */
|
||||
public static final String COLUMNNAME_DocTypeName = "DocTypeName";
|
||||
|
||||
/** Set Document Type Name.
|
||||
* Name of the Document Type
|
||||
*/
|
||||
public void setDocTypeName (String DocTypeName);
|
||||
|
||||
/** Get Document Type Name.
|
||||
* Name of the Document Type
|
||||
*/
|
||||
public String getDocTypeName();
|
||||
|
||||
/** Column name DocumentNo */
|
||||
public static final String COLUMNNAME_DocumentNo = "DocumentNo";
|
||||
|
||||
/** Set Document No.
|
||||
* Document sequence number of the document
|
||||
*/
|
||||
public void setDocumentNo (String DocumentNo);
|
||||
|
||||
/** Get Document No.
|
||||
* Document sequence number of the document
|
||||
*/
|
||||
public String getDocumentNo();
|
||||
|
||||
/** Column name FreightCostRule */
|
||||
public static final String COLUMNNAME_FreightCostRule = "FreightCostRule";
|
||||
|
||||
/** Set Freight Cost Rule.
|
||||
* Method for charging Freight
|
||||
*/
|
||||
public void setFreightCostRule (String FreightCostRule);
|
||||
|
||||
/** Get Freight Cost Rule.
|
||||
* Method for charging Freight
|
||||
*/
|
||||
public String getFreightCostRule();
|
||||
|
||||
/** Column name I_ErrorMsg */
|
||||
public static final String COLUMNNAME_I_ErrorMsg = "I_ErrorMsg";
|
||||
|
||||
/** Set Import Error Message.
|
||||
* Messages generated from import process
|
||||
*/
|
||||
public void setI_ErrorMsg (String I_ErrorMsg);
|
||||
|
||||
/** Get Import Error Message.
|
||||
* Messages generated from import process
|
||||
*/
|
||||
public String getI_ErrorMsg();
|
||||
|
||||
/** Column name I_IsImported */
|
||||
public static final String COLUMNNAME_I_IsImported = "I_IsImported";
|
||||
|
||||
/** Set Imported.
|
||||
* Has this import been processed
|
||||
*/
|
||||
public void setI_IsImported (boolean I_IsImported);
|
||||
|
||||
/** Get Imported.
|
||||
* Has this import been processed
|
||||
*/
|
||||
public boolean isI_IsImported();
|
||||
|
||||
/** Column name I_Movement_ID */
|
||||
public static final String COLUMNNAME_I_Movement_ID = "I_Movement_ID";
|
||||
|
||||
/** Set I_Movement_ID */
|
||||
public void setI_Movement_ID (int I_Movement_ID);
|
||||
|
||||
/** Get I_Movement_ID */
|
||||
public int getI_Movement_ID();
|
||||
|
||||
/** Column name IsActive */
|
||||
public static final String COLUMNNAME_IsActive = "IsActive";
|
||||
|
||||
/** Set Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public void setIsActive (boolean IsActive);
|
||||
|
||||
/** Get Active.
|
||||
* The record is active in the system
|
||||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name LocatorToValue */
|
||||
public static final String COLUMNNAME_LocatorToValue = "LocatorToValue";
|
||||
|
||||
/** Set Locator To Key */
|
||||
public void setLocatorToValue (String LocatorToValue);
|
||||
|
||||
/** Get Locator To Key */
|
||||
public String getLocatorToValue();
|
||||
|
||||
/** Column name LocatorValue */
|
||||
public static final String COLUMNNAME_LocatorValue = "LocatorValue";
|
||||
|
||||
/** Set Locator Key.
|
||||
* Key of the Warehouse Locator
|
||||
*/
|
||||
public void setLocatorValue (String LocatorValue);
|
||||
|
||||
/** Get Locator Key.
|
||||
* Key of the Warehouse Locator
|
||||
*/
|
||||
public String getLocatorValue();
|
||||
|
||||
/** Column name M_LocatorTo_ID */
|
||||
public static final String COLUMNNAME_M_LocatorTo_ID = "M_LocatorTo_ID";
|
||||
|
||||
/** Set Locator To.
|
||||
* Location inventory is moved to
|
||||
*/
|
||||
public void setM_LocatorTo_ID (int M_LocatorTo_ID);
|
||||
|
||||
/** Get Locator To.
|
||||
* Location inventory is moved to
|
||||
*/
|
||||
public int getM_LocatorTo_ID();
|
||||
|
||||
public I_M_Locator getM_LocatorTo() throws RuntimeException;
|
||||
|
||||
/** Column name M_Locator_ID */
|
||||
public static final String COLUMNNAME_M_Locator_ID = "M_Locator_ID";
|
||||
|
||||
/** Set Locator.
|
||||
* Warehouse Locator
|
||||
*/
|
||||
public void setM_Locator_ID (int M_Locator_ID);
|
||||
|
||||
/** Get Locator.
|
||||
* Warehouse Locator
|
||||
*/
|
||||
public int getM_Locator_ID();
|
||||
|
||||
public I_M_Locator getM_Locator() throws RuntimeException;
|
||||
|
||||
/** Column name M_MovementLine_ID */
|
||||
public static final String COLUMNNAME_M_MovementLine_ID = "M_MovementLine_ID";
|
||||
|
||||
/** Set Move Line.
|
||||
* Inventory Move document Line
|
||||
*/
|
||||
public void setM_MovementLine_ID (int M_MovementLine_ID);
|
||||
|
||||
/** Get Move Line.
|
||||
* Inventory Move document Line
|
||||
*/
|
||||
public int getM_MovementLine_ID();
|
||||
|
||||
public I_M_MovementLine getM_MovementLine() throws RuntimeException;
|
||||
|
||||
/** Column name M_Movement_ID */
|
||||
public static final String COLUMNNAME_M_Movement_ID = "M_Movement_ID";
|
||||
|
||||
/** Set Inventory Move.
|
||||
* Movement of Inventory
|
||||
*/
|
||||
public void setM_Movement_ID (int M_Movement_ID);
|
||||
|
||||
/** Get Inventory Move.
|
||||
* Movement of Inventory
|
||||
*/
|
||||
public int getM_Movement_ID();
|
||||
|
||||
public I_M_Movement getM_Movement() throws RuntimeException;
|
||||
|
||||
/** Column name M_Product_ID */
|
||||
public static final String COLUMNNAME_M_Product_ID = "M_Product_ID";
|
||||
|
||||
/** Set Product.
|
||||
* Product, Service, Item
|
||||
*/
|
||||
public void setM_Product_ID (int M_Product_ID);
|
||||
|
||||
/** Get Product.
|
||||
* Product, Service, Item
|
||||
*/
|
||||
public int getM_Product_ID();
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException;
|
||||
|
||||
/** Column name M_Shipper_ID */
|
||||
public static final String COLUMNNAME_M_Shipper_ID = "M_Shipper_ID";
|
||||
|
||||
/** Set Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID);
|
||||
|
||||
/** Get Shipper.
|
||||
* Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID();
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException;
|
||||
|
||||
/** Column name MovementDate */
|
||||
public static final String COLUMNNAME_MovementDate = "MovementDate";
|
||||
|
||||
/** Set Movement Date.
|
||||
* Date a product was moved in or out of inventory
|
||||
*/
|
||||
public void setMovementDate (Timestamp MovementDate);
|
||||
|
||||
/** Get Movement Date.
|
||||
* Date a product was moved in or out of inventory
|
||||
*/
|
||||
public Timestamp getMovementDate();
|
||||
|
||||
/** Column name MovementQty */
|
||||
public static final String COLUMNNAME_MovementQty = "MovementQty";
|
||||
|
||||
/** Set Movement Quantity.
|
||||
* Quantity of a product moved.
|
||||
*/
|
||||
public void setMovementQty (BigDecimal MovementQty);
|
||||
|
||||
/** Get Movement Quantity.
|
||||
* Quantity of a product moved.
|
||||
*/
|
||||
public BigDecimal getMovementQty();
|
||||
|
||||
/** Column name OrgTrxValue */
|
||||
public static final String COLUMNNAME_OrgTrxValue = "OrgTrxValue";
|
||||
|
||||
/** Set Trx Org Key.
|
||||
* Key of the Transaction Organization
|
||||
*/
|
||||
public void setOrgTrxValue (String OrgTrxValue);
|
||||
|
||||
/** Get Trx Org Key.
|
||||
* Key of the Transaction Organization
|
||||
*/
|
||||
public String getOrgTrxValue();
|
||||
|
||||
/** Column name OrgValue */
|
||||
public static final String COLUMNNAME_OrgValue = "OrgValue";
|
||||
|
||||
/** Set Org Key.
|
||||
* Key of the Organization
|
||||
*/
|
||||
public void setOrgValue (String OrgValue);
|
||||
|
||||
/** Get Org Key.
|
||||
* Key of the Organization
|
||||
*/
|
||||
public String getOrgValue();
|
||||
|
||||
/** Column name PriorityRule */
|
||||
public static final String COLUMNNAME_PriorityRule = "PriorityRule";
|
||||
|
||||
/** Set Priority.
|
||||
* Priority of a document
|
||||
*/
|
||||
public void setPriorityRule (String PriorityRule);
|
||||
|
||||
/** Get Priority.
|
||||
* Priority of a document
|
||||
*/
|
||||
public String getPriorityRule();
|
||||
|
||||
/** Column name Processed */
|
||||
public static final String COLUMNNAME_Processed = "Processed";
|
||||
|
||||
/** Set Processed.
|
||||
* The document has been processed
|
||||
*/
|
||||
public void setProcessed (boolean Processed);
|
||||
|
||||
/** Get Processed.
|
||||
* The document has been processed
|
||||
*/
|
||||
public boolean isProcessed();
|
||||
|
||||
/** Column name Processing */
|
||||
public static final String COLUMNNAME_Processing = "Processing";
|
||||
|
||||
/** Set Process Now */
|
||||
public void setProcessing (boolean Processing);
|
||||
|
||||
/** Get Process Now */
|
||||
public boolean isProcessing();
|
||||
|
||||
/** Column name ProductValue */
|
||||
public static final String COLUMNNAME_ProductValue = "ProductValue";
|
||||
|
||||
/** Set Product Key.
|
||||
* Key of the Product
|
||||
*/
|
||||
public void setProductValue (String ProductValue);
|
||||
|
||||
/** Get Product Key.
|
||||
* Key of the Product
|
||||
*/
|
||||
public String getProductValue();
|
||||
|
||||
/** Column name ProjectValue */
|
||||
public static final String COLUMNNAME_ProjectValue = "ProjectValue";
|
||||
|
||||
/** Set Project Key.
|
||||
* Key of the Project
|
||||
*/
|
||||
public void setProjectValue (String ProjectValue);
|
||||
|
||||
/** Get Project Key.
|
||||
* Key of the Project
|
||||
*/
|
||||
public String getProjectValue();
|
||||
|
||||
/** Column name ShipperName */
|
||||
public static final String COLUMNNAME_ShipperName = "ShipperName";
|
||||
|
||||
/** Set ShipperName */
|
||||
public void setShipperName (String ShipperName);
|
||||
|
||||
/** Get ShipperName */
|
||||
public String getShipperName();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
/** Get Updated.
|
||||
* Date this record was updated
|
||||
*/
|
||||
public Timestamp getUpdated();
|
||||
|
||||
/** Column name UpdatedBy */
|
||||
public static final String COLUMNNAME_UpdatedBy = "UpdatedBy";
|
||||
|
||||
/** Get Updated By.
|
||||
* User who updated this records
|
||||
*/
|
||||
public int getUpdatedBy();
|
||||
|
||||
/** Column name User1_ID */
|
||||
public static final String COLUMNNAME_User1_ID = "User1_ID";
|
||||
|
||||
/** Set User List 1.
|
||||
* User defined list element #1
|
||||
*/
|
||||
public void setUser1_ID (String User1_ID);
|
||||
|
||||
/** Get User List 1.
|
||||
* User defined list element #1
|
||||
*/
|
||||
public String getUser1_ID();
|
||||
|
||||
/** Column name User2_ID */
|
||||
public static final String COLUMNNAME_User2_ID = "User2_ID";
|
||||
|
||||
/** Set User List 2.
|
||||
* User defined list element #2
|
||||
*/
|
||||
public void setUser2_ID (String User2_ID);
|
||||
|
||||
/** Get User List 2.
|
||||
* User defined list element #2
|
||||
*/
|
||||
public String getUser2_ID();
|
||||
}
|
|
@ -0,0 +1,837 @@
|
|||
/******************************************************************************
|
||||
* 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 *
|
||||
*****************************************************************************/
|
||||
/** Generated Model - DO NOT CHANGE */
|
||||
package org.eevolution.model;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Timestamp;
|
||||
import java.util.Properties;
|
||||
import org.compiere.model.*;
|
||||
import org.compiere.util.Env;
|
||||
|
||||
/** Generated Model for I_Movement
|
||||
* @author Adempiere (generated)
|
||||
* @version Release 3.6.0LTS - $Id$ */
|
||||
public class X_I_Movement extends PO implements I_I_Movement, I_Persistent
|
||||
{
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20100620L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_I_Movement (Properties ctx, int I_Movement_ID, String trxName)
|
||||
{
|
||||
super (ctx, I_Movement_ID, trxName);
|
||||
/** if (I_Movement_ID == 0)
|
||||
{
|
||||
setI_IsImported (false);
|
||||
setI_Movement_ID (0);
|
||||
setProcessed (false);
|
||||
setProcessing (false);
|
||||
} */
|
||||
}
|
||||
|
||||
/** Load Constructor */
|
||||
public X_I_Movement (Properties ctx, ResultSet rs, String trxName)
|
||||
{
|
||||
super (ctx, rs, trxName);
|
||||
}
|
||||
|
||||
/** AccessLevel
|
||||
* @return 3 - Client - Org
|
||||
*/
|
||||
protected int get_AccessLevel()
|
||||
{
|
||||
return accessLevel.intValue();
|
||||
}
|
||||
|
||||
/** Load Meta Data */
|
||||
protected POInfo initPO (Properties ctx)
|
||||
{
|
||||
POInfo poi = POInfo.getPOInfo (ctx, Table_ID, get_TrxName());
|
||||
return poi;
|
||||
}
|
||||
|
||||
public String toString()
|
||||
{
|
||||
StringBuffer sb = new StringBuffer ("X_I_Movement[")
|
||||
.append(get_ID()).append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public I_AD_Org getAD_OrgTrx() throws RuntimeException
|
||||
{
|
||||
return (I_AD_Org)MTable.get(getCtx(), I_AD_Org.Table_Name)
|
||||
.getPO(getAD_OrgTrx_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Trx Organization.
|
||||
@param AD_OrgTrx_ID
|
||||
Performing or initiating organization
|
||||
*/
|
||||
public void setAD_OrgTrx_ID (int AD_OrgTrx_ID)
|
||||
{
|
||||
if (AD_OrgTrx_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_OrgTrx_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_OrgTrx_ID, Integer.valueOf(AD_OrgTrx_ID));
|
||||
}
|
||||
|
||||
/** Get Trx Organization.
|
||||
@return Performing or initiating organization
|
||||
*/
|
||||
public int getAD_OrgTrx_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_OrgTrx_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_AD_User getAD_User() throws RuntimeException
|
||||
{
|
||||
return (I_AD_User)MTable.get(getCtx(), I_AD_User.Table_Name)
|
||||
.getPO(getAD_User_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Usuario.
|
||||
@param AD_User_ID
|
||||
User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public void setAD_User_ID (int AD_User_ID)
|
||||
{
|
||||
if (AD_User_ID < 1)
|
||||
set_Value (COLUMNNAME_AD_User_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_AD_User_ID, Integer.valueOf(AD_User_ID));
|
||||
}
|
||||
|
||||
/** Get Usuario.
|
||||
@return User within the system - Internal or Business Partner Contact
|
||||
*/
|
||||
public int getAD_User_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_AD_User_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Business Partner Key.
|
||||
@param BPartnerValue
|
||||
Key of the Business Partner
|
||||
*/
|
||||
public void setBPartnerValue (String BPartnerValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_BPartnerValue, BPartnerValue);
|
||||
}
|
||||
|
||||
/** Get Business Partner Key.
|
||||
@return Key of the Business Partner
|
||||
*/
|
||||
public String getBPartnerValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_BPartnerValue);
|
||||
}
|
||||
|
||||
public I_C_BPartner getC_BPartner() throws RuntimeException
|
||||
{
|
||||
return (I_C_BPartner)MTable.get(getCtx(), I_C_BPartner.Table_Name)
|
||||
.getPO(getC_BPartner_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Business Partner .
|
||||
@param C_BPartner_ID
|
||||
Identifies a Business Partner
|
||||
*/
|
||||
public void setC_BPartner_ID (int C_BPartner_ID)
|
||||
{
|
||||
if (C_BPartner_ID < 1)
|
||||
set_Value (COLUMNNAME_C_BPartner_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_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(COLUMNNAME_C_BPartner_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Campaign getC_Campaign() throws RuntimeException
|
||||
{
|
||||
return (I_C_Campaign)MTable.get(getCtx(), I_C_Campaign.Table_Name)
|
||||
.getPO(getC_Campaign_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Campaign.
|
||||
@param C_Campaign_ID
|
||||
Marketing Campaign
|
||||
*/
|
||||
public void setC_Campaign_ID (int C_Campaign_ID)
|
||||
{
|
||||
if (C_Campaign_ID < 1)
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_Campaign_ID, Integer.valueOf(C_Campaign_ID));
|
||||
}
|
||||
|
||||
/** Get Campaign.
|
||||
@return Marketing Campaign
|
||||
*/
|
||||
public int getC_Campaign_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_Campaign_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_DocType getC_DocType() throws RuntimeException
|
||||
{
|
||||
return (I_C_DocType)MTable.get(getCtx(), I_C_DocType.Table_Name)
|
||||
.getPO(getC_DocType_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Document Type.
|
||||
@param C_DocType_ID
|
||||
Document type or rules
|
||||
*/
|
||||
public void setC_DocType_ID (int C_DocType_ID)
|
||||
{
|
||||
if (C_DocType_ID < 0)
|
||||
set_Value (COLUMNNAME_C_DocType_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_C_DocType_ID, Integer.valueOf(C_DocType_ID));
|
||||
}
|
||||
|
||||
/** Get Document Type.
|
||||
@return Document type or rules
|
||||
*/
|
||||
public int getC_DocType_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_C_DocType_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_C_Project getC_Project() throws RuntimeException
|
||||
{
|
||||
return (I_C_Project)MTable.get(getCtx(), I_C_Project.Table_Name)
|
||||
.getPO(getC_Project_ID(), get_TrxName()); }
|
||||
|
||||
/** 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();
|
||||
}
|
||||
|
||||
/** Set CampaignValue.
|
||||
@param CampaignValue CampaignValue */
|
||||
public void setCampaignValue (String CampaignValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_CampaignValue, CampaignValue);
|
||||
}
|
||||
|
||||
/** Get CampaignValue.
|
||||
@return CampaignValue */
|
||||
public String getCampaignValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_CampaignValue);
|
||||
}
|
||||
|
||||
/** Set Delivery Rule.
|
||||
@param DeliveryRule
|
||||
Defines the timing of Delivery
|
||||
*/
|
||||
public void setDeliveryRule (String DeliveryRule)
|
||||
{
|
||||
set_Value (COLUMNNAME_DeliveryRule, DeliveryRule);
|
||||
}
|
||||
|
||||
/** Get Delivery Rule.
|
||||
@return Defines the timing of Delivery
|
||||
*/
|
||||
public String getDeliveryRule ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DeliveryRule);
|
||||
}
|
||||
|
||||
/** Set Delivery Via.
|
||||
@param DeliveryViaRule
|
||||
How the order will be delivered
|
||||
*/
|
||||
public void setDeliveryViaRule (String DeliveryViaRule)
|
||||
{
|
||||
set_Value (COLUMNNAME_DeliveryViaRule, DeliveryViaRule);
|
||||
}
|
||||
|
||||
/** Get Delivery Via.
|
||||
@return How the order will be delivered
|
||||
*/
|
||||
public String getDeliveryViaRule ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DeliveryViaRule);
|
||||
}
|
||||
|
||||
/** Set Document Type Name.
|
||||
@param DocTypeName
|
||||
Name of the Document Type
|
||||
*/
|
||||
public void setDocTypeName (String DocTypeName)
|
||||
{
|
||||
set_Value (COLUMNNAME_DocTypeName, DocTypeName);
|
||||
}
|
||||
|
||||
/** Get Document Type Name.
|
||||
@return Name of the Document Type
|
||||
*/
|
||||
public String getDocTypeName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocTypeName);
|
||||
}
|
||||
|
||||
/** Set Document No.
|
||||
@param DocumentNo
|
||||
Document sequence number of the document
|
||||
*/
|
||||
public void setDocumentNo (String DocumentNo)
|
||||
{
|
||||
set_Value (COLUMNNAME_DocumentNo, DocumentNo);
|
||||
}
|
||||
|
||||
/** Get Document No.
|
||||
@return Document sequence number of the document
|
||||
*/
|
||||
public String getDocumentNo ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_DocumentNo);
|
||||
}
|
||||
|
||||
/** Set Freight Cost Rule.
|
||||
@param FreightCostRule
|
||||
Method for charging Freight
|
||||
*/
|
||||
public void setFreightCostRule (String FreightCostRule)
|
||||
{
|
||||
set_Value (COLUMNNAME_FreightCostRule, FreightCostRule);
|
||||
}
|
||||
|
||||
/** Get Freight Cost Rule.
|
||||
@return Method for charging Freight
|
||||
*/
|
||||
public String getFreightCostRule ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_FreightCostRule);
|
||||
}
|
||||
|
||||
/** Set Import Error Message.
|
||||
@param I_ErrorMsg
|
||||
Messages generated from import process
|
||||
*/
|
||||
public void setI_ErrorMsg (String I_ErrorMsg)
|
||||
{
|
||||
set_Value (COLUMNNAME_I_ErrorMsg, I_ErrorMsg);
|
||||
}
|
||||
|
||||
/** Get Import Error Message.
|
||||
@return Messages generated from import process
|
||||
*/
|
||||
public String getI_ErrorMsg ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_I_ErrorMsg);
|
||||
}
|
||||
|
||||
/** Set Imported.
|
||||
@param I_IsImported
|
||||
Has this import been processed
|
||||
*/
|
||||
public void setI_IsImported (boolean I_IsImported)
|
||||
{
|
||||
set_Value (COLUMNNAME_I_IsImported, Boolean.valueOf(I_IsImported));
|
||||
}
|
||||
|
||||
/** Get Imported.
|
||||
@return Has this import been processed
|
||||
*/
|
||||
public boolean isI_IsImported ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_I_IsImported);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set I_Movement_ID.
|
||||
@param I_Movement_ID I_Movement_ID */
|
||||
public void setI_Movement_ID (int I_Movement_ID)
|
||||
{
|
||||
if (I_Movement_ID < 1)
|
||||
set_ValueNoCheck (COLUMNNAME_I_Movement_ID, null);
|
||||
else
|
||||
set_ValueNoCheck (COLUMNNAME_I_Movement_ID, Integer.valueOf(I_Movement_ID));
|
||||
}
|
||||
|
||||
/** Get I_Movement_ID.
|
||||
@return I_Movement_ID */
|
||||
public int getI_Movement_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_I_Movement_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Locator To Key.
|
||||
@param LocatorToValue Locator To Key */
|
||||
public void setLocatorToValue (String LocatorToValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_LocatorToValue, LocatorToValue);
|
||||
}
|
||||
|
||||
/** Get Locator To Key.
|
||||
@return Locator To Key */
|
||||
public String getLocatorToValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_LocatorToValue);
|
||||
}
|
||||
|
||||
/** Set Locator Key.
|
||||
@param LocatorValue
|
||||
Key of the Warehouse Locator
|
||||
*/
|
||||
public void setLocatorValue (String LocatorValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_LocatorValue, LocatorValue);
|
||||
}
|
||||
|
||||
/** Get Locator Key.
|
||||
@return Key of the Warehouse Locator
|
||||
*/
|
||||
public String getLocatorValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_LocatorValue);
|
||||
}
|
||||
|
||||
public I_M_Locator getM_LocatorTo() throws RuntimeException
|
||||
{
|
||||
return (I_M_Locator)MTable.get(getCtx(), I_M_Locator.Table_Name)
|
||||
.getPO(getM_LocatorTo_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Locator To.
|
||||
@param M_LocatorTo_ID
|
||||
Location inventory is moved to
|
||||
*/
|
||||
public void setM_LocatorTo_ID (int M_LocatorTo_ID)
|
||||
{
|
||||
if (M_LocatorTo_ID < 1)
|
||||
set_Value (COLUMNNAME_M_LocatorTo_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_LocatorTo_ID, Integer.valueOf(M_LocatorTo_ID));
|
||||
}
|
||||
|
||||
/** Get Locator To.
|
||||
@return Location inventory is moved to
|
||||
*/
|
||||
public int getM_LocatorTo_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_LocatorTo_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Locator getM_Locator() throws RuntimeException
|
||||
{
|
||||
return (I_M_Locator)MTable.get(getCtx(), I_M_Locator.Table_Name)
|
||||
.getPO(getM_Locator_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Locator.
|
||||
@param M_Locator_ID
|
||||
Warehouse Locator
|
||||
*/
|
||||
public void setM_Locator_ID (int M_Locator_ID)
|
||||
{
|
||||
if (M_Locator_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Locator_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Locator_ID, Integer.valueOf(M_Locator_ID));
|
||||
}
|
||||
|
||||
/** Get Locator.
|
||||
@return Warehouse Locator
|
||||
*/
|
||||
public int getM_Locator_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Locator_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_MovementLine getM_MovementLine() throws RuntimeException
|
||||
{
|
||||
return (I_M_MovementLine)MTable.get(getCtx(), I_M_MovementLine.Table_Name)
|
||||
.getPO(getM_MovementLine_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Move Line.
|
||||
@param M_MovementLine_ID
|
||||
Inventory Move document Line
|
||||
*/
|
||||
public void setM_MovementLine_ID (int M_MovementLine_ID)
|
||||
{
|
||||
if (M_MovementLine_ID < 1)
|
||||
set_Value (COLUMNNAME_M_MovementLine_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_MovementLine_ID, Integer.valueOf(M_MovementLine_ID));
|
||||
}
|
||||
|
||||
/** Get Move Line.
|
||||
@return Inventory Move document Line
|
||||
*/
|
||||
public int getM_MovementLine_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_MovementLine_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Movement getM_Movement() throws RuntimeException
|
||||
{
|
||||
return (I_M_Movement)MTable.get(getCtx(), I_M_Movement.Table_Name)
|
||||
.getPO(getM_Movement_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Inventory Move.
|
||||
@param M_Movement_ID
|
||||
Movement of Inventory
|
||||
*/
|
||||
public void setM_Movement_ID (int M_Movement_ID)
|
||||
{
|
||||
if (M_Movement_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Movement_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Movement_ID, Integer.valueOf(M_Movement_ID));
|
||||
}
|
||||
|
||||
/** Get Inventory Move.
|
||||
@return Movement of Inventory
|
||||
*/
|
||||
public int getM_Movement_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Movement_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Product getM_Product() throws RuntimeException
|
||||
{
|
||||
return (I_M_Product)MTable.get(getCtx(), I_M_Product.Table_Name)
|
||||
.getPO(getM_Product_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Product.
|
||||
@param M_Product_ID
|
||||
Product, Service, Item
|
||||
*/
|
||||
public void setM_Product_ID (int M_Product_ID)
|
||||
{
|
||||
if (M_Product_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Product_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Product_ID, Integer.valueOf(M_Product_ID));
|
||||
}
|
||||
|
||||
/** Get Product.
|
||||
@return Product, Service, Item
|
||||
*/
|
||||
public int getM_Product_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Product_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
public I_M_Shipper getM_Shipper() throws RuntimeException
|
||||
{
|
||||
return (I_M_Shipper)MTable.get(getCtx(), I_M_Shipper.Table_Name)
|
||||
.getPO(getM_Shipper_ID(), get_TrxName()); }
|
||||
|
||||
/** Set Shipper.
|
||||
@param M_Shipper_ID
|
||||
Method or manner of product delivery
|
||||
*/
|
||||
public void setM_Shipper_ID (int M_Shipper_ID)
|
||||
{
|
||||
if (M_Shipper_ID < 1)
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, null);
|
||||
else
|
||||
set_Value (COLUMNNAME_M_Shipper_ID, Integer.valueOf(M_Shipper_ID));
|
||||
}
|
||||
|
||||
/** Get Shipper.
|
||||
@return Method or manner of product delivery
|
||||
*/
|
||||
public int getM_Shipper_ID ()
|
||||
{
|
||||
Integer ii = (Integer)get_Value(COLUMNNAME_M_Shipper_ID);
|
||||
if (ii == null)
|
||||
return 0;
|
||||
return ii.intValue();
|
||||
}
|
||||
|
||||
/** Set Movement Date.
|
||||
@param MovementDate
|
||||
Date a product was moved in or out of inventory
|
||||
*/
|
||||
public void setMovementDate (Timestamp MovementDate)
|
||||
{
|
||||
set_Value (COLUMNNAME_MovementDate, MovementDate);
|
||||
}
|
||||
|
||||
/** Get Movement Date.
|
||||
@return Date a product was moved in or out of inventory
|
||||
*/
|
||||
public Timestamp getMovementDate ()
|
||||
{
|
||||
return (Timestamp)get_Value(COLUMNNAME_MovementDate);
|
||||
}
|
||||
|
||||
/** Set Movement Quantity.
|
||||
@param MovementQty
|
||||
Quantity of a product moved.
|
||||
*/
|
||||
public void setMovementQty (BigDecimal MovementQty)
|
||||
{
|
||||
set_Value (COLUMNNAME_MovementQty, MovementQty);
|
||||
}
|
||||
|
||||
/** Get Movement Quantity.
|
||||
@return Quantity of a product moved.
|
||||
*/
|
||||
public BigDecimal getMovementQty ()
|
||||
{
|
||||
BigDecimal bd = (BigDecimal)get_Value(COLUMNNAME_MovementQty);
|
||||
if (bd == null)
|
||||
return Env.ZERO;
|
||||
return bd;
|
||||
}
|
||||
|
||||
/** Set Trx Org Key.
|
||||
@param OrgTrxValue
|
||||
Key of the Transaction Organization
|
||||
*/
|
||||
public void setOrgTrxValue (String OrgTrxValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_OrgTrxValue, OrgTrxValue);
|
||||
}
|
||||
|
||||
/** Get Trx Org Key.
|
||||
@return Key of the Transaction Organization
|
||||
*/
|
||||
public String getOrgTrxValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_OrgTrxValue);
|
||||
}
|
||||
|
||||
/** Set Org Key.
|
||||
@param OrgValue
|
||||
Key of the Organization
|
||||
*/
|
||||
public void setOrgValue (String OrgValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_OrgValue, OrgValue);
|
||||
}
|
||||
|
||||
/** Get Org Key.
|
||||
@return Key of the Organization
|
||||
*/
|
||||
public String getOrgValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_OrgValue);
|
||||
}
|
||||
|
||||
/** Set Priority.
|
||||
@param PriorityRule
|
||||
Priority of a document
|
||||
*/
|
||||
public void setPriorityRule (String PriorityRule)
|
||||
{
|
||||
set_Value (COLUMNNAME_PriorityRule, PriorityRule);
|
||||
}
|
||||
|
||||
/** Get Priority.
|
||||
@return Priority of a document
|
||||
*/
|
||||
public String getPriorityRule ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_PriorityRule);
|
||||
}
|
||||
|
||||
/** Set Processed.
|
||||
@param Processed
|
||||
The document has been processed
|
||||
*/
|
||||
public void setProcessed (boolean Processed)
|
||||
{
|
||||
set_Value (COLUMNNAME_Processed, Boolean.valueOf(Processed));
|
||||
}
|
||||
|
||||
/** Get Processed.
|
||||
@return The document has been processed
|
||||
*/
|
||||
public boolean isProcessed ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Processed);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Process Now.
|
||||
@param Processing Process Now */
|
||||
public void setProcessing (boolean Processing)
|
||||
{
|
||||
set_Value (COLUMNNAME_Processing, Boolean.valueOf(Processing));
|
||||
}
|
||||
|
||||
/** Get Process Now.
|
||||
@return Process Now */
|
||||
public boolean isProcessing ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_Processing);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Product Key.
|
||||
@param ProductValue
|
||||
Key of the Product
|
||||
*/
|
||||
public void setProductValue (String ProductValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_ProductValue, ProductValue);
|
||||
}
|
||||
|
||||
/** Get Product Key.
|
||||
@return Key of the Product
|
||||
*/
|
||||
public String getProductValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_ProductValue);
|
||||
}
|
||||
|
||||
/** Set Project Key.
|
||||
@param ProjectValue
|
||||
Key of the Project
|
||||
*/
|
||||
public void setProjectValue (String ProjectValue)
|
||||
{
|
||||
set_Value (COLUMNNAME_ProjectValue, ProjectValue);
|
||||
}
|
||||
|
||||
/** Get Project Key.
|
||||
@return Key of the Project
|
||||
*/
|
||||
public String getProjectValue ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_ProjectValue);
|
||||
}
|
||||
|
||||
/** Set ShipperName.
|
||||
@param ShipperName ShipperName */
|
||||
public void setShipperName (String ShipperName)
|
||||
{
|
||||
set_Value (COLUMNNAME_ShipperName, ShipperName);
|
||||
}
|
||||
|
||||
/** Get ShipperName.
|
||||
@return ShipperName */
|
||||
public String getShipperName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_ShipperName);
|
||||
}
|
||||
|
||||
/** Set User List 1.
|
||||
@param User1_ID
|
||||
User defined list element #1
|
||||
*/
|
||||
public void setUser1_ID (String User1_ID)
|
||||
{
|
||||
set_Value (COLUMNNAME_User1_ID, User1_ID);
|
||||
}
|
||||
|
||||
/** Get User List 1.
|
||||
@return User defined list element #1
|
||||
*/
|
||||
public String getUser1_ID ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_User1_ID);
|
||||
}
|
||||
|
||||
/** Set User List 2.
|
||||
@param User2_ID
|
||||
User defined list element #2
|
||||
*/
|
||||
public void setUser2_ID (String User2_ID)
|
||||
{
|
||||
set_Value (COLUMNNAME_User2_ID, User2_ID);
|
||||
}
|
||||
|
||||
/** Get User List 2.
|
||||
@return User defined list element #2
|
||||
*/
|
||||
public String getUser2_ID ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_User2_ID);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,423 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution *
|
||||
* Copyright (C) 1999-2006 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 *
|
||||
* Contributor: Victor Perez, www.e-evolution.com *
|
||||
*****************************************************************************/
|
||||
package org.eevolution.process;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
|
||||
import org.compiere.model.I_M_Movement;
|
||||
import org.compiere.model.I_M_MovementLine;
|
||||
import org.compiere.model.MBPartner;
|
||||
import org.compiere.model.MCampaign;
|
||||
import org.compiere.model.MColumn;
|
||||
import org.compiere.model.MDocType;
|
||||
import org.compiere.model.MLocator;
|
||||
import org.compiere.model.MMovement;
|
||||
import org.compiere.model.MMovementLine;
|
||||
import org.compiere.model.MOrg;
|
||||
import org.compiere.model.MProduct;
|
||||
import org.compiere.model.MProject;
|
||||
import org.compiere.model.MShipper;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.Query;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.DB;
|
||||
import org.compiere.util.Env;
|
||||
import org.compiere.util.Msg;
|
||||
import org.eevolution.model.I_I_Movement;
|
||||
import org.eevolution.model.X_I_Movement;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Import Inventory Movement from I_M_Movemen
|
||||
*
|
||||
* @author Alberto Juarez Caballero, alberto.juarez@e-evolution.com, www.e-evolution.com
|
||||
* @author victor.perez@e-evolution.com, www.e-evolution.com
|
||||
* @version $Id: ImportInventoryMovement.java,v 1.0
|
||||
*/
|
||||
|
||||
public class ImportInventoryMove extends SvrProcess
|
||||
{
|
||||
|
||||
private boolean m_DeleteOldImported = false;
|
||||
|
||||
private boolean m_IsImportOnlyNoErrors = true;
|
||||
|
||||
private String m_docAction = MMovement.DOCACTION_Prepare;
|
||||
|
||||
private boolean isImported = false;
|
||||
|
||||
private int imported = 0;
|
||||
|
||||
private int notimported = 0;
|
||||
|
||||
private List<String> idsPr = new ArrayList<String>();
|
||||
|
||||
/**
|
||||
* Prepare - e.g., get Parameters.
|
||||
*/
|
||||
protected void prepare()
|
||||
{
|
||||
ProcessInfoParameter[] parameters = getParameter();
|
||||
for (ProcessInfoParameter para: parameters)
|
||||
{
|
||||
String name = para.getParameterName();
|
||||
if (para.getParameter() == null)
|
||||
;
|
||||
|
||||
else if (name.equals("IsImportOnlyNoErrors"))
|
||||
m_IsImportOnlyNoErrors = "Y".equals(para.getParameter());
|
||||
else if (name.equals("DeleteOldImported"))
|
||||
m_DeleteOldImported = "Y".equals(para.getParameter());
|
||||
else if (name.equals("DocAction"))
|
||||
m_docAction = (String)para.getParameter();
|
||||
else
|
||||
log.log(Level.SEVERE, "Unknown Parameter: " + name);
|
||||
}
|
||||
} // prepare
|
||||
|
||||
|
||||
/**
|
||||
* Perform process.
|
||||
* @return Message
|
||||
* @throws Exception
|
||||
*/
|
||||
protected String doIt() throws java.lang.Exception
|
||||
{
|
||||
|
||||
// Delete Old Imported
|
||||
StringBuffer sql = null;
|
||||
if (m_DeleteOldImported)
|
||||
{
|
||||
int no = 0;
|
||||
for (X_I_Movement move : getRecords(true,false))
|
||||
{
|
||||
move.deleteEx(true);
|
||||
no++;
|
||||
}
|
||||
log.fine("Delete Old Impored =" + no);
|
||||
}
|
||||
|
||||
fillIDValues();
|
||||
importRecords();
|
||||
return "Imported: " + imported + ", Not imported: " + notimported;
|
||||
} // doIt
|
||||
|
||||
|
||||
/**
|
||||
* import records using I_M_Movement table
|
||||
*/
|
||||
|
||||
private void importRecords()
|
||||
{
|
||||
isImported = false;
|
||||
|
||||
for(X_I_Movement imove : getRecords(false,m_IsImportOnlyNoErrors))
|
||||
{
|
||||
MMovement mov = importMInventoryMove(imove);
|
||||
if(mov!= null)
|
||||
{
|
||||
isImported = importMInventoryMoveLine(mov,imove);
|
||||
}
|
||||
else
|
||||
{
|
||||
isImported = false;
|
||||
}
|
||||
|
||||
if(isImported)
|
||||
{
|
||||
imove.setM_Movement_ID(mov.getM_Movement_ID());
|
||||
imove.setI_IsImported(true);
|
||||
imove.setProcessed(true);
|
||||
imove.saveEx();
|
||||
imported++;
|
||||
|
||||
//mov.processIt(m_docAction);
|
||||
addForProcess(mov.getM_Movement_ID());
|
||||
mov.saveEx();
|
||||
}
|
||||
else
|
||||
{
|
||||
imove.setI_IsImported(false);
|
||||
imove.setProcessed(true);
|
||||
imove.saveEx();
|
||||
notimported++;
|
||||
}
|
||||
}
|
||||
processAll();
|
||||
}
|
||||
|
||||
private void addForProcess(int id)
|
||||
{
|
||||
String ids = String.valueOf(id);
|
||||
boolean enc = false;
|
||||
for(String idx : idsPr)
|
||||
{
|
||||
if(idx.equals(ids))
|
||||
enc=true;
|
||||
}
|
||||
if(!enc)
|
||||
idsPr.add(ids);
|
||||
}
|
||||
|
||||
private void processAll()
|
||||
{
|
||||
for(String idx : idsPr)
|
||||
{
|
||||
int id = Integer.parseInt(idx);
|
||||
MMovement move = new MMovement(Env.getCtx(), id, get_TrxName());
|
||||
move.processIt(m_docAction);
|
||||
move.saveEx();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Import Inventory Move Line using X_I_M_Movement table
|
||||
* @param move MMovement
|
||||
* @param imove X_I_M_Movement
|
||||
* @return isImported
|
||||
*/
|
||||
private boolean importMInventoryMoveLine(MMovement move, X_I_Movement imove)
|
||||
{
|
||||
isImported = false;
|
||||
|
||||
MMovementLine moveLine = getMInventoryMoveLine(move, imove);
|
||||
|
||||
if(moveLine == null)
|
||||
{
|
||||
moveLine = new MMovementLine(Env.getCtx(), 0 , get_TrxName());
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
moveLine.setM_Movement_ID(move.getM_Movement_ID());
|
||||
moveLine.setAD_Org_ID(imove.getAD_Org_ID());
|
||||
moveLine.setM_Product_ID(imove.getM_Product_ID());
|
||||
moveLine.setM_Locator_ID(imove.getM_Locator_ID());
|
||||
moveLine.setM_LocatorTo_ID(imove.getM_LocatorTo_ID());
|
||||
moveLine.setMovementQty(imove.getMovementQty());
|
||||
moveLine.saveEx();
|
||||
imove.setM_MovementLine_ID(moveLine.getM_MovementLine_ID());
|
||||
imove.saveEx();
|
||||
isImported = true;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
imove.setI_ErrorMsg(e.getMessage());
|
||||
isImported = false;
|
||||
}
|
||||
|
||||
return isImported;
|
||||
}
|
||||
|
||||
/**
|
||||
* get MMovementLine unique instance based on X_I_M_Movement data
|
||||
* @param move MMovement
|
||||
* @param imove X_I_M_Movement
|
||||
* @return unique instance of MMovementLine
|
||||
*/
|
||||
private MMovementLine getMInventoryMoveLine(MMovement move, X_I_Movement imove)
|
||||
{
|
||||
|
||||
final StringBuffer whereClause = new StringBuffer();
|
||||
ArrayList<Object> parameters = new ArrayList();
|
||||
|
||||
MColumn[] cols = getMInventoryMoveColumns();
|
||||
|
||||
int count = 0;
|
||||
|
||||
for(MColumn col: cols)
|
||||
{
|
||||
if(X_I_Movement.COLUMNNAME_AD_Org_ID.equals(col.getColumnName())
|
||||
|| X_I_Movement.COLUMNNAME_M_Product_ID.equals(col.getColumnName())
|
||||
|| X_I_Movement.COLUMNNAME_M_Locator_ID .equals(col.getColumnName())
|
||||
|| X_I_Movement.COLUMNNAME_M_LocatorTo_ID.equals(col.getColumnName()))
|
||||
{
|
||||
whereClause.append(col.getColumnName()).append("=?");
|
||||
parameters.add(imove.get_Value(col.getColumnName()));
|
||||
if(count < 3)
|
||||
{
|
||||
whereClause.append(" AND ");
|
||||
count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
whereClause.append(" AND M_Movement_ID=?");
|
||||
parameters.add(move.getM_Movement_ID());
|
||||
|
||||
return new Query(getCtx(), I_M_MovementLine.Table_Name, whereClause.toString(), get_TrxName())
|
||||
.setClient_ID()
|
||||
.setParameters(parameters)
|
||||
.first();
|
||||
}
|
||||
|
||||
/**
|
||||
* get Inventory Move Columns
|
||||
* @return array MColumn
|
||||
*/
|
||||
private MColumn[] getMInventoryMoveColumns()
|
||||
{
|
||||
return MTable.get(getCtx(),I_M_MovementLine.Table_Name).getColumns(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Import Inventory Move using X_I_M_Movement table
|
||||
* @param imove X_I_M_Movement
|
||||
* @return MMovement
|
||||
*/
|
||||
|
||||
private MMovement importMInventoryMove(X_I_Movement imove)
|
||||
{
|
||||
final String whereClause = I_M_Movement.COLUMNNAME_MovementDate + "= ? AND "
|
||||
+ I_M_Movement.COLUMNNAME_DocumentNo + "=? AND "
|
||||
+ I_M_Movement.COLUMNNAME_C_DocType_ID+"=?";
|
||||
int oldID = new Query(Env.getCtx(), I_M_Movement.Table_Name,whereClause, get_TrxName())
|
||||
.setClient_ID()
|
||||
.setParameters(imove.getMovementDate(), imove.getDocumentNo(), imove.getC_DocType_ID())
|
||||
.firstId();
|
||||
|
||||
MMovement move = null;
|
||||
if(oldID<=0)
|
||||
{
|
||||
oldID = 0;
|
||||
}
|
||||
|
||||
move = new MMovement(Env.getCtx(), oldID, get_TrxName());
|
||||
|
||||
try{
|
||||
move.setDocumentNo(imove.getDocumentNo());
|
||||
move.setC_DocType_ID(imove.getC_DocType_ID());
|
||||
move.setAD_Org_ID(imove.getAD_Org_ID());
|
||||
move.setMovementDate(imove.getMovementDate());
|
||||
move.setC_DocType_ID(imove.getC_DocType_ID());
|
||||
move.setDocumentNo(imove.getDocumentNo());
|
||||
move.setC_BPartner_ID(imove.getC_BPartner_ID());
|
||||
move.setM_Shipper_ID(imove.getM_Shipper_ID());
|
||||
move.setC_Project_ID(imove.getC_Project_ID());
|
||||
move.setC_Campaign_ID(imove.getC_Campaign_ID());
|
||||
move.setAD_OrgTrx_ID(imove.getAD_OrgTrx_ID());
|
||||
move.saveEx();
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
imove.setI_ErrorMsg(e.getMessage());
|
||||
isImported = false;
|
||||
}
|
||||
|
||||
return move;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* fill IDs values based on Search Key
|
||||
*/
|
||||
private void fillIDValues()
|
||||
{
|
||||
for(X_I_Movement imove : getRecords(false, m_IsImportOnlyNoErrors))
|
||||
{
|
||||
//if(imov.getAD_Org_ID()==0)
|
||||
imove.setAD_Org_ID(getID(MOrg.Table_Name,"Value = ?", new Object[]{imove.getOrgValue()}));
|
||||
if(imove.getM_Product_ID()==0)
|
||||
imove.setM_Product_ID(getID(MProduct.Table_Name,"Value = ?", new Object[]{imove.getProductValue()}));
|
||||
//if(imov.getM_Locator_ID()==0)
|
||||
imove.setM_Locator_ID(getID(MLocator.Table_Name,"Value = ?", new Object[]{imove.getLocatorValue()}));
|
||||
//if(imov.getM_LocatorTo_ID()==0)
|
||||
imove.setM_LocatorTo_ID(getID(MLocator.Table_Name,"Value = ?", new Object[]{imove.getLocatorToValue()}));
|
||||
if(imove.getC_DocType_ID()==0)
|
||||
imove.setC_DocType_ID(getID(MDocType.Table_Name,"Name=?", new Object[]{imove.getDocTypeName()}));
|
||||
if(imove.getC_BPartner_ID()==0)
|
||||
imove.setC_BPartner_ID(getID(MBPartner.Table_Name,"Value =?", new Object[]{imove.getBPartnerValue()}));
|
||||
if(imove.getM_Shipper_ID()==0)
|
||||
imove.setM_Shipper_ID(getID(MShipper.Table_Name, "Name = ?", new Object[]{imove.getShipperName()}));
|
||||
if(imove.getC_Project_ID()==0)
|
||||
imove.setC_Project_ID(getID(MProject.Table_Name, "Value = ?", new Object[]{imove.getProjectValue()}));
|
||||
if(imove.getC_Campaign_ID()==0)
|
||||
imove.setC_Campaign_ID(getID(MCampaign.Table_Name, "Value = ?", new Object[]{imove.getCampaignValue()}));
|
||||
if(imove.getAD_OrgTrx_ID()==0)
|
||||
imove.setAD_OrgTrx_ID(getID(MOrg.Table_Name, "Value = ?", new Object[]{imove.getOrgTrxValue()}));
|
||||
|
||||
|
||||
imove.saveEx();
|
||||
|
||||
StringBuffer err = new StringBuffer("");
|
||||
if(imove.getAD_Org_ID() <=0)
|
||||
err.append(" @AD_Org_ID@ @NotFound@,");
|
||||
|
||||
if(imove.getM_Product_ID()<=0)
|
||||
err.append(" @M_Product_ID@ @NotFound@,");
|
||||
|
||||
if(imove.getM_Locator_ID()<=0)
|
||||
err.append(" @M_Locator_ID@ @NotFound@,");
|
||||
|
||||
if(imove.getM_LocatorTo_ID()<=0)
|
||||
err.append(" @M_LocatorTo_ID@ @NotFound@,");
|
||||
|
||||
if(imove.getC_DocType_ID()<=0)
|
||||
err.append(" @C_DocType_ID@ @NotFound@,");
|
||||
|
||||
if(err.toString()!=null && err.toString().length()>0)
|
||||
{
|
||||
notimported++;
|
||||
imove.setI_ErrorMsg(Msg.parseTranslation(getCtx(), err.toString()));
|
||||
imove.saveEx();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* get a record's ID
|
||||
* @param tableName String
|
||||
* @param whereClause String
|
||||
* @param values Object[]
|
||||
* @return unique record's ID in the table
|
||||
*/
|
||||
private int getID(String tableName, String whereClause, Object[] values)
|
||||
{
|
||||
return new Query(getCtx(),tableName,whereClause,get_TrxName())
|
||||
.setParameters(values).firstId();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* get all records in X_I_ProductPlanning table
|
||||
* @param imported boolean
|
||||
* @param isWithError boolean
|
||||
* @return collection of X_I_ProductPlanning records
|
||||
*/
|
||||
private Collection<X_I_Movement> getRecords(boolean imported, boolean isWithError)
|
||||
{
|
||||
final StringBuffer whereClause = new StringBuffer(X_I_Movement.COLUMNNAME_I_IsImported)
|
||||
.append("=?");
|
||||
|
||||
if(isWithError)
|
||||
{
|
||||
whereClause.append(" AND ").append(X_I_Movement.COLUMNNAME_I_ErrorMsg).append(" IS NULL");
|
||||
}
|
||||
|
||||
return new Query(getCtx(),X_I_Movement.Table_Name,whereClause.toString(),get_TrxName())
|
||||
.setClient_ID()
|
||||
.setParameters(imported)
|
||||
.list();
|
||||
}
|
||||
} // Import Inventory Move
|
|
@ -0,0 +1,2 @@
|
|||
"Organization","ProductKey","LocatorFrom","LocatorTo","MovementQty","MovementDate","DocTypeName","DocumenNo"
|
||||
"HQ","Elm","Default HQ Locator","Store East",38,20100624,"Material Movement",1000000
|
|
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