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

viewing contribution tab with soft contribution causes ambiguous field SQL error

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.2
    • Fix Version/s: 3.2
    • Component/s: CiviContribute
    • Labels:
      None

      Description

      Nb. using civicrm-3.2.beta3-drupal.tar.gz (and with previous beta)

      I added a contribution on an Individual, marked it as a soft contribution for an organisation. View the contribution, click the link to the company, click Contributions tab.

      Here's what's displayed:

      DB Error: a515ac9c2796ca0e23adbe92c68fc9fc

      Database Error Code: Column 'currency' in field list is ambiguous, 1052

      Return to home page.

      Error Details:

      Array
      (
      [callback] => Array
      (
      [0] => CRM_Core_Error
      [1] => handle
      )

      [code] => a515ac9c2796ca0e23adbe92c68fc9fc
      [message] => DB Error: a515ac9c2796ca0e23adbe92c68fc9fc
      [mode] => 16
      [debug_info] => SELECT SUM(amount) as amount,
      AVG(total_amount) as average,
      currency
      FROM civicrm_contribution_soft ccs
      LEFT JOIN civicrm_contribution cc
      ON ccs.contribution_id = cc.id
      WHERE cc.is_test = 0 AND
      ccs.contact_id = 49
      GROUP BY currency [nativecode=1052 ** Column 'currency' in field list is ambiguous]
      [type] => DB_Error
      [user_info] => SELECT SUM(amount) as amount,
      AVG(total_amount) as average,
      currency
      FROM civicrm_contribution_soft ccs
      LEFT JOIN civicrm_contribution cc
      ON ccs.contribution_id = cc.id
      WHERE cc.is_test = 0 AND
      ccs.contact_id = 49
      GROUP BY currency [nativecode=1052 ** Column 'currency' in field list is ambiguous]
      [to_string] => [db_error: message="DB Error: a515ac9c2796ca0e23adbe92c68fc9fc" code=0 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SUM(amount) as amount,
      AVG(total_amount) as average,
      currency
      FROM civicrm_contribution_soft ccs
      LEFT JOIN civicrm_contribution cc
      ON ccs.contribution_id = cc.id
      WHERE cc.is_test = 0 AND
      ccs.contact_id = 49
      GROUP BY currency [nativecode=1052 ** Column 'currency' in field list is ambiguous]"]
      )

        Attachments

          Activity

            People

            • Assignee:
              dgg David Greenberg
              Reporter:
              artfulrobot.com Rich Lott
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 1 hour
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified