Bug Fix [ 1759492 ] Null pointer in FactLine.java

This commit is contained in:
Carlos Ruiz 2007-07-26 04:20:04 +00:00
parent 23608a8e66
commit 9beefc2681
1 changed files with 4 additions and 4 deletions

View File

@ -426,26 +426,26 @@ public final class Fact
{ {
if (difference.isReversal()) if (difference.isReversal())
{ {
line.setAccount(m_acctSchema, m_acctSchema.getDueTo_Acct(elementType));
line.setAmtSource(m_doc.getC_Currency_ID(), Env.ZERO, difference.getPostBalance()); line.setAmtSource(m_doc.getC_Currency_ID(), Env.ZERO, difference.getPostBalance());
line.setAccount(m_acctSchema, m_acctSchema.getDueTo_Acct(elementType));
} }
else else
{ {
line.setAccount(m_acctSchema, m_acctSchema.getDueFrom_Acct(elementType));
line.setAmtSource(m_doc.getC_Currency_ID(), difference.getPostBalance(), Env.ZERO); line.setAmtSource(m_doc.getC_Currency_ID(), difference.getPostBalance(), Env.ZERO);
line.setAccount(m_acctSchema, m_acctSchema.getDueFrom_Acct(elementType));
} }
} }
else else
{ {
if (difference.isReversal()) if (difference.isReversal())
{ {
line.setAccount(m_acctSchema, m_acctSchema.getDueFrom_Acct(elementType));
line.setAmtSource(m_doc.getC_Currency_ID(), difference.getPostBalance(), Env.ZERO); line.setAmtSource(m_doc.getC_Currency_ID(), difference.getPostBalance(), Env.ZERO);
line.setAccount(m_acctSchema, m_acctSchema.getDueFrom_Acct(elementType));
} }
else else
{ {
line.setAccount(m_acctSchema, m_acctSchema.getDueTo_Acct(elementType));
line.setAmtSource(m_doc.getC_Currency_ID(), Env.ZERO, difference.getPostBalance()); line.setAmtSource(m_doc.getC_Currency_ID(), Env.ZERO, difference.getPostBalance());
line.setAccount(m_acctSchema, m_acctSchema.getDueTo_Acct(elementType));
} }
} }
line.convert(); line.convert();