CRM-19660: Financial Transaction stores wrong transaction date if the contribution...
authorjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 17 Nov 2016 09:24:40 +0000 (14:54 +0530)
committerjitendrapurohit <jitendra.purohit@webaccessglobal.com>
Thu, 17 Nov 2016 09:24:40 +0000 (14:54 +0530)
CRM/Contribute/BAO/Contribution.php

index 1ace2da120cdb3e7f48e80dc6e969bc3c67191a1..6c05e09c71bc6b78f90c3352c2dbac282e4af627 100644 (file)
@@ -3194,7 +3194,7 @@ INNER JOIN civicrm_activity ON civicrm_activity_contact.activity_id = civicrm_ac
         'payment_instrument_id' => CRM_Utils_Array::value('payment_instrument_id', $params, $params['contribution']->payment_instrument_id),
         'check_number' => CRM_Utils_Array::value('check_number', $params),
       );
-      if ($contributionStatus == 'Refunded' || $contributionStatus == 'Chargeback') {
+      if ($contributionStatus == 'Refunded' || $contributionStatus == 'Chargeback' || $contributionStatus == 'Cancelled') {
         $trxnParams['trxn_date'] = !empty($params['contribution']->cancel_date) ? $params['contribution']->cancel_date : date('YmdHis');
         if (isset($params['refund_trxn_id'])) {
           // CRM-17751 allow a separate trxn_id for the refund to be passed in via api & form.