IDEMPIERE-6193: Trial Balance : remove lines where account has no beg… (#2422)
* IDEMPIERE-6193: Trial Balance : remove lines where account has no beginning balance and movement * IDEMPIERE-6193: Trial Balance : remove lines where account has no beginning balance and movement - patch from Carlos Co-Authored-By: Carlos Ruiz <carg67@gmail.com> --------- Co-authored-by: Carlos Ruiz <carg67@gmail.com>
This commit is contained in:
parent
e65879c201
commit
9bb107864f
|
@ -45,7 +45,7 @@ import org.compiere.util.Msg;
|
|||
* @see https://sourceforge.net/p/adempiere/feature-requests/631/
|
||||
* @version $Id: TrialBalance.java,v 1.2 2006/07/30 00:51:05 jjanke Exp $
|
||||
*/
|
||||
@org.adempiere.base.annotation.Process
|
||||
@org.adempiere.base.annotation.Process
|
||||
public class TrialBalance extends SvrProcess
|
||||
{
|
||||
/** AcctSchame Parameter */
|
||||
|
@ -284,8 +284,12 @@ public class TrialBalance extends SvrProcess
|
|||
createBalanceLine();
|
||||
createDetailLines();
|
||||
|
||||
// int AD_PrintFormat_ID = 134;
|
||||
// getProcessInfo().setTransientObject (MPrintFormat.get (getCtx(), AD_PrintFormat_ID, false));
|
||||
final String sql = """
|
||||
DELETE FROM T_TrialBalance WHERE AD_PInstance_ID=?
|
||||
AND Account_ID IN (SELECT Account_ID FROM T_TrialBalance WHERE AD_PInstance_ID=? AND LevelNo=0 AND AmtAcctBalance = 0)
|
||||
AND NOT EXISTS (SELECT 1 FROM T_TrialBalance tbi WHERE AD_PInstance_ID=? AND tbi.Account_ID=T_TrialBalance.Account_ID AND LevelNo>0)""";
|
||||
|
||||
DB.executeUpdateEx(sql, new Object[] {getAD_PInstance_ID(),getAD_PInstance_ID(),getAD_PInstance_ID()}, get_TrxName());
|
||||
|
||||
if (log.isLoggable(Level.FINE)) log.fine((System.currentTimeMillis() - m_start) + " ms");
|
||||
return "";
|
||||
|
|
Loading…
Reference in New Issue