IDEMPIERE-4108 Set LineNo programmatically for GL_JournalLine

This commit is contained in:
Nicolas Micoud 2019-11-27 10:45:20 +01:00
parent a63306ef4a
commit 90b40ac9ec
1 changed files with 3 additions and 0 deletions

View File

@ -305,6 +305,9 @@ public class MJournalLine extends X_GL_JournalLine
fillDimensionsFromCombination();
// end idempiere 344 - nmicoud
if (getLine() == 0)
setLine(DB.getSQLValueEx(get_TrxName(), "SELECT COALESCE(MAX(Line), 0) + 10 FROM GL_JournalLine WHERE GL_Journal_ID = ?", getGL_Journal_ID()));
// Acct Amts
BigDecimal rate = getCurrencyRate();
BigDecimal amt = rate.multiply(getAmtSourceDr());