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
RMA Line Model
- Version:
- $Id: MRMALine.java,v 1.3 2006/07/30 00:51:03 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected MCharge
Chargeprotected MInOutLine
Shipment Lineprotected MRMA
Parentprotected MProduct
Productprotected MTax
Taxprotected BigDecimal
protected int
protected int
protected BigDecimal
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, UUID_NEW_RECORD, 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
ConstructorDescriptionMRMALine
(Properties ctx, int M_RMALine_ID, String trxName) Standard ConstructorMRMALine
(Properties ctx, int M_RMALine_ID, String trxName, String... virtualColumns) MRMALine
(Properties ctx, String M_RMALine_UU, String trxName) UUID based ConstructorMRMALine
(Properties ctx, ResultSet rs, String trxName) Load Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescription
(String description) Add to Descriptionprotected boolean
afterDelete
(boolean success) Execute after Delete operations.protected boolean
afterSave
(boolean newRecord, boolean success) Called after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.protected boolean
beforeSave
(boolean newRecord) Called before Save for Pre-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it.boolean
checkQty()
Validate that line quantity is <= MInOutLine quantityvoid
Resetm_parent
to nullint
Get Org Trxint
Get Activityint
Get Campaignint
Get Projectint
Get Project Phaseint
Get Project Taskint
Get UOMGet Chargeprotected int
Retrieves the invoiceLine Id associated with the Shipment/Receipt Lineint
Get Attribute Set Instanceint
Get LocatorGet Parentint
Get precision.Get ProductGet Shipment Lineprotected MTax
getTax()
Get Tax (immutable)Get Total Amount for the line including taxGet unit amount for product/chargeint
Get User1int
Get User2protected void
init()
Initialise precision, unitAmount, originalQty and taxIdboolean
Get whether the Ship line has been invoicedvoid
setM_InOutLine_ID
(int M_InOutLine_ID) Set M_InOutLine_IDboolean
Update Amount on Headerprotected boolean
updateOrderTax
(boolean oldTax) Update RMA taxMethods 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, buildInsertSQL, 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_UUID, get_Value, get_Value, get_ValueAsBoolean, get_ValueAsInt, get_ValueAsInt, get_ValueAsString, 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, loadByUU, loadComplete, loadDefaults, loadPO, loadSpecial, lock, makeImmutable, postDelete, retrieveIdOfParentValue, retrieveIdOfParentValue, save, save, saveCrossTenantSafe, saveCrossTenantSafeEx, saveCrossTenantSafeEx, 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, toInsertSQL, 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 Details
-
m_ioLine
Shipment Line -
m_product
Product -
m_charge
Charge -
m_tax
Tax -
m_parent
Parent -
precision
protected int precision -
unitAmount
-
originalQty
-
taxId
protected int taxId
-
-
Constructor Details
-
MRMALine
UUID based Constructor- Parameters:
ctx
- ContextM_RMALine_UU
- UUID keytrxName
- Transaction
-
MRMALine
Standard Constructor- Parameters:
ctx
- contextM_RMALine_ID
- idtrxName
- transaction
-
MRMALine
- Parameters:
ctx
-M_RMALine_ID
-trxName
-virtualColumns
-
-
MRMALine
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
-
Method Details
-
init
protected void init()Initialise precision, unitAmount, originalQty and taxId -
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
Get Shipment Line- Returns:
- shipment line
-
getInvoiceLineId
protected int getInvoiceLineId()Retrieves the invoiceLine Id associated with the Shipment/Receipt Line- Returns:
- Invoice Line ID
-
getUnitAmt
Get unit amount for product/charge- Returns:
- Unit Amount
-
getTotalAmt
Get Total Amount for the line including tax- Returns:
- total amount
-
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.
Default implementation is nop, to be implemented in sub-classes that needed it.- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- true if it is a new record- Returns:
- true if record can be saved
-
checkQty
public boolean checkQty()Validate that line quantity is <= MInOutLine quantity- Returns:
- true if pass validation
-
updateOrderTax
protected boolean updateOrderTax(boolean oldTax) Update RMA tax- Parameters:
oldTax
- true if the old C_Tax_ID should be used- Returns:
- true if success, false otherwise
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) Description copied from class:PO
Called after Save for Post-Save Operation.
Default implementation is nop, to be implemented in sub-classes that needed it. -
afterDelete
protected boolean afterDelete(boolean success) Description copied from class:PO
Execute after Delete operations.
Default implementation is nop, to be implemented in sub-classes that needed it.- 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
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- Returns:
- C_UOM_ID
- if shipment line exists, from shipment line
- otherwise return 100 (Each) for charge line or product UOM for product line
-
getProduct
Get Product- Returns:
- product or null
-
getCharge
Get Charge- Returns:
- charge or null
-
getTax
Get Tax (immutable)- Returns:
- tax
-
getC_Project_ID
public int getC_Project_ID()Get Project- Returns:
- If based on shipment line, return C_Project_ID from shipment line. Otherwise, return 0
-
getC_ProjectPhase_ID
public int getC_ProjectPhase_ID()Get Project Phase- Returns:
- If based on shipment line, return C_ProjectPhase_ID from shipment line. Otherwise, return 0
-
getC_ProjectTask_ID
public int getC_ProjectTask_ID()Get Project Task- Returns:
- If based on shipment line, return C_ProjectTask_ID from shipment line. Otherwise, return 0
-
getC_Activity_ID
public int getC_Activity_ID()Get Activity- Returns:
- If based on shipment line, return C_Activity_ID from shipment line. Otherwise, return 0
-
getC_Campaign_ID
public int getC_Campaign_ID()Get Campaign- Returns:
- If based on shipment line, return C_Campaign_ID from shipment line. Otherwise, return 0
-
getAD_OrgTrx_ID
public int getAD_OrgTrx_ID()Get Org Trx- Returns:
- If based on shipment line, return AD_OrgTrx_ID from shipment line. Otherwise, return 0
-
getUser1_ID
public int getUser1_ID()Get User1- Returns:
- If based on shipment line, return User1_ID from shipment line. Otherwise, return 0
-
getUser2_ID
public int getUser2_ID()Get User2- Returns:
- If based on shipment line, return User2_ID from shipment line. Otherwise, return 0
-
getM_AttributeSetInstance_ID
public int getM_AttributeSetInstance_ID()Get Attribute Set Instance- Returns:
- If based on shipment line, return M_AttributeSetInstance_ID from shipment line. Otherwise, return 0
-
getM_Locator_ID
public int getM_Locator_ID()Get Locator- Returns:
- M_Locator_ID
- if based on shipment line, return M_Locator_ID from shipment line
- otherwise, return 0 for charge line or default locator for product line
-
clearParent
public void clearParent()Resetm_parent
to null
-