public FactLine balanceSource(){
  if (!m_acctSchema.isSuspenseBalancing() || m_doc.isMultiCurrency())   return null;
  BigDecimal diff=getSourceBalance();
  log.finer("Diff=" + diff);
  FactLine line=new FactLine(m_doc.getCtx(),m_doc.get_Table_ID(),m_doc.get_ID(),0,m_trxName);
  line.setDocumentInfo(m_doc,null);
  line.setPostingType(m_postingType);
  line.setAccount(m_acctSchema,m_acctSchema.getSuspenseBalancing_Acct());
  if (diff.signum() < 0)   line.setAmtSource(m_doc.getC_Currency_ID(),diff.abs(),Env.ZERO);
 else   line.setAmtSource(m_doc.getC_Currency_ID(),Env.ZERO,diff);
  line.convert();
  log.fine(line.toString());
  m_lines.add(line);
  return line;
}

public FactLine balanceSource ( ) { if ( ! m_acctSchema . isSuspenseBalancing ( ) || m_doc . isMultiCurrency ( ) ) return null ; BigDecimal diff = getSourceBalance ( ) ; log . finer ( "Diff=" + diff ) ; FactLine line = new FactLine ( m_doc . getCtx ( ) , m_doc . get_Table_ID ( ) , m_doc . get_ID ( ) , 0 , m_trxName ) ; line . setDocumentInfo ( m_doc , null ) ; line . setPostingType ( m_postingType ) ; line . setAccount ( m_acctSchema , m_acctSchema . getSuspenseBalancing_Acct ( ) ) ; if ( diff . signum ( ) < 0 ) line . setAmtSource ( m_doc . getC_Currency_ID ( ) , diff . abs ( ) , Env . ZERO ) ; else line . setAmtSource ( m_doc . getC_Currency_ID ( ) , Env . ZERO , diff ) ; line . convert ( ) ; log . fine ( line . toString ( ) ) ; m_lines . add ( line ) ; return line ; }
create source line for suspense balancing . only if suspense balancing is enabled and not a multi - currency document ( double check as otherwise the rule should not have fired ) if not balanced create balancing entry in currency of the document
