Package org.compiere.model
Class MJournalLine
java.lang.Object
org.compiere.model.PO
org.compiere.model.X_GL_JournalLine
org.compiere.model.MJournalLine
- All Implemented Interfaces:
Serializable
,Cloneable
,Comparator<Object>
,I_GL_JournalLine
,I_Persistent
,Evaluatee
GL Journal Line Model
- Version:
- $Id: MJournalLine.java,v 1.3 2006/07/30 00:51:05 jjanke Exp $
- Author:
- Jorg Janke, Cristina Ghita
- BF [ 2855807 ] AD_Org_ID from account https://sourceforge.net/p/adempiere/bugs/2084/
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected MAccount
Account Combinationprotected MElementValue
Account Elementprotected MJournal
Parentprotected int
Currency PrecisionFields 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_GL_JournalLine
accessLevel, COLUMNNAME_A_Asset_Group_ID, COLUMNNAME_A_Asset_ID, COLUMNNAME_A_CreateAsset, COLUMNNAME_A_Processed, COLUMNNAME_Account_ID, COLUMNNAME_AD_Client_ID, COLUMNNAME_AD_Org_ID, COLUMNNAME_AD_OrgTrx_ID, COLUMNNAME_Alias_ValidCombination_ID, COLUMNNAME_AmtAcctCr, COLUMNNAME_AmtAcctDr, COLUMNNAME_AmtSourceCr, COLUMNNAME_AmtSourceDr, COLUMNNAME_C_Activity_ID, COLUMNNAME_C_BPartner_ID, COLUMNNAME_C_Campaign_ID, COLUMNNAME_C_ConversionType_ID, COLUMNNAME_C_Currency_ID, COLUMNNAME_C_LocFrom_ID, COLUMNNAME_C_LocTo_ID, COLUMNNAME_C_Project_ID, COLUMNNAME_C_SalesRegion_ID, COLUMNNAME_C_SubAcct_ID, COLUMNNAME_C_UOM_ID, COLUMNNAME_C_ValidCombination_ID, COLUMNNAME_Created, COLUMNNAME_CreatedBy, COLUMNNAME_CurrencyRate, COLUMNNAME_DateAcct, COLUMNNAME_Description, COLUMNNAME_GL_Journal_ID, COLUMNNAME_GL_JournalLine_ID, COLUMNNAME_GL_JournalLine_UU, COLUMNNAME_IsActive, COLUMNNAME_IsGenerated, COLUMNNAME_Line, COLUMNNAME_M_Product_ID, COLUMNNAME_Processed, COLUMNNAME_Qty, COLUMNNAME_Updated, COLUMNNAME_UpdatedBy, COLUMNNAME_User1_ID, COLUMNNAME_User2_ID, Model, Table_ID, Table_Name
-
Constructor Summary
ConstructorDescriptionMJournalLine
(Properties ctx, int GL_JournalLine_ID, String trxName) Standard ConstructorMJournalLine
(Properties ctx, String GL_JournalLine_UU, String trxName) UUID based ConstructorMJournalLine
(Properties ctx, ResultSet rs, String trxName) Load ConstructorMJournalLine
(MJournal parent) Parent Constructor -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
afterDelete
(boolean success) After Deleteprotected boolean
afterSave
(boolean newRecord, boolean success) After Save.protected boolean
beforeSave
(boolean newRecord) Before Saveprotected void
Fill Accounting Dimensions from line valid combination.Get Account (Valid Combination)Get Natural Account Element Valueprotected boolean
Get or create new valid combination record.Get Parentint
Get Currency Precisionboolean
Is it posting to a Control Acctvoid
setAmtAcct
(BigDecimal AmtAcctDr, BigDecimal AmtAcctCr) Set Accounted Amounts only if not 0.void
setC_Currency_ID
(int C_Currency_ID) Set C_Currency_ID and precisionvoid
setC_ValidCombination_ID
(int C_ValidCombination_ID) Set C_ValidCombination_IDvoid
Set C_ValidCombination_IDvoid
setCurrency
(int C_Currency_ID, int C_ConversionType_ID, BigDecimal CurrencyRate) Set Currency Infovoid
setCurrencyRate
(BigDecimal CurrencyRate) Set Currency Rateprotected boolean
Update Journal and Batch TotalMethods inherited from class org.compiere.model.X_GL_JournalLine
get_AccessLevel, getA_Asset, getA_Asset_Group, getA_Asset_Group_ID, getA_Asset_ID, getAccount, getAccount_ID, getAD_OrgTrx_ID, getAlias_ValidCombination, getAlias_ValidCombination_ID, getAmtAcctCr, getAmtAcctDr, getAmtSourceCr, getAmtSourceDr, getC_Activity, getC_Activity_ID, getC_BPartner, getC_BPartner_ID, getC_Campaign, getC_Campaign_ID, getC_ConversionType, getC_ConversionType_ID, getC_Currency, getC_Currency_ID, getC_LocFrom, getC_LocFrom_ID, getC_LocTo, getC_LocTo_ID, getC_Project, getC_Project_ID, getC_SalesRegion, getC_SalesRegion_ID, getC_SubAcct, getC_SubAcct_ID, getC_UOM, getC_UOM_ID, getC_ValidCombination, getC_ValidCombination_ID, getCurrencyRate, getDateAcct, getDescription, getGL_Journal, getGL_Journal_ID, getGL_JournalLine_ID, getGL_JournalLine_UU, getKeyNamePair, getLine, getM_Product, getM_Product_ID, getQty, getUser1, getUser1_ID, getUser2, getUser2_ID, initPO, isA_CreateAsset, isA_Processed, isGenerated, isProcessed, setA_Asset_Group_ID, setA_Asset_ID, setA_CreateAsset, setA_Processed, setAccount_ID, setAD_OrgTrx_ID, setAlias_ValidCombination_ID, setAmtAcctCr, setAmtAcctDr, setAmtSourceCr, setAmtSourceDr, setC_Activity_ID, setC_BPartner_ID, setC_Campaign_ID, setC_ConversionType_ID, setC_LocFrom_ID, setC_LocTo_ID, setC_Project_ID, setC_SalesRegion_ID, setC_SubAcct_ID, setC_UOM_ID, setDateAcct, setDescription, setGL_Journal_ID, setGL_JournalLine_ID, setGL_JournalLine_UU, setIsGenerated, setLine, setM_Product_ID, setProcessed, setQty, setUser1_ID, setUser2_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_GL_JournalLine
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_parent
Parent -
m_precision
protected int m_precisionCurrency Precision -
m_account
Account Combination -
m_accountElement
Account Element
-
-
Constructor Details
-
MJournalLine
UUID based Constructor- Parameters:
ctx
- ContextGL_JournalLine_UU
- UUID keytrxName
- Transaction
-
MJournalLine
Standard Constructor- Parameters:
ctx
- contextGL_JournalLine_ID
- idtrxName
- transaction
-
MJournalLine
Load Constructor- Parameters:
ctx
- contextrs
- result settrxName
- transaction
-
MJournalLine
Parent Constructor- Parameters:
parent
- journal
-
-
Method Details
-
getParent
Get Parent- Returns:
- parent
-
setCurrency
Set Currency Info- Parameters:
C_Currency_ID
- currencyC_ConversionType_ID
- typeCurrencyRate
- rate
-
setC_Currency_ID
public void setC_Currency_ID(int C_Currency_ID) Set C_Currency_ID and precision- Specified by:
setC_Currency_ID
in interfaceI_GL_JournalLine
- Overrides:
setC_Currency_ID
in classX_GL_JournalLine
- Parameters:
C_Currency_ID
- currency
-
getPrecision
public int getPrecision()Get Currency Precision- Returns:
- precision
-
setCurrencyRate
Set Currency Rate- Specified by:
setCurrencyRate
in interfaceI_GL_JournalLine
- Overrides:
setCurrencyRate
in classX_GL_JournalLine
- Parameters:
CurrencyRate
- check for null or negative value (->one)
-
setAmtAcct
Set Accounted Amounts only if not 0. Amounts overwritten in beforeSave - set conversion rate.- Parameters:
AmtAcctDr
- DrAmtAcctCr
- Cr
-
setC_ValidCombination_ID
public void setC_ValidCombination_ID(int C_ValidCombination_ID) Set C_ValidCombination_ID- Specified by:
setC_ValidCombination_ID
in interfaceI_GL_JournalLine
- Overrides:
setC_ValidCombination_ID
in classX_GL_JournalLine
- Parameters:
C_ValidCombination_ID
- id
-
setC_ValidCombination_ID
Set C_ValidCombination_ID- Parameters:
acct
- account
-
getAccount_Combi
Get Account (Valid Combination)- Returns:
- combination or null
-
getAccountElementValue
Get Natural Account Element Value- Returns:
- account
-
isDocControlled
public boolean isDocControlled()Is it posting to a Control Acct- Returns:
- true if control acct
-
beforeSave
protected boolean beforeSave(boolean newRecord) Before Save- Overrides:
beforeSave
in classPO
- Parameters:
newRecord
- new- Returns:
- true
-
afterSave
protected boolean afterSave(boolean newRecord, boolean success) After Save. Update Journal/Batch Total -
afterDelete
protected boolean afterDelete(boolean success) After Delete- Overrides:
afterDelete
in classPO
- Parameters:
success
- true if deleted- Returns:
- true if success
-
updateJournalTotal
protected boolean updateJournalTotal()Update Journal and Batch Total- Returns:
- true if success
-
getOrCreateCombination
protected boolean getOrCreateCombination()Get or create new valid combination record. Set C_ValidCombination_ID. -
fillDimensionsFromCombination
protected void fillDimensionsFromCombination()Fill Accounting Dimensions from line valid combination.
-