CRM-16189 Fixed participant payment bug
authorEdsel <edsel.lopez@jmaconsulting.biz>
Mon, 19 Dec 2016 09:29:14 +0000 (14:59 +0530)
committerEdsel <edsel.lopez@jmaconsulting.biz>
Mon, 19 Dec 2016 09:29:14 +0000 (14:59 +0530)
----------------------------------------
* CRM-16189: Improve support for Accrual Method bookkeeping
  https://issues.civicrm.org/jira/browse/CRM-16189

CRM/Contribute/BAO/Contribution.php

index f70b16578dbb64aac801db03777ee325e32bb80c..b388d2f500bc0358ec8f2583399d2d7a864a32b3 100644 (file)
@@ -3785,7 +3785,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
     $defaults = array();
     $contributionDAO = CRM_Contribute_BAO_Contribution::retrieve($getInfoOf, $defaults, CRM_Core_DAO::$_nullArray);
     if (!$participantId) {
-      $participantId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment', $contributionId, 'participant_id');
+      $participantId = CRM_Core_DAO::getFieldValue('CRM_Event_DAO_ParticipantPayment', $contributionId, 'participant_id', 'contribution_id');
     }
 
     if ($paymentType == 'owed') {