From: jitendrapurohit Date: Thu, 17 Nov 2016 09:24:40 +0000 (+0530) Subject: CRM-19660: Financial Transaction stores wrong transaction date if the contribution... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8a0c74aeeb7ca606716b4a732d1b4f1141e1a320;p=civicrm-core.git CRM-19660: Financial Transaction stores wrong transaction date if the contribution is cancelled --- diff --git a/CRM/Contribute/BAO/Contribution.php b/CRM/Contribute/BAO/Contribution.php index 1ace2da120..6c05e09c71 100644 --- a/CRM/Contribute/BAO/Contribution.php +++ b/CRM/Contribute/BAO/Contribution.php @@ -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.