Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5.2
-
Fix Version/s: 4.5.3
-
Component/s: CiviContribute, CiviCRM Search
-
Labels:
-
Documentation Required?:None
Description
Using Search Builder to look for Contributions with an "Account Type Code" or "Account Code" gives a "DB Error: no such field". This was reproduced successfully at demo sites, both Joomla and Drupal installations.
Steps to reproduce:
1. At Search Builder, select "Contributions".
2. In the Field, select "Account Type Code" or "Account Code".
3. Use operator "=" (others also fail).
4. In the value, put anything (correct info like "INC" or "4200" also fails).
5. Run the Search, "DB Error: no such field" will show up.
The log says:
[debug_info] => SELECT DISTINCT UPPER(LEFT(contact_a.sort_name, 1)) as sort_name FROM civicrm_contact contact_a LEFT JOIN civicrm_contribution ON civicrm_contribution.contact_id = contact_a.id WHERE ( ( LOWER(civicrm_financial_account.account_type_code) = '111' ) ) AND (contact_a.is_deleted = 0) ORDER BY UPPER(LEFT(contact_a.sort_name, 1)) asc [nativecode=1054 ** Unknown column 'civicrm_financial_account.account_type_code' in 'where clause']
I couldn't realize that, as the column "account_type_code" IS present in civicrm_financial_account table.
The complete related error log entry is in the attached file.