// all possible statuses are disabled - redirect back to contact form
CRM_Core_Error::statusBounce(ts('There are no configured membership statuses. You cannot add this membership until your membership statuses are correctly configured'));
}
-
+ // This should be overwritten from the contribution....
+ $this->assign('currency', \Civi::settings()->get('defaultCurrency'));
parent::preProcess();
$params = [];
$params['context'] = CRM_Utils_Request::retrieve('context', 'Alphanumeric', $this, FALSE, 'membership');
$this->assign('accessContribution', TRUE);
//show associated soft credit when contribution payment is paid by different person
- if ($this->_id && $this->_contactId) {
- $softCreditList = CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $this->_id);
- if (!empty($softCreditList)) {
- $this->assign('softCredit', TRUE);
- $this->assign('softCreditRows', $softCreditList);
- }
- }
+ $softCreditList = ($this->_id && $this->_contactId) ? CRM_Contribute_BAO_ContributionSoft::getSoftContributionList($this->_contactId, $this->_id) : FALSE;
+ $this->assign('softCredit', (bool) $softCreditList);
+ $this->assign('softCreditRows', $softCreditList);
}
else {
$this->_accessContribution = FALSE;