public static function resolveDefaults(&$defaults, $reverse = FALSE) {
self::lookupValue($defaults, 'financial_type', CRM_Contribute_PseudoConstant::financialType(), $reverse);
self::lookupValue($defaults, 'payment_instrument', CRM_Contribute_PseudoConstant::paymentInstrument(), $reverse);
- self::lookupValue($defaults, 'contribution_status', CRM_Contribute_PseudoConstant::contributionStatus(), $reverse);
+ self::lookupValue($defaults, 'contribution_status', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), $reverse);
self::lookupValue($defaults, 'pcp', CRM_Contribute_PseudoConstant::pcPage(), $reverse);
}
2 => [$feeFinancialAccount, 'Integer'],
];
$resultDAO = CRM_Core_DAO::executeQuery($sql, $queryParams);
- $statuses = CRM_Contribute_PseudoConstant::contributionStatus();
+ $statuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
while ($resultDAO->fetch()) {
$paidByLabel = CRM_Core_PseudoConstant::getLabel('CRM_Core_BAO_FinancialTrxn', 'payment_instrument_id', $resultDAO->payment_instrument_id);
// Add field for contribution status
$form->addSelect('contribution_recur_contribution_status_id',
- ['entity' => 'contribution', 'multiple' => 'multiple', 'context' => 'search', 'options' => CRM_Contribute_PseudoConstant::contributionStatus()]
+ ['entity' => 'contribution', 'multiple' => 'multiple', 'context' => 'search', 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label')]
);
$form->addElement('text', 'contribution_recur_processor_id', ts('Processor ID'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionRecur', 'processor_id'));
* Build the form object.
*/
public function buildQuickForm() {
- $status = CRM_Contribute_PseudoConstant::contributionStatus();
+ $status = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
unset($status[2]);
unset($status[5]);
unset($status[6]);
$recur->is_test = 0;
$recur->find();
- $recurStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $recurStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$recurRow = [];
$recurIDs = [];
);
}
elseif ($fieldName === 'contribution_status_id') {
- $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$statusName = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name');
foreach (['In Progress', 'Overdue', 'Refunded'] as $suppress) {
unset($contributionStatuses[CRM_Utils_Array::key($suppress, $statusName)]);
// FIXME: Use *_BAO:buildOptions() method rather than pseudoconstants & fetch programmatically
$values[$table] = [
'contribution_page_id' => CRM_Contribute_PseudoConstant::contributionPage(),
- 'contribution_status_id' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'contribution_status_id' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'financial_type_id' => CRM_Contribute_PseudoConstant::financialType(),
'country_id' => CRM_Core_PseudoConstant::country(),
'gender_id' => CRM_Core_PseudoConstant::get('CRM_Contact_DAO_Contact', 'gender_id'),
//if contribution status is pending then set pay later
$this->_params['is_pay_later'] = FALSE;
- if ($this->_params['contribution_status_id'] == array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus())) {
+ if ($this->_params['contribution_status_id'] == array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'))) {
$this->_params['is_pay_later'] = 1;
}
}
// @todo Move this into CRM_Member_BAO_Membership::processMembership
- $pending = ($this->_params['contribution_status_id'] == array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus())) ? TRUE : FALSE;
+ $pending = ($this->_params['contribution_status_id'] == array_search('Pending', CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'))) ? TRUE : FALSE;
list($membership) = CRM_Member_BAO_Membership::processMembership(
$this->_contactID, $this->_params['membership_type_id'][1], $isTestMembership,
$renewalDate, NULL, $customFieldsFormatted, $numRenewTerms, $this->_membershipId,
'membership_id' => $membershipID,
]);
$recurringContributions = [];
- $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
foreach ($result['values'] as $payment) {
$recurringContributionID = $payment['contribution_id.contribution_recur_id.id'];
* Array of int (civicrm_pledge_payment.id)
*/
public static function findCancelablePayments($pledgeID) {
- $statuses = array_flip(CRM_Contribute_PseudoConstant::contributionStatus());
+ $statuses = array_flip(CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'));
$paymentDAO = new CRM_Pledge_DAO_PledgePayment();
$paymentDAO->pledge_id = $pledgeID;
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
],
'status_id' => [
'title' => ts('Financial Transaction Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
'card_type_id' => [
public function alterDisplay(&$rows) {
$contributionTypes = CRM_Contribute_PseudoConstant::financialType();
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$creditCardTypes = CRM_Financial_DAO_FinancialTrxn::buildOptions('card_type_id');
foreach ($rows as $rowNum => $row) {
// convert display name to links
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
'type' => CRM_Utils_Type::T_INT,
],
$entryFound = FALSE;
$display_flag = $prev_cid = $cid = 0;
$contributionTypes = CRM_Contribute_PseudoConstant::financialType();
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
$contributionPages = CRM_Contribute_PseudoConstant::contributionPage();
$batches = CRM_Batch_BAO_Batch::getBatches();
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
'financial_type_id' => [
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
'financial_type_id' => [
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => ['1'],
],
],
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
],
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [5],
'type' => CRM_Utils_Type::T_INT,
],
* Rows generated by SQL, with an array for each row.
*/
public function alterDisplay(&$rows) {
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
foreach ($rows as $rowNum => $row) {
// convert display name to links
if (array_key_exists('civicrm_contact_sort_name', $row) &&
'contribution_status_id' => array(
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => array('1'),
),
),
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
],
'contribution_status_id' => array(
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => array(1),
'type' => CRM_Utils_Type::T_INT,
),
'contribution_status_id' => array(
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => array(1),
'type' => CRM_Utils_Type::T_INT,
),
*/
public function alterDisplay(&$rows) {
$entryFound = FALSE;
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$contributionPages = CRM_Contribute_PseudoConstant::contributionPage();
foreach ($rows as $rowNum => $row) {
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => ['1'],
],
],
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
],
'contribution_status_id' => array(
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => NULL,
),
),
$entryFound = FALSE;
$eventType = CRM_Core_OptionGroup::values('event_type');
$financialTypes = CRM_Contribute_PseudoConstant::financialType();
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
foreach ($rows as $rowNum => $row) {
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'default' => [1],
],
'total_amount' => ['title' => ts('Contribution Amount')],
$entryFound = FALSE;
$contributionTypes = CRM_Contribute_PseudoConstant::financialType();
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
$batches = CRM_Batch_BAO_Batch::getBatches();
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
'type' => CRM_Utils_Type::T_INT,
],
'total_amount' => ['title' => ts('Contribution Amount')],
$checkList = [];
$contributionTypes = CRM_Contribute_PseudoConstant::financialType();
- $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus();
+ $contributionStatus = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label');
$paymentInstruments = CRM_Contribute_PseudoConstant::paymentInstrument();
$repeatFound = FALSE;
'contribution_status_id' => [
'title' => ts('Contribution Status'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
- 'options' => CRM_Contribute_PseudoConstant::contributionStatus(),
+ 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'),
],
],
'grouping' => 'member-fields',