CRM-14957
authorjitendrapurohit <jituraj7760@gmail.com>
Thu, 10 Jul 2014 10:58:50 +0000 (16:28 +0530)
committerjitendrapurohit <jituraj7760@gmail.com>
Thu, 10 Jul 2014 10:58:50 +0000 (16:28 +0530)
CRM/Member/Form/Membership.php

index 4f82025263a1c1a6c377906eed901b32acc5236c..ef3acfb08ec2e220312aa6aff300b94fc96ce98d 100644 (file)
@@ -1682,6 +1682,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
 
       $formValues['contact_id'] = $this->_contactID;
 
+      $formValues['contribution_id'] = CRM_Member_BAO_Membership::getMembershipContributionId($membership->id);
       // send email receipt
       $mailSend = self::emailReceipt($this, $formValues, $membership);
     }
@@ -1855,9 +1856,6 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
     elseif (isset($form->_onlinePendingContributionId)) {
       $form->assign('contributionID', $form->_onlinePendingContributionId);
     }
-    elseif (!empty($form->_defaultValues['contribution_id'])) {
-      $form->assign('contributionID', $form->_defaultValues['contribution_id']);
-    }
 
     if (!empty($formValues['contribution_status_id'])) {
       $form->assign('contributionStatusID', $formValues['contribution_status_id']);