Skip to content

Commit

Permalink
Additional email greetings in message templates
Browse files Browse the repository at this point in the history
  • Loading branch information
agh1 authored and magnolia61 committed Oct 18, 2019
1 parent 5e77b3e commit fd5576b
Show file tree
Hide file tree
Showing 13 changed files with 385 additions and 36 deletions.
1 change: 1 addition & 0 deletions CRM/Event/BAO/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -1172,6 +1172,7 @@ public static function sendMail($contactID, $values, $participantId, $isTest = F
'customPost' => $profilePost[0],
'customPost_grouptitle' => $customPostTitles,
'participantID' => $participantId,
'contactID' => $contactID,
'conference_sessions' => $sessions,
'credit_card_number' => CRM_Utils_System::mungeCreditCard(CRM_Utils_Array::value('credit_card_number', $participantParams)),
'credit_card_exp_date' => CRM_Utils_Date::mysqlToIso(CRM_Utils_Date::format(CRM_Utils_Array::value('credit_card_exp_date', $participantParams))),
Expand Down
1 change: 0 additions & 1 deletion CRM/Event/Form/Registration/Confirm.php
Original file line number Diff line number Diff line change
Expand Up @@ -915,7 +915,6 @@ public function postProcess() {
$this->_values['params']['isRequireApproval'] = $this->_requireApproval;

//send mail to primary as well as additional participants.
$this->assign('contactID', $contactId);
CRM_Event_BAO_Event::sendMail($contactId, $this->_values, $participantID, $isTest);
}
}
Expand Down
30 changes: 15 additions & 15 deletions CRM/Financial/BAO/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,27 +60,27 @@ public static function create($params) {
$isPaymentCompletesContribution = self::isPaymentCompletesContribution($params['contribution_id'], $params['total_amount']);

if ($params['total_amount'] > 0) {
$balanceTrxnParams['to_financial_account_id'] = CRM_Contribute_BAO_Contribution::getToFinancialAccount($contribution, $params);
$balanceTrxnParams['from_financial_account_id'] = CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship($contribution['financial_type_id'], 'Accounts Receivable Account is');
$balanceTrxnParams['total_amount'] = $params['total_amount'];
$balanceTrxnParams['contribution_id'] = $params['contribution_id'];
$balanceTrxnParams['trxn_date'] = CRM_Utils_Array::value('trxn_date', $params, CRM_Utils_Array::value('contribution_receive_date', $params, date('YmdHis')));
$balanceTrxnParams['fee_amount'] = CRM_Utils_Array::value('fee_amount', $params);
$balanceTrxnParams['net_amount'] = CRM_Utils_Array::value('total_amount', $params);
$balanceTrxnParams['currency'] = $contribution['currency'];
$balanceTrxnParams['trxn_id'] = CRM_Utils_Array::value('contribution_trxn_id', $params, NULL);
$balanceTrxnParams['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'status_id', 'Completed');
$balanceTrxnParams['payment_instrument_id'] = CRM_Utils_Array::value('payment_instrument_id', $params, $contribution['payment_instrument_id']);
$balanceTrxnParams['check_number'] = CRM_Utils_Array::value('check_number', $params);
$balanceTrxnParams['is_payment'] = 1;
$paymentTrxnParams['to_financial_account_id'] = CRM_Contribute_BAO_Contribution::getToFinancialAccount($contribution, $params);
$paymentTrxnParams['from_financial_account_id'] = CRM_Financial_BAO_FinancialAccount::getFinancialAccountForFinancialTypeByRelationship($contribution['financial_type_id'], 'Accounts Receivable Account is');
$paymentTrxnParams['total_amount'] = $params['total_amount'];
$paymentTrxnParams['contribution_id'] = $params['contribution_id'];
$paymentTrxnParams['trxn_date'] = CRM_Utils_Array::value('trxn_date', $params, CRM_Utils_Array::value('contribution_receive_date', $params, date('YmdHis')));
$paymentTrxnParams['fee_amount'] = CRM_Utils_Array::value('fee_amount', $params);
$paymentTrxnParams['net_amount'] = CRM_Utils_Array::value('total_amount', $params);
$paymentTrxnParams['currency'] = $contribution['currency'];
$paymentTrxnParams['trxn_id'] = CRM_Utils_Array::value('contribution_trxn_id', $params, NULL);
$paymentTrxnParams['status_id'] = CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'status_id', 'Completed');
$paymentTrxnParams['payment_instrument_id'] = CRM_Utils_Array::value('payment_instrument_id', $params, $contribution['payment_instrument_id']);
$paymentTrxnParams['check_number'] = CRM_Utils_Array::value('check_number', $params);
$paymentTrxnParams['is_payment'] = 1;

if (!empty($params['payment_processor'])) {
// I can't find evidence this is passed in - I was gonna just remove it but decided to deprecate as I see getToFinancialAccount
// also anticipates it.
CRM_Core_Error::deprecatedFunctionWarning('passing payment_processor is deprecated - use payment_processor_id');
$balanceTrxnParams['payment_processor_id'] = $params['payment_processor'];
$paymentTrxnParams['payment_processor_id'] = $params['payment_processor'];
}
$trxn = CRM_Core_BAO_FinancialTrxn::create($balanceTrxnParams);
$trxn = CRM_Core_BAO_FinancialTrxn::create($paymentTrxnParams);

// @todo - this is just weird & historical & inconsistent - why 2 tracks?
if (!empty($params['line_item']) && !empty($trxn)) {
Expand Down
2 changes: 1 addition & 1 deletion api/v3/Contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -1195,7 +1195,7 @@ function _civicrm_api3_contact_merge_spec(&$params) {
$params['mode'] = [
'title' => ts('Dedupe mode'),
'description' => ts("In 'safe' mode conflicts will result in no merge. In 'aggressive' mode the merge will still proceed (hook dependent)"),
'api.default' => ['safe', 'aggressive'],
'api.default' => 'safe',
'options' => ['safe' => ts('Abort on unhandled conflict'), 'aggressive' => ts('Proceed on unhandled conflict. Note hooks may change handling here.')],
];
}
Expand Down
13 changes: 13 additions & 0 deletions release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Other resources for identifying changes are:
* https://github.com/civicrm/civicrm-joomla
* https://github.com/civicrm/civicrm-wordpress

<<<<<<< HEAD
## CiviCRM 5.18.3

Released October 15, 2019
Expand All @@ -23,6 +24,18 @@ Released October 15, 2019
- **[Bugs resolved](release-notes/5.18.3.md#bugs)**
- **[Credits](release-notes/5.18.3.md#credits)**
- **[Feedback](release-notes/5.18.3.md#feedback)**
=======
## CiviCRM 5.19.0

Released November 6, 2019

- **[Synopsis](release-notes/5.19.0.md#synopsis)**
- **[Features](release-notes/5.19.0.md#features)**
- **[Bugs resolved](release-notes/5.19.0.md#bugs)**
- **[Miscellany](release-notes/5.19.0.md#misc)**
- **[Credits](release-notes/5.19.0.md#credits)**
- **[Feedback](release-notes/5.19.0.md#feedback)**
>>>>>>> b3172becb1... 5.19.0 release notes: added boilerplate
## CiviCRM 5.18.2

Expand Down
Loading

0 comments on commit fd5576b

Please sign in to comment.