CRM-16189, added link on contribution edit form to record payment for pending pay...
[civicrm-core.git] / CRM / Event / BAO / Participant.php
index c63041d35f858ffa0e659eb1a78b4737d18b9cd4..0428b1a18e79b60ece5aca2e3f9d629258fd528d 100644 (file)
@@ -2035,11 +2035,7 @@ WHERE (li.entity_table = 'civicrm_participant' AND li.entity_id = {$participantI
     // the recordAdjustedAmt code would execute over here
     $ids = CRM_Event_BAO_Participant::getParticipantIds($contributionId);
     if (count($ids) > 1) {
-      $total = 0;
-      foreach ($ids as $val) {
-        $total += CRM_Price_BAO_LineItem::getLineTotal($val, 'civicrm_participant');
-      }
-      $updatedAmount = $total;
+      $updatedAmount = CRM_Price_BAO_LineItem::getLineTotal($contributionId);
     }
     else {
       $updatedAmount = $params['amount'];