Compiere 3.1

org.compiere.model
Class MInOutLine

java.lang.Object
  extended by org.compiere.framework.PO
      extended by org.compiere.model.X_M_InOutLine
          extended by org.compiere.model.MInOutLine
All Implemented Interfaces:
Serializable, Cloneable, Comparator<PO>, Evaluatee

public class MInOutLine
extends X_M_InOutLine

InOut Line

Version:
$Id: MInOutLine.java,v 1.5 2006/07/30 00:51:03 jjanke Exp $
Author:
Jorg Janke
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.compiere.model.X_M_InOutLine
accessLevel, AD_ORGTRX_ID_AD_Reference_ID, LINEDOCSTATUS_AD_Reference_ID, LINEDOCSTATUS_Approved, LINEDOCSTATUS_Closed, LINEDOCSTATUS_Completed, LINEDOCSTATUS_Drafted, LINEDOCSTATUS_InProgress, LINEDOCSTATUS_Invalid, LINEDOCSTATUS_NotApproved, LINEDOCSTATUS_Reversed, LINEDOCSTATUS_Unknown, LINEDOCSTATUS_Voided, LINEDOCSTATUS_WaitingConfirmation, LINEDOCSTATUS_WaitingPayment, Model, ORIG_ORDERLINE_ID_AD_Reference_ID, Table_ID, Table_Name, updatedMS, USER1_ID_AD_Reference_ID, USER2_ID_AD_Reference_ID
 
Fields inherited from class org.compiere.framework.PO
ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_changeVO, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
 
Constructor Summary
MInOutLine(Ctx ctx, int M_InOutLine_ID, String trxName)
          Standard Constructor
MInOutLine(Ctx ctx, ResultSet rs, String trxName)
          Load Constructor
MInOutLine(MInOut inout)
          Parent Constructor
 
Method Summary
 void addDescription(String description)
          Add to Description
protected  boolean beforeDelete()
          Before Delete
protected  boolean beforeSave(boolean newRecord)
          Before Save
static MInOutLine[] get(Ctx ctx, int C_OrderLine_ID, String trxName)
          Get Ship lines Of Order Line
 int getAD_OrgTrx_ID()
          Get AD_OrgTrx_ID
 BigDecimal getBase(String CostDistribution)
          Get Base value for Cost Distribution
 int getC_Activity_ID()
          Get C_Activity_ID
 int getC_Campaign_ID()
          Get C_Campaign_ID
 int getC_Project_ID()
          Get C_Project_ID
 int getM_Warehouse_ID()
          Get Warehouse
 MMatchInv[] getMatchInv()
          Get Match Inv
 BigDecimal getMatchInvDifference()
          Get Match Inv Difference
 MMatchPO[] getMatchPO()
          Get Match POs
 BigDecimal getMatchPODifference()
          Get Match PO Difference
static MInOutLine[] getOfOrderLine(Ctx ctx, int C_OrderLine_ID, String where, String trxName)
          Get Ship lines Of Order Line
 MInOut getParent()
          Get Parent
 MProduct getProduct()
          Get Product
 int getUser1_ID()
          Get User2_ID
 int getUser2_ID()
          Get User2_ID
 boolean isMatchInvPosted()
          Is Match Inv posted
 boolean isMatchPOPosted()
          Is Match PO posted
 void setC_OrderLine_ID(String oldC_OrderLine_ID, String newC_OrderLine_ID, int windowNo)
          Set Order Line - Callout
 void setC_UOM_ID(String oldC_UOM_ID, String newC_UOM_ID, int windowNo)
          Set UOM - Callout
 void setInvoiceLine(MInvoiceLine iLine, int M_Locator_ID, BigDecimal Qty)
          Set Invoice Line.
 void setM_AttributeSetInstance_ID(String oldM_AttributeSetInstance_ID, String newM_AttributeSetInstance_ID, int windowNo)
          Set Product - Callout
 void setM_Locator_ID(BigDecimal Qty)
          Set (default) Locator based on qty.
 void setM_Locator_ID(int M_Locator_ID)
          Set M_Locator_ID
 void setM_Product_ID(int M_Product_ID, boolean setUOM)
          Set M_Product_ID
 void setM_Product_ID(int M_Product_ID, int C_UOM_ID)
          Set Product and UOM
 void setM_Product_ID(String oldM_Product_ID, String newM_Product_ID, int windowNo)
          Set Product - Callout
 void setM_Warehouse_ID(int warehouse_ID)
          Set Warehouse
 void setMovementQty(BigDecimal MovementQty)
          Set Movement Qty - enforce Product UOM
 void setMovementQty(String oldMovementQty, String newMovementQty, int windowNo)
          Set MovementQty - Callout
 void setOrderLine(MOrderLine oLine, int M_Locator_ID, BigDecimal Qty)
          Set Order Line.
 void setProduct(MProduct product)
          Set Product
 void setQty(BigDecimal Qty)
          Set Movement/Movement Qty
 void setQtyEntered(BigDecimal QtyEntered)
          Set Qty Entered - enforce entered UOM
 void setQtyEntered(String oldQtyEntered, String newQtyEntered, int windowNo)
          Set QtyEntered - Callout
 String toString()
          String Representation
 
Methods inherited from class org.compiere.model.X_M_InOutLine
get_AccessLevel, getC_Charge_ID, getC_OrderLine_ID, getC_ProjectPhase_ID, getC_ProjectTask_ID, getC_UOM_ID, getConfirmedQty, getDescription, getKeyNamePair, getLine, getLineDocStatus, getM_AttributeSetInstance_ID, getM_InOut_ID, getM_InOutLine_ID, getM_Locator_ID, getM_Product_ID, getMovementQty, getOrig_OrderLine_ID, getPickedQty, getQtyAllocated, getQtyEntered, getRef_InOutLine_ID, getScrappedQty, getTargetQty, initPO, isDescription, isInvoiced, isLineDocStatusValid, isProcessed, setAD_OrgTrx_ID, setC_Activity_ID, setC_Campaign_ID, setC_Charge_ID, setC_OrderLine_ID, setC_Project_ID, setC_ProjectPhase_ID, setC_ProjectTask_ID, setC_UOM_ID, setConfirmedQty, setDescription, setIsDescription, setIsInvoiced, setLine, setLineDocStatus, setM_AttributeSetInstance_ID, setM_InOut_ID, setM_InOutLine_ID, setM_Product_ID, setOrig_OrderLine_ID, setPickedQty, setProcessed, setQtyAllocated, setRef_InOutLine_ID, setScrappedQty, setTargetQty, setUser1_ID, setUser2_ID
 
Methods inherited from class org.compiere.framework.PO
addAttachment, addAttachment, addError, afterDelete, afterSave, compare, convertToBigDecimal, convertToBoolean, convertToInt, convertToTimestamp, copy, copyValues, copyValues, createAttachment, delete_Accounting, delete, delete, dump, dump, equals, get_ChangeVO, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_EntityType, get_HashMap, get_ID, get_IDOld, get_Info, get_KeyColumns, get_Logger, get_Table_ID, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_ValuesAsString, get_WhereClause, get_xmlDocument, get_xmlString, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getVO, hashCode, insert_Accounting, is_Changed, is_KeyColumn, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveNew_getID, saveNewInsertSQL, saveNewSpecial, saveUpdate, set_ChangeVO, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueString, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setContext, setCtx, setDocWorkflowMgr, setIsActive, setStandardDefaults, setUpdateable, setUpdatedBy, toStringX, unlock, update
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MInOutLine

public MInOutLine(Ctx ctx,
                  int M_InOutLine_ID,
                  String trxName)
Standard Constructor

Parameters:
ctx - context
M_InOutLine_ID - id
trxName - trx name

MInOutLine

public MInOutLine(Ctx ctx,
                  ResultSet rs,
                  String trxName)
Load Constructor

Parameters:
ctx - context
rs - result set record
trxName - transaction

MInOutLine

public MInOutLine(MInOut inout)
Parent Constructor

Parameters:
inout - parent
Method Detail

getOfOrderLine

public static MInOutLine[] getOfOrderLine(Ctx ctx,
                                          int C_OrderLine_ID,
                                          String where,
                                          String trxName)
Get Ship lines Of Order Line

Parameters:
ctx - context
C_OrderLine_ID - line
where - optional addition where clause
trxName - transaction
Returns:
array of receipt lines

get

public static MInOutLine[] get(Ctx ctx,
                               int C_OrderLine_ID,
                               String trxName)
Get Ship lines Of Order Line

Parameters:
ctx - context
C_OrderLine_ID - line
trxName - transaction
Returns:
array of receipt lines2

getParent

public MInOut getParent()
Get Parent

Returns:
parent

setOrderLine

public void setOrderLine(MOrderLine oLine,
                         int M_Locator_ID,
                         BigDecimal Qty)
Set Order Line. Does not set Quantity!

Parameters:
oLine - order line
M_Locator_ID - locator
Qty - used only to find suitable locator

setC_OrderLine_ID

@UICallout
public void setC_OrderLine_ID(String oldC_OrderLine_ID,
                                        String newC_OrderLine_ID,
                                        int windowNo)
                       throws Exception
Set Order Line - Callout

Parameters:
oldC_OrderLine_ID - old BP
newC_OrderLine_ID - new BP
windowNo - window no
Throws:
Exception

setInvoiceLine

public void setInvoiceLine(MInvoiceLine iLine,
                           int M_Locator_ID,
                           BigDecimal Qty)
Set Invoice Line. Does not set Quantity!

Parameters:
iLine - invoice line
M_Locator_ID - locator
Qty - qty only fo find suitable locator

getM_Warehouse_ID

public int getM_Warehouse_ID()
Get Warehouse

Returns:
Returns the m_Warehouse_ID.

setM_Warehouse_ID

public void setM_Warehouse_ID(int warehouse_ID)
Set Warehouse

Parameters:
warehouse_ID - The m_Warehouse_ID to set.

setM_Locator_ID

public void setM_Locator_ID(int M_Locator_ID)
Set M_Locator_ID

Overrides:
setM_Locator_ID in class X_M_InOutLine
Parameters:
M_Locator_ID - id

setM_Locator_ID

public void setM_Locator_ID(BigDecimal Qty)
Set (default) Locator based on qty.

Parameters:
Qty - quantity Assumes Warehouse is set

setQty

public void setQty(BigDecimal Qty)
Set Movement/Movement Qty

Parameters:
Qty - Entered/Movement Qty

setQtyEntered

public void setQtyEntered(BigDecimal QtyEntered)
Set Qty Entered - enforce entered UOM

Overrides:
setQtyEntered in class X_M_InOutLine
Parameters:
QtyEntered -

setMovementQty

public void setMovementQty(BigDecimal MovementQty)
Set Movement Qty - enforce Product UOM

Overrides:
setMovementQty in class X_M_InOutLine
Parameters:
MovementQty -

getProduct

public MProduct getProduct()
Get Product

Returns:
product or null

setProduct

public void setProduct(MProduct product)
Set Product

Parameters:
product - product

setM_Product_ID

public void setM_Product_ID(int M_Product_ID,
                            boolean setUOM)
Set M_Product_ID

Parameters:
M_Product_ID - product
setUOM - also set UOM from product

setM_Product_ID

public void setM_Product_ID(int M_Product_ID,
                            int C_UOM_ID)
Set Product and UOM

Parameters:
M_Product_ID - product
C_UOM_ID - uom

setM_Product_ID

@UICallout
public void setM_Product_ID(String oldM_Product_ID,
                                      String newM_Product_ID,
                                      int windowNo)
                     throws Exception
Set Product - Callout

Parameters:
oldM_Product_ID - old value
newM_Product_ID - new value
windowNo - window
Throws:
Exception

setM_AttributeSetInstance_ID

@UICallout
public void setM_AttributeSetInstance_ID(String oldM_AttributeSetInstance_ID,
                                                   String newM_AttributeSetInstance_ID,
                                                   int windowNo)
                                  throws Exception
Set Product - Callout

Parameters:
oldM_AttributeSetInstance_ID - old value
newM_AttributeSetInstance_ID - new value
windowNo - window
Throws:
Exception

setC_UOM_ID

@UICallout
public void setC_UOM_ID(String oldC_UOM_ID,
                                  String newC_UOM_ID,
                                  int windowNo)
                 throws Exception
Set UOM - Callout

Parameters:
oldC_UOM_ID - old value
newC_UOM_ID - new value
windowNo - window
Throws:
Exception

setQtyEntered

@UICallout
public void setQtyEntered(String oldQtyEntered,
                                    String newQtyEntered,
                                    int windowNo)
                   throws Exception
Set QtyEntered - Callout

Parameters:
oldQtyEntered - old value
newQtyEntered - new value
windowNo - window
Throws:
Exception

setMovementQty

@UICallout
public void setMovementQty(String oldMovementQty,
                                     String newMovementQty,
                                     int windowNo)
                    throws Exception
Set MovementQty - Callout

Parameters:
oldMovementQty - old value
newMovementQty - new value
windowNo - window
Throws:
Exception

addDescription

public void addDescription(String description)
Add to Description

Parameters:
description - text

getC_Project_ID

public int getC_Project_ID()
Get C_Project_ID

Overrides:
getC_Project_ID in class X_M_InOutLine
Returns:
project

getC_Activity_ID

public int getC_Activity_ID()
Get C_Activity_ID

Overrides:
getC_Activity_ID in class X_M_InOutLine
Returns:
Activity

getC_Campaign_ID

public int getC_Campaign_ID()
Get C_Campaign_ID

Overrides:
getC_Campaign_ID in class X_M_InOutLine
Returns:
Campaign

getUser1_ID

public int getUser1_ID()
Get User2_ID

Overrides:
getUser1_ID in class X_M_InOutLine
Returns:
User2

getUser2_ID

public int getUser2_ID()
Get User2_ID

Overrides:
getUser2_ID in class X_M_InOutLine
Returns:
User2

getAD_OrgTrx_ID

public int getAD_OrgTrx_ID()
Get AD_OrgTrx_ID

Overrides:
getAD_OrgTrx_ID in class X_M_InOutLine
Returns:
trx org

getMatchPO

public MMatchPO[] getMatchPO()
Get Match POs

Returns:
matched purchase orders

getMatchPODifference

public BigDecimal getMatchPODifference()
Get Match PO Difference

Returns:
not matched qty (positive not - negative over)

isMatchPOPosted

public boolean isMatchPOPosted()
Is Match PO posted

Returns:
true if posed

getMatchInv

public MMatchInv[] getMatchInv()
Get Match Inv

Returns:
matched invoices

getMatchInvDifference

public BigDecimal getMatchInvDifference()
Get Match Inv Difference

Returns:
not matched qty (positive not - negative over)

isMatchInvPosted

public boolean isMatchInvPosted()
Is Match Inv posted

Returns:
true if posed

beforeSave

protected boolean beforeSave(boolean newRecord)
Before Save

Overrides:
beforeSave in class PO
Parameters:
newRecord - new
Returns:
save

beforeDelete

protected boolean beforeDelete()
Before Delete

Overrides:
beforeDelete in class PO
Returns:
true if drafted

toString

public String toString()
String Representation

Overrides:
toString in class X_M_InOutLine
Returns:
info

getBase

public BigDecimal getBase(String CostDistribution)
Get Base value for Cost Distribution

Parameters:
CostDistribution - cost Distribution
Returns:
base number

Compiere 3.1

Compiere® is a registered trademark of ComPiere, Inc. ©2004-2008 HumanFlash.com All rights reserved.