Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-15538

DB error on search for account_type_code or account_code

    Details

    • 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.

        Attachments

          Activity

            People

            • Assignee:
              atif.shaikh Atif Shaikh
              Reporter:
              diegov Diego Viegas
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: