IDEMPIERE-3349 GL Distribution generate positive posting regardless of the IsAllowNegativePosting flag. / integrate suggestion from Denis Kuznetsov

This commit is contained in:
Carlos Ruiz 2017-04-22 12:49:48 +02:00
parent fd0d04a7af
commit 61dee84cb4
1 changed files with 2 additions and 2 deletions

View File

@ -790,8 +790,8 @@ public final class Fact
factLine.setUser2_ID(dl.getUser2_ID());
// F3P end
//
if (dl.getAmt().signum() < 0)
factLine.setAmtSource(dLine.getC_Currency_ID(), null, dl.getAmt().abs());
if (dLine.getAmtAcctCr().signum() != 0) // isCredit
factLine.setAmtSource(dLine.getC_Currency_ID(), null, dl.getAmt().negate());
else
factLine.setAmtSource(dLine.getC_Currency_ID(), dl.getAmt(), null);
factLine.setQty(dl.getQty());