Integrate bug fixing from Teo Sarca
BUG ID 1619076 - Bank statement's StatementDifference becames NULL
This commit is contained in:
parent
013a2e75f9
commit
4164f5a8a8
|
@ -13,6 +13,7 @@
|
||||||
* For the text or an alternative of this public license, you may reach us *
|
* For the text or an alternative of this public license, you may reach us *
|
||||||
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
* ComPiere, Inc., 2620 Augustine Dr. #245, Santa Clara, CA 95054, USA *
|
||||||
* or via info@compiere.org or http://www.compiere.org/license.html *
|
* or via info@compiere.org or http://www.compiere.org/license.html *
|
||||||
|
* Contributor(s): Teo Sarca *
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
package org.compiere.model;
|
package org.compiere.model;
|
||||||
|
|
||||||
|
@ -26,6 +27,9 @@ import org.compiere.util.*;
|
||||||
*
|
*
|
||||||
* @author Eldir Tomassen/Jorg Janke
|
* @author Eldir Tomassen/Jorg Janke
|
||||||
* @version $Id: MBankStatementLine.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
|
* @version $Id: MBankStatementLine.java,v 1.3 2006/07/30 00:51:02 jjanke Exp $
|
||||||
|
*
|
||||||
|
* Carlos Ruiz - globalqss - integrate bug fixing from Teo Sarca
|
||||||
|
* [ 1619076 ] Bank statement's StatementDifference becames NULL
|
||||||
*/
|
*/
|
||||||
public class MBankStatementLine extends X_C_BankStatementLine
|
public class MBankStatementLine extends X_C_BankStatementLine
|
||||||
{
|
{
|
||||||
|
@ -205,7 +209,7 @@ import org.compiere.util.*;
|
||||||
private void updateHeader()
|
private void updateHeader()
|
||||||
{
|
{
|
||||||
String sql = "UPDATE C_BankStatement bs"
|
String sql = "UPDATE C_BankStatement bs"
|
||||||
+ " SET StatementDifference=(SELECT SUM(StmtAmt) FROM C_BankStatementLine bsl "
|
+ " SET StatementDifference=(SELECT COALESCE(SUM(StmtAmt),0) FROM C_BankStatementLine bsl "
|
||||||
+ "WHERE bsl.C_BankStatement_ID=bs.C_BankStatement_ID AND bsl.IsActive='Y') "
|
+ "WHERE bsl.C_BankStatement_ID=bs.C_BankStatement_ID AND bsl.IsActive='Y') "
|
||||||
+ "WHERE C_BankStatement_ID=" + getC_BankStatement_ID();
|
+ "WHERE C_BankStatement_ID=" + getC_BankStatement_ID();
|
||||||
DB.executeUpdate(sql, get_TrxName());
|
DB.executeUpdate(sql, get_TrxName());
|
||||||
|
|
Loading…
Reference in New Issue