<?php
/*
+--------------------------------------------------------------------+
- | CiviCRM version 4.6 |
+ | CiviCRM version 4.7 |
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
//for tasks 'Change Participant Status' and 'Batch Update Participants Via Profile' case
//and cases involving status updation through ipn
// whatever that means!
- $values['totalAmount'] = $input['amount'];
+ // total_amount appears to be the preferred input param & it is unclear why we support amount here
+ // perhaps we should throw an e-notice if amount is set & force total_amount?
+ if (!empty($input['amount'])) {
+ $values['totalAmount'] = $input['amount'];
+ }
if ($values['event']['is_email_confirm']) {
$values['is_email_receipt'] = 1;
return;
}
if ($context == 'changedAmount' || $context == 'changeFinancialType') {
- $itemAmount = $params['trxnParams']['total_amount'] = $params['total_amount'] - $params['prevContribution']->total_amount;
+ $itemAmount = $params['trxnParams']['total_amount'] = $params['trxnParams']['net_amount'] = $params['total_amount'] - $params['prevContribution']->total_amount;
}
if ($context == 'changedStatus') {
//get all the statuses
'payment_instrument_id',
'is_test',
'campaign_id',
+ 'receive_date',
);
$contributionParams = array_merge(array(