In VPayment.java, line 680, an sql query is used to fill the bank accounts associated with direct debit (interac) cards. They query is
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'";
There is no join from C_BP_BankAccount to C_Bank so the query returns all C_BP_BankAccounts for every C_Bank.
I think the query should read
SQL = "SELECT a.C_BP_BankAccount_ID, NVL(b.Name, ' ')||a.AccountNo AS Acct "
+ "FROM C_BP_BankAccount a,C_Bank b "
+ "WHERE a.C_Bank_ID = b.C_Bank_ID AND a.C_BPartner_ID=? AND a.IsActive='Y'";
Hi Michael, peer reviewed, tested and integrated with modifications into branches globalqss adempiere361.
http://adempiere.hg.sourceforge.net/hgweb/adempiere/adempiere361/rev/3379b7c336fd
Regards,
Carlos Ruiz