Menu

#2501 Payment Rule incorectly filling Direct Debit bank account

Core
open-accepted
Payment (68)
3
2011-01-21
2010-09-09
mckayERP
No

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'";

Discussion

  • Carlos Ruiz

    Carlos Ruiz - 2011-01-21
    • priority: 5 --> 3
    • assigned_to: nobody --> globalqss
    • status: open --> open-accepted
     

Log in to post a comment.