Fix [ 1789935 ] Wrong Sum Total Debit/Credit in GL Journal

Thanks to Colin
This commit is contained in:
Carlos Ruiz 2008-02-09 05:09:41 +00:00
parent 6a0b2f1ae3
commit 1ba1780c55
1 changed files with 1 additions and 1 deletions

View File

@ -316,7 +316,7 @@ public class MJournalLine extends X_GL_JournalLine
{
// Update Journal Total
String sql = "UPDATE GL_Journal j"
+ " SET (TotalDr, TotalCr) = (SELECT COALESCE(SUM(AmtSourceDr),0), COALESCE(SUM(AmtSourceCr),0)"
+ " SET (TotalDr, TotalCr) = (SELECT COALESCE(SUM(AmtAcctDr),0), COALESCE(SUM(AmtAcctCr),0)" // croo Bug# 1789935
+ " FROM GL_JournalLine jl WHERE jl.IsActive='Y' AND j.GL_Journal_ID=jl.GL_Journal_ID) "
+ "WHERE GL_Journal_ID=" + getGL_Journal_ID();
int no = DB.executeUpdate(sql, get_TrxName());