IDEMPIERE-462 Ticket #1001503: Credit Cards Online - fix credit card online processing - make forms safer - they can fail if AccountNo or IsDefault column is added to the bank

This commit is contained in:
Carlos Ruiz 2014-08-11 09:16:53 +02:00
parent 9d6fbe06d2
commit f4f2cb9555
2 changed files with 4 additions and 4 deletions

View File

@ -109,10 +109,10 @@ public abstract class PaymentFormCash extends PaymentForm {
* Load Bank Accounts * Load Bank Accounts
*/ */
String SQL = MRole.getDefault().addAccessSQL( String SQL = MRole.getDefault().addAccessSQL(
"SELECT C_BankAccount_ID, ba.Name || ' ' || AccountNo, IsDefault " "SELECT C_BankAccount_ID, ba.Name || ' ' || ba.AccountNo, ba.IsDefault "
+ "FROM C_BankAccount ba" + "FROM C_BankAccount ba"
+ " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) " + " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) "
+ "WHERE b.IsActive='Y'", + "WHERE b.IsActive='Y' AND ba.IsActive='Y'",
"ba", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); "ba", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;

View File

@ -85,10 +85,10 @@ public abstract class PaymentFormCheck extends PaymentForm {
* Load Bank Accounts * Load Bank Accounts
*/ */
String SQL = MRole.getDefault().addAccessSQL( String SQL = MRole.getDefault().addAccessSQL(
"SELECT C_BankAccount_ID, ba.Name || ' ' || AccountNo, IsDefault " "SELECT C_BankAccount_ID, ba.Name || ' ' || ba.AccountNo, ba.IsDefault "
+ "FROM C_BankAccount ba" + "FROM C_BankAccount ba"
+ " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) " + " INNER JOIN C_Bank b ON (ba.C_Bank_ID=b.C_Bank_ID) "
+ "WHERE b.IsActive='Y'", + "WHERE b.IsActive='Y' AND ba.IsActive='Y'",
"ba", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO); "ba", MRole.SQL_FULLYQUALIFIED, MRole.SQL_RO);
PreparedStatement pstmt = null; PreparedStatement pstmt = null;
ResultSet rs = null; ResultSet rs = null;