Fixed [ adempiere-Bugs-1693362 ] current ADempiere show credit and debit negative
http://sourceforge.net/tracker/?func=detail&atid=879332&aid=1693362&group_id=176962
This commit is contained in:
parent
85f2b6ecf2
commit
100da407ea
|
@ -176,6 +176,26 @@ public final class FactLine extends X_Fact_Acct
|
|||
*/
|
||||
public boolean setAmtSource (int C_Currency_ID, BigDecimal AmtSourceDr, BigDecimal AmtSourceCr)
|
||||
{
|
||||
// begin Victor Perez e-evolution 30.08.2005
|
||||
// fix Debit & Credit
|
||||
if (AmtSourceDr != null)
|
||||
{
|
||||
if (AmtSourceDr.compareTo(Env.ZERO) == -1)
|
||||
{
|
||||
AmtSourceCr = AmtSourceDr.abs();
|
||||
AmtSourceDr = Env.ZERO;
|
||||
}
|
||||
}
|
||||
if (AmtSourceCr != null)
|
||||
{
|
||||
if (AmtSourceCr.compareTo(Env.ZERO) == -1)
|
||||
{
|
||||
AmtSourceDr = AmtSourceCr.abs();
|
||||
AmtSourceCr = Env.ZERO;
|
||||
}
|
||||
}
|
||||
// end Victor Pérez e-evolution 30.08.2005
|
||||
|
||||
setC_Currency_ID (C_Currency_ID);
|
||||
if (AmtSourceDr != null)
|
||||
setAmtSourceDr (AmtSourceDr);
|
||||
|
@ -208,6 +228,19 @@ public final class FactLine extends X_Fact_Acct
|
|||
*/
|
||||
public void setAmtAcct(BigDecimal AmtAcctDr, BigDecimal AmtAcctCr)
|
||||
{
|
||||
// begin Victor Perez e-evolution 30.08.2005
|
||||
// fix Debit & Credit
|
||||
if (AmtAcctDr.compareTo(Env.ZERO) == -1)
|
||||
{
|
||||
AmtAcctCr = AmtAcctDr.abs();
|
||||
AmtAcctDr = Env.ZERO;
|
||||
}
|
||||
if (AmtAcctCr.compareTo(Env.ZERO) == -1)
|
||||
{
|
||||
AmtAcctDr = AmtAcctCr.abs();
|
||||
AmtAcctCr = Env.ZERO;
|
||||
}
|
||||
// end Victor Perez e-evolution 30.08.2005
|
||||
setAmtAcctDr (AmtAcctDr);
|
||||
setAmtAcctCr (AmtAcctCr);
|
||||
} // setAmtAcct
|
||||
|
|
Loading…
Reference in New Issue