Package org.compiere.model
Class MRMALine
- java.lang.Object
-
- org.compiere.model.PO
-
- org.compiere.model.X_M_RMALine
-
- org.compiere.model.MRMALine
-
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_M_RMALine
,I_Persistent
,Evaluatee
public class MRMALine extends X_M_RMALine
RMA Line Model- Version:
- $Id: MRMALine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected MCharge
m_charge
Chargeprotected MInOutLine
m_ioLine
Shipment Lineprotected MRMA
m_parent
Parentprotected MProduct
m_product
Productprotected MTax
m_tax
Taxprotected BigDecimal
originalQty
protected int
precision
protected int
taxId
protected BigDecimal
unitAmount
-
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, LOCAL_TRX_PREFIX, log, p_ctx, p_info, XML_ATTRIBUTE_AD_Table_ID, XML_ATTRIBUTE_Record_ID
-
Fields inherited from interface org.compiere.model.I_M_RMALine
accessLevel, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_Amt, COLUMNNAME_C_Charge_ID, COLUMNNAME_C_Tax_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_Description, COLUMNNAME_IsActive, COLUMNNAME_Line, COLUMNNAME_LineNetAmt, COLUMNNAME_M_InOutLine_ID, COLUMNNAME_M_Product_ID, COLUMNNAME_M_RMA_ID, COLUMNNAME_M_RMALine_ID, COLUMNNAME_M_RMALine_UU, COLUMNNAME_Processed, COLUMNNAME_Qty, COLUMNNAME_QtyDelivered, COLUMNNAME_QtyInvoiced, COLUMNNAME_Ref_RMALine_ID, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, Model, Table_ID, Table_Name
-
-
Constructor Summary
Constructors Constructor Description MRMALine(Properties ctx, int M_RMALine_ID, String trxName)
Standard ConstructorMRMALine(Properties ctx, ResultSet rs, String trxName)
Load Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDescription(String description)
Add to Descriptionprotected boolean
afterDelete(boolean success)
Executed after Delete operation.protected boolean
afterSave(boolean newRecord, boolean success)
Called after Save for Post-Save Operationprotected boolean
beforeSave(boolean newRecord)
Called before Save for Pre-Save Operationboolean
checkQty()
void
clearParent()
int
getAD_OrgTrx_ID()
Get Org Trxint
getC_Activity_ID()
Get Activityint
getC_Campaign_ID()
Get Campaignint
getC_Project_ID()
Get Projectint
getC_ProjectPhase_ID()
Get Project Phaseint
getC_ProjectTask_ID()
Get Project Taskint
getC_UOM_ID()
Get UOM Based on Shipment line if present Default to Each (100) for chargeMCharge
getCharge()
Get Chargeprotected int
getInvoiceLineId()
Retrieves the invoiceLine Id associated with the Shipment/Receipt Lineint
getM_AttributeSetInstance_ID()
Get Attribute Set Instanceint
getM_Locator_ID()
Get LocatorMRMA
getParent()
Get Parentint
getPrecision()
Get precision Based on Invoice if the shipment was invoiced, on Order otherwiseMProduct
getProduct()
Get ProductMInOutLine
getShipLine()
Get Ship Lineprotected MTax
getTax()
Get Tax (immutable)BigDecimal
getTotalAmt()
Get Total Amt for the line including taxBigDecimal
getUnitAmt()
Calculates the unit amount for the product/chargeint
getUser1_ID()
Get User1int
getUser2_ID()
Get User2protected void
init()
Initialise parameters that are requiredboolean
isShipLineInvoiced()
Get whether the Ship line has been invoicedvoid
setM_InOutLine_ID(int M_InOutLine_ID)
Set M_InOutLine_IDboolean
updateHeaderAmt()
Update Amount on Headerprotected boolean
updateOrderTax(boolean oldTax)
-
Methods inherited from class org.compiere.model.X_M_RMALine
get_AccessLevel, getAmt, getC_Charge, getC_Charge_ID, getC_Tax, getC_Tax_ID, getDescription, getKeyNamePair, getLine, getLineNetAmt, getM_InOutLine, getM_InOutLine_ID, getM_Product, getM_Product_ID, getM_RMA, getM_RMA_ID, getM_RMALine_ID, getM_RMALine_UU, getQty, getQtyDelivered, getQtyInvoiced, getRef_RMALine, getRef_RMALine_ID, initPO, isProcessed, setAmt, setC_Charge_ID, setC_Tax_ID, setDescription, setLine, setLineNetAmt, setM_Product_ID, setM_RMA_ID, setM_RMALine_ID, setM_RMALine_UU, setProcessed, setQty, setQtyDelivered, setQtyInvoiced, setRef_RMALine_ID, toString
-
Methods inherited from class org.compiere.model.PO
beforeDelete, checkImmutable, clearCrossTenantSafe, clone, columnExists, columnExists, compare, copyPO, copyValues, copyValues, createAttachment, delete, delete, delete_Accounting, delete_Tree, deleteEx, deleteEx, dump, dump, equals, get_Attribute, get_Attributes, 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_OptimisticLockingColumns, get_Table_ID, get_TableName, get_Translation, get_Translation, get_Translation, get_Translation, get_Translation, get_TrxName, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, get_ValueDifference, get_ValueDifference, get_ValueE, get_ValueOfColumn, get_ValueOld, get_ValueOld, get_ValueOldAsInt, get_WhereClause, get_WhereClause, get_xmlDocument, get_xmlString, getAD_Client_ID, getAD_Org_ID, getAllIDs, getAttachment, getAttachment, getAttachmentData, getCreated, getCreatedBy, getCtx, getDoc, getFindParameter, getPdfAttachment, getUpdated, getUpdatedBy, getUUIDColumnName, getUUIDColumnName, hashCode, insert_Accounting, insert_Tree, insert_Tree, is_Changed, is_Immutable, is_new, is_UseOptimisticLocking, is_ValueChanged, is_ValueChanged, isActive, isAttachment, isColumnMandatory, isColumnUpdateable, isMandatoryOK, isPdfAttachment, isReplication, load, load, load, load, load, loadByUU, loadComplete, loadDefaults, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveEx, saveEx, saveNew_afterSetID, saveNew_getID, saveNewSpecial, saveReplica, saveUpdate, set_Attribute, set_ColumnUpdateable, set_CustomColumn, set_CustomColumnReturningBoolean, set_OptimisticLockingColumns, set_TrxName, set_TrxName, set_UseOptimisticLocking, set_Value, set_Value, set_Value, set_Value, set_ValueE, set_ValueNoCheck, set_ValueNoCheckE, set_ValueOfColumn, set_ValueOfColumn, set_ValueOfColumnReturningBoolean, set_ValueOfColumnReturningBoolean, setAD_Client_ID, setAD_Org_ID, setClientOrg, setClientOrg, setCrossTenantSafe, setDoc, setDocWorkflowMgr, setIsActive, setProcessedOn, setReplication, setStandardDefaults, setUpdateable, setUpdatedBy, unlock, update_Tree, validForeignKeys
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Comparator
reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface org.compiere.model.I_M_RMALine
getAD_Client_ID, getAD_Org_ID, getCreated, getCreatedBy, getUpdated, getUpdatedBy, isActive, setAD_Org_ID, setIsActive
-
Methods inherited from interface org.compiere.model.I_Persistent
save
-
-
-
-
Field Detail
-
m_ioLine
protected MInOutLine m_ioLine
Shipment Line
-
m_product
protected MProduct m_product
Product
-
m_charge
protected MCharge m_charge
Charge
-
m_tax
protected MTax m_tax
Tax
-
m_parent
protected MRMA m_parent
Parent
-
precision
protected int precision
-
unitAmount
protected BigDecimal unitAmount
-
originalQty
protected BigDecimal originalQty
-
taxId
protected int taxId
-
-
Constructor Detail
-
MRMALine
public MRMALine(Properties ctx, int M_RMALine_ID, String trxName)
Standard Constructor- Parameters:
ctx
- contextM_RMALine_ID
- idtrxName
- transaction
-
MRMALine
public MRMALine(Properties ctx, ResultSet rs, String trxName)
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Detail
-
init
protected void init()
Initialise parameters that are required
-
getParent
public MRMA getParent()
Get Parent- Returns:
- parent
-
setM_InOutLine_ID
public void setM_InOutLine_ID(int M_InOutLine_ID)
Set M_InOutLine_ID- Specified by:
setM_InOutLine_ID
in interfaceI_M_RMALine
- Overrides:
setM_InOutLine_ID
in classX_M_RMALine
- Parameters:
M_InOutLine_ID
-
-
getShipLine
public MInOutLine getShipLine()
Get Ship Line- Returns:
- ship line
-
getInvoiceLineId
protected int getInvoiceLineId()
Retrieves the invoiceLine Id associated with the Shipment/Receipt Line- Returns:
- Invoice Line ID
-
getUnitAmt
public BigDecimal getUnitAmt()
Calculates the unit amount for the product/charge- Returns:
- Unit Amount
-
getTotalAmt
public BigDecimal getTotalAmt()
Get Total Amt for the line including tax- Returns:
- amt
-
isShipLineInvoiced
public boolean isShipLineInvoiced()
Get whether the Ship line has been invoiced- Returns:
- true if invoiced
-
beforeSave
protected boolean beforeSave(boolean newRecord)
Description copied from class:PO
Called before Save for Pre-Save Operation- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new record- Returns:
- true if record can be saved
-
checkQty
public boolean checkQty()
-
updateOrderTax
protected boolean updateOrderTax(boolean oldTax)
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success)
Description copied from class:PO
Called after Save for Post-Save Operation
-
afterDelete
protected boolean afterDelete(boolean success)
Description copied from class:PO
Executed after Delete operation.- Overrides:
afterDelete
in classPO
- Parameters:
success
- true if record deleted- Returns:
- true if delete is a success
-
updateHeaderAmt
public boolean updateHeaderAmt()
Update Amount on Header- Returns:
- true if header updated
-
addDescription
public void addDescription(String description)
Add to Description- Parameters:
description
- text
-
getPrecision
public int getPrecision()
Get precision Based on Invoice if the shipment was invoiced, on Order otherwise
-
getC_UOM_ID
public int getC_UOM_ID()
Get UOM Based on Shipment line if present Default to Each (100) for charge- Returns:
- UOM if based on shipment line and 100 for charge based
-
getProduct
public MProduct getProduct()
Get Product- Returns:
- product or null
-
getCharge
public MCharge getCharge()
Get Charge- Returns:
- product or null
-
getTax
protected MTax getTax()
Get Tax (immutable)- Returns:
- tax
-
getC_Project_ID
public int getC_Project_ID()
Get Project- Returns:
- project if based on shipment line and 0 for charge based
-
getC_ProjectPhase_ID
public int getC_ProjectPhase_ID()
Get Project Phase- Returns:
- project phase if based on shipment line and 0 for charge based
-
getC_ProjectTask_ID
public int getC_ProjectTask_ID()
Get Project Task- Returns:
- project task if based on shipment line and 0 for charge based
-
getC_Activity_ID
public int getC_Activity_ID()
Get Activity- Returns:
- project phase if based on shipment line and 0 for charge based
-
getC_Campaign_ID
public int getC_Campaign_ID()
Get Campaign- Returns:
- campaign if based on shipment line and 0 for charge based
-
getAD_OrgTrx_ID
public int getAD_OrgTrx_ID()
Get Org Trx- Returns:
- Org Trx if based on shipment line and 0 for charge based
-
getUser1_ID
public int getUser1_ID()
Get User1- Returns:
- user1 if based on shipment line and 0 for charge based
-
getUser2_ID
public int getUser2_ID()
Get User2- Returns:
- user2 if based on shipment line and 0 for charge based
-
getM_AttributeSetInstance_ID
public int getM_AttributeSetInstance_ID()
Get Attribute Set Instance- Returns:
- ASI if based on shipment line and 0 for charge based
-
getM_Locator_ID
public int getM_Locator_ID()
Get Locator- Returns:
- locator if based on shipment line and 0 for charge based
-
clearParent
public void clearParent()
-
-