From b9466399038b0a4575c2ff4bde0d87c467ffa356 Mon Sep 17 00:00:00 2001 From: jmpiloq Date: Sat, 26 Mar 2011 01:24:29 -0500 Subject: [PATCH] BF [3062723] - Payment Rule incorectly filling Direct Debit bank account http://sourceforge.net/support/tracker.php?aid=3062723 Thanks to Michael McKay (mjmckay) for reporting and suggesting the solution --- .../src/org/compiere/grid/VPayment.java | 8 +++++--- .../src/org/adempiere/webui/apps/form/WPayment.java | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java index 4b6210d1ce..ce5578cc14 100644 --- a/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java +++ b/org.adempiere.ui.swing/src/org/compiere/grid/VPayment.java @@ -677,9 +677,11 @@ public class VPayment extends CDialog /** * Load Accounts */ - SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||a.AccountNo AS Acct " - + "FROM C_BP_BankAccount a,C_Bank b " - + "WHERE C_BPartner_ID=? AND a.IsActive='Y'"; + SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " + + "FROM C_BP_BankAccount a" + + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " + + "WHERE C_BPartner_ID=?" + + "AND a.IsActive='Y' AND a.IsACH='Y'"; kp = null; try { diff --git a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java index d0e4accfbc..50bdcc1bb7 100644 --- a/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java +++ b/org.adempiere.ui.zk/WEB-INF/src/org/adempiere/webui/apps/form/WPayment.java @@ -720,9 +720,11 @@ public class WPayment extends Window /** * Load Accounts */ - SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||a.AccountNo AS Acct " - + "FROM C_BP_BankAccount a,C_Bank b " - + "WHERE C_BPartner_ID=? AND a.IsActive='Y'"; + SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||'_'||NVL(a.AccountNo, ' ') AS Acct " + + "FROM C_BP_BankAccount a" + + " LEFT OUTER JOIN C_Bank b ON (a.C_Bank_ID=b.C_Bank_ID) " + + "WHERE C_BPartner_ID=?" + + "AND a.IsActive='Y' AND a.IsACH='Y'"; try { PreparedStatement pstmt = DB.prepareStatement(SQL, null);