CRM-17343 add contrib ID to template so invoice is generated
authorBrian Shaughnessy <brian@lcdservices.biz>
Tue, 12 Jan 2016 01:35:51 +0000 (20:35 -0500)
committermonishdeb <monish.deb@webaccessglobal.com>
Wed, 13 Jan 2016 19:07:33 +0000 (00:37 +0530)
CRM/Contribute/BAO/Contribution.php

index e44de0544d9da21b6f88c6a1c277324963b4afcf..70fedbddd927335fe6bf069705b9751e558e150a 100644 (file)
@@ -2444,6 +2444,9 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
       if ($values['event']['is_email_confirm']) {
         $values['is_email_receipt'] = 1;
       }
+
+      $values['contributionId'] = $ids['contribution'];
+
       return CRM_Event_BAO_Event::sendMail($ids['contact'], $values,
         $this->_relatedObjects['participant']->id, $this->is_test, $returnMessageText
       );
@@ -2728,6 +2731,10 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
     if (!empty($values['lineItem']) && !empty($this->_relatedObjects['membership'])) {
       $values['useForMember'] = TRUE;
     }
+
+    $template->assign('contributionId', $this->id);
+    $values['contributionId'] = $this->id;
+
     //assign honor information to receipt message
     $softRecord = CRM_Contribute_BAO_ContributionSoft::getSoftContribution($this->id);