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
|
@ -175,7 +175,27 @@ public final class FactLine extends X_Fact_Acct
|
|||
* @return true, if any if the amount is not zero
|
||||
*/
|
||||
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);
|
||||
|
@ -207,7 +227,20 @@ public final class FactLine extends X_Fact_Acct
|
|||
* @param AmtAcctCr acct amount cr
|
||||
*/
|
||||
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