Package org.compiere.acct
Class FactUtil
java.lang.Object
org.compiere.acct.FactUtil
Helper methods for Fact and FactLine
- Author:
- ancu
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic FactLine[]
createSimpleOperation
(Fact fact, DocLine docLine, MAccount account_DR, MAccount account_CR, int C_Currency_ID, BigDecimal amt, boolean signSensitive) Create a simple acct transaction, as fellows:
-
Constructor Details
-
FactUtil
public FactUtil()
-
-
Method Details
-
createSimpleOperation
public static FactLine[] createSimpleOperation(Fact fact, DocLine docLine, MAccount account_DR, MAccount account_CR, int C_Currency_ID, BigDecimal amt, boolean signSensitive) Create a simple acct transaction, as fellows:
Note:if signSensitive == true then if amt >= 0 account_DR DR amt account_CR CR amt if amt < 0 account_CR DR -amt account_DR CR -amt if signSensitive == false then: account_DR DR amt account_CR CR -amt (same as when signSensitive==true and amt>=0)
- Operation index is automatically incremented
- Parameters:
fact
-docLine
- Document line or nullaccount_DR
- DR accountaccount_CR
- CR accountC_Currency_ID
- Currencyamt
- amountsignSensitive
- if true, the DR and CR account will switch when amount is negative- Returns:
- resulting two fact lines
-