Minor change
authormonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 11:01:47 +0000 (16:31 +0530)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 29 Oct 2014 11:01:47 +0000 (16:31 +0530)
CRM/Contribute/BAO/Contribution.php

index 1fa15e87f674e0149f8b8161fa6bef0101901d9d..bffeb39cd3e139b8dc9ead66327ad99fc691460c 100644 (file)
@@ -3359,12 +3359,11 @@ WHERE eft.financial_trxn_id IN ({$trxnId}, {$baseTrxnId['financialTrxnId']})
 
       if (!$contributionId) {
         if ($primaryParticipantId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_Participant', $id, 'registered_by_id')) {
-          if ($contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $primaryParticipantId, 'contribution_id', 'participant_id')) {
-            $id = $primaryParticipantId;
-          }
-          else {
-            return;
-          }
+          $contributionId = CRM_Core_DAO::getFieldValue('CRM_Event_BAO_ParticipantPayment', $primaryParticipantId, 'contribution_id', 'participant_id');
+          $id = $primaryParticipantId;
+        }
+        if (!$contributionId) {
+          return;
         }
       }
     }