Adempiere 3.5.2a

org.compiere.model
Class MInventoryLine

java.lang.Object
  extended by org.compiere.model.PO
      extended by org.compiere.model.X_M_InventoryLine
          extended by org.compiere.model.MInventoryLine
All Implemented Interfaces:
Serializable, Comparator, I_M_InventoryLine, I_Persistent, Evaluatee

public class MInventoryLine
extends X_M_InventoryLine

Physical Inventory Line Model

Version:
$Id: MInventoryLine.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
Author:
Jorg Janke, Teo Sarca, SC ARHIPAC SERVICE SRL
  • BF [ 1817757 ] Error on saving MInventoryLine in a custom environment
  • See Also:
    Serialized Form

    Field Summary
     
    Fields inherited from class org.compiere.model.X_M_InventoryLine
    INVENTORYTYPE_AD_Reference_ID, INVENTORYTYPE_ChargeAccount, INVENTORYTYPE_InventoryDifference, M_PRODUCT_ID_AD_Reference_ID
     
    Fields inherited from class org.compiere.model.PO
    ACCESSLEVEL_ALL, ACCESSLEVEL_CLIENT, ACCESSLEVEL_CLIENTORG, ACCESSLEVEL_ORG, ACCESSLEVEL_SYSTEM, ACCESSLEVEL_SYSTEMCLIENT, ENTITYTYPE_Dictionary, ENTITYTYPE_UserMaintained, I_ZERO, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
     
    Fields inherited from interface org.compiere.model.I_M_InventoryLine
    accessLevel, COLUMNNAME_C_Charge_ID, COLUMNNAME_Description, COLUMNNAME_InventoryType, COLUMNNAME_Line, COLUMNNAME_M_AttributeSetInstance_ID, COLUMNNAME_M_Inventory_ID, COLUMNNAME_M_InventoryLine_ID, COLUMNNAME_M_Locator_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_Processed, COLUMNNAME_QtyBook, COLUMNNAME_QtyCount, COLUMNNAME_QtyInternalUse, COLUMNNAME_UPC, COLUMNNAME_Value, Model, Table_ID, Table_Name
     
    Constructor Summary
    MInventoryLine(MInventory inventory, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID, BigDecimal QtyBook, BigDecimal QtyCount)
              Detail Constructor.
    MInventoryLine(Properties ctx, int M_InventoryLine_ID, String trxName)
              Default Constructor
    MInventoryLine(Properties ctx, ResultSet rs, String trxName)
              Load Constructor
     
    Method Summary
     void addDescription(String description)
              Add to Description
    protected  boolean afterSave(boolean newRecord, boolean success)
              After Save
    protected  boolean beforeSave(boolean newRecord)
              Before Save
    static MInventoryLine get(MInventory inventory, int M_Locator_ID, int M_Product_ID, int M_AttributeSetInstance_ID)
              Get Inventory Line with parameters
     BigDecimal getMovementQty()
              Get Movement Qty (absolute value) negative value means outgoing trx positive value means incoming trx
     MInventory getParent()
              Get Parent
     MProduct getProduct()
              Get Product
     BigDecimal getQtyBook()
              Get Qty Book
     BigDecimal getQtyCount()
              Get Qty Count
     boolean isInternalUseInventory()
              Is Internal Use Inventory
     boolean isSOTrx()
               
    protected  void setParent(MInventory parent)
              Get Parent
     void setQtyCount(BigDecimal QtyCount)
              Set Count Qty - enforce UOM
     void setQtyInternalUse(BigDecimal QtyInternalUse)
              Set Internal Use Qty - enforce UOM
     String toString()
              String Representation
     
    Methods inherited from class org.compiere.model.X_M_InventoryLine
    get_AccessLevel, getC_Charge_ID, getC_Charge, getDescription, getInventoryType, getKeyNamePair, getLine, getM_AttributeSetInstance_ID, getM_Inventory_ID, getM_Inventory, getM_InventoryLine_ID, getM_Locator_ID, getM_Product_ID, getQtyInternalUse, getUPC, getValue, initPO, isProcessed, setC_Charge_ID, setDescription, setInventoryType, setLine, setM_AttributeSetInstance_ID, setM_Inventory_ID, setM_InventoryLine_ID, setM_Locator_ID, setM_Product_ID, setProcessed, setQtyBook, setUPC, setValue
     
    Methods inherited from class org.compiere.model.PO
    afterDelete, beforeDelete, compare, copyValues, copyValues, createAttachment, delete_Accounting, delete_Tree, delete, delete, deleteEx, deleteEx, dump, dump, equals, get_ColumnCount, get_ColumnDescription, get_ColumnDisplayType, get_ColumnIndex, get_ColumnLabel, get_ColumnLookup, get_ColumnName, get_DisplayValue, get_HashMap, get_ID, get_IDOld, get_KeyColumns, get_Logger, get_Table_ID, get_TableName, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_new, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, loadComplete, loadDefaults, loadSpecial, lock, save, save, saveEx, saveEx, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_ColumnUpdateable, set_CustomColumn, set_TrxName, set_TrxName, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setDoc, setDocWorkflowMgr, setIsActive, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     
    Methods inherited from interface org.compiere.model.I_Persistent
    save
     

    Constructor Detail

    MInventoryLine

    public MInventoryLine(Properties ctx,
                          int M_InventoryLine_ID,
                          String trxName)
    Default Constructor

    Parameters:
    ctx - context
    M_InventoryLine_ID - line
    trxName - transaction

    MInventoryLine

    public MInventoryLine(Properties ctx,
                          ResultSet rs,
                          String trxName)
    Load Constructor

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

    MInventoryLine

    public MInventoryLine(MInventory inventory,
                          int M_Locator_ID,
                          int M_Product_ID,
                          int M_AttributeSetInstance_ID,
                          BigDecimal QtyBook,
                          BigDecimal QtyCount)
    Detail Constructor. Locator/Product/AttributeSetInstance must be unique

    Parameters:
    inventory - parent
    M_Locator_ID - locator
    M_Product_ID - product
    M_AttributeSetInstance_ID - instance
    QtyBook - book value
    QtyCount - count value
    Method Detail

    get

    public static MInventoryLine get(MInventory inventory,
                                     int M_Locator_ID,
                                     int M_Product_ID,
                                     int M_AttributeSetInstance_ID)
    Get Inventory Line with parameters

    Parameters:
    inventory - inventory
    M_Locator_ID - locator
    M_Product_ID - product
    M_AttributeSetInstance_ID - asi
    Returns:
    line or null

    getQtyBook

    public BigDecimal getQtyBook()
    Get Qty Book

    Specified by:
    getQtyBook in interface I_M_InventoryLine
    Overrides:
    getQtyBook in class X_M_InventoryLine
    Returns:
    Qty Book

    getQtyCount

    public BigDecimal getQtyCount()
    Get Qty Count

    Specified by:
    getQtyCount in interface I_M_InventoryLine
    Overrides:
    getQtyCount in class X_M_InventoryLine
    Returns:
    Qty Count

    getProduct

    public MProduct getProduct()
    Get Product

    Returns:
    product or null if not defined

    setQtyCount

    public void setQtyCount(BigDecimal QtyCount)
    Set Count Qty - enforce UOM

    Specified by:
    setQtyCount in interface I_M_InventoryLine
    Overrides:
    setQtyCount in class X_M_InventoryLine
    Parameters:
    QtyCount - qty

    setQtyInternalUse

    public void setQtyInternalUse(BigDecimal QtyInternalUse)
    Set Internal Use Qty - enforce UOM

    Specified by:
    setQtyInternalUse in interface I_M_InventoryLine
    Overrides:
    setQtyInternalUse in class X_M_InventoryLine
    Parameters:
    QtyInternalUse - qty

    addDescription

    public void addDescription(String description)
    Add to Description

    Parameters:
    description - text

    setParent

    protected void setParent(MInventory parent)
    Get Parent

    Parameters:
    parent - parent

    getParent

    public MInventory getParent()
    Get Parent

    Returns:
    parent

    toString

    public String toString()
    String Representation

    Overrides:
    toString in class X_M_InventoryLine
    Returns:
    info

    beforeSave

    protected boolean beforeSave(boolean newRecord)
    Before Save

    Overrides:
    beforeSave in class PO
    Parameters:
    newRecord - new
    Returns:
    true if can be saved

    afterSave

    protected boolean afterSave(boolean newRecord,
                                boolean success)
    After Save

    Overrides:
    afterSave in class PO
    Parameters:
    newRecord - new
    success - success
    Returns:
    true

    isInternalUseInventory

    public boolean isInternalUseInventory()
    Is Internal Use Inventory

    Returns:
    true if is internal use inventory

    getMovementQty

    public BigDecimal getMovementQty()
    Get Movement Qty (absolute value)
  • negative value means outgoing trx
  • positive value means incoming trx

    Returns:
    movement qty

  • isSOTrx

    public boolean isSOTrx()
    Returns:
    true if is an outgoing transaction

    Adempiere 3.5.2a

    Adempiere® is a registered trademark of ADempiere Business Inc. ©2004-2008 HumanFlash.com All rights reserved.