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

financial_type_id not returned on Contribution get

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Minor
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.5.8
    • Fix Version/s: 4.7
    • Component/s: CiviCRM API
    • Labels:
      None
    • Documentation Required?:
      None
    • Funding Source:
      Needs Funding

      Description

      If I create some contributions, then use the API explorer or my own hooks to try to get the financial_type_id, it isn't returned. For example, after creating one "Donation" and one "Member Dues" contribution in the sandbox, I used the api explorer to set up:

      $result = civicrm_api3('Contribution', 'get', array(
      'sequential' => 1,
      'return' => "financial_type_id,total_amount",
      ));

      But the results don't include that field:

      {
      "is_error":0,
      "version":3,
      "count":2,
      "values":[

      { "contact_id":"3", "contribution_id":"1", "total_amount":"10.00", "id":"1" }

      ,

      { "contact_id":"3", "contribution_id":"2", "total_amount":"10.00", "id":"2" }

      ]

      Erik Hommel added, on the forum:

      "I do get the financial type if I do a get without a return. So a:

      $result = civicrm_api3('Contribution', 'Get', array());

      does show the financial_type_id in my install.

      But adding the return shows the same problem for me."

        Attachments

          Activity

            People

            • Assignee:
              monish.deb Monish Deb
              Reporter:
              norris Norris Thomlinson
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: