diff --git a/CRM/Contribute/BAO/ContributionRecur.php b/CRM/Contribute/BAO/ContributionRecur.php index 7f80887281a1fc7c6f98c613da1af6941a068cc7..38e7cb999a7ffd7af59106bc7da63afd3120338d 100644 --- a/CRM/Contribute/BAO/ContributionRecur.php +++ b/CRM/Contribute/BAO/ContributionRecur.php @@ -774,7 +774,7 @@ INNER JOIN civicrm_contribution con ON ( con.id = mp.contribution_id ) // Add field for contribution status $form->addSelect('contribution_recur_contribution_status_id', - ['entity' => 'contribution', 'multiple' => 'multiple', 'context' => 'search', 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label')] + ['entity' => 'contribution', 'multiple' => 'multiple', 'context' => 'search', 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search')] ); $form->addElement('text', 'contribution_recur_processor_id', ts('Processor ID'), CRM_Core_DAO::getAttribute('CRM_Contribute_DAO_ContributionRecur', 'processor_id')); diff --git a/CRM/Contribute/BAO/Query.php b/CRM/Contribute/BAO/Query.php index 8d5e16ee5cef803b621da0218b9f2dcb38d1b7fb..226544fc227e2364918ea9e434cd711c450b1aaa 100644 --- a/CRM/Contribute/BAO/Query.php +++ b/CRM/Contribute/BAO/Query.php @@ -923,7 +923,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { } /** - * Add all the elements shared between contribute search and advnaced search. + * Add all the elements shared between contribute search and advanced search. * * @param \CRM_Contribute_Form_Search $form * @@ -976,7 +976,7 @@ class CRM_Contribute_BAO_Query extends CRM_Core_BAO_Query { ts('Personal Campaign Page'), CRM_Contribute_PseudoConstant::pcPage(), FALSE, ['class' => 'crm-select2', 'multiple' => 'multiple', 'placeholder' => ts('- any -')]); - $statusValues = CRM_Core_PseudoConstant::get('CRM_Contribute_DAO_Contribution', 'contribution_status_id'); + $statusValues = CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'); $form->add('select', 'contribution_status_id', ts('Contribution Status'), $statusValues, FALSE, ['class' => 'crm-select2', 'multiple' => 'multiple'] diff --git a/CRM/Report/Form/Contribute/Bookkeeping.php b/CRM/Report/Form/Contribute/Bookkeeping.php index 014225adf8994a16da2c0abeea7727c965fae280..230baacfbda9a31c645665c2f8115318e2526827 100644 --- a/CRM/Report/Form/Contribute/Bookkeeping.php +++ b/CRM/Report/Form/Contribute/Bookkeeping.php @@ -326,7 +326,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], ], @@ -386,7 +386,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { 'status_id' => [ 'title' => ts('Financial Transaction Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], 'card_type_id' => [ diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index a6117b3808ab89bdeddf204c8ea1cb42e4b85d32..65f2db9f3840549a01d4a8baa6288ea2346c726e 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -236,7 +236,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], 'type' => CRM_Utils_Type::T_INT, ], diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index 2f8b2e74b16c231a69d38b241e71f8351185ba28..6fed16b24f7c63366062d0df682744d37b24c783 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -248,7 +248,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], 'financial_type_id' => [ diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index 8b300a0cbbccc331a999b41171dc067b7fa80230..2dd9e105661d7e6fa8076c11f092a0e5d1a7e46d 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -149,7 +149,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], 'financial_type_id' => [ diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 15526bd03071c620cfaa5b7f0fcd958fbdf5fa01..078595fd329f06c4ec0778a8ee5f76f74b091987 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -226,7 +226,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => ['1'], ], ], diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index 92d98e2521122ced15bb28065f7711ffd8f03f83..1de4d578704ad1813de0b6639509c71e0e5cbc19 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -159,7 +159,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], ], diff --git a/CRM/Report/Form/Contribute/Recur.php b/CRM/Report/Form/Contribute/Recur.php index 805c7f5a2b5dffc3366e4202c95819788bff6dcf..ac4eae6fd9716107e219af611bfede3e37fc1d6b 100644 --- a/CRM/Report/Form/Contribute/Recur.php +++ b/CRM/Report/Form/Contribute/Recur.php @@ -187,7 +187,7 @@ class CRM_Report_Form_Contribute_Recur extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [5], 'type' => CRM_Utils_Type::T_INT, ], diff --git a/CRM/Report/Form/Contribute/Repeat.php b/CRM/Report/Form/Contribute/Repeat.php index e9540eb1038c752c2f38f07970d69013ac04fc1f..94338418a711c45eb3d99ca86b9bf04c5c9df4fc 100644 --- a/CRM/Report/Form/Contribute/Repeat.php +++ b/CRM/Report/Form/Contribute/Repeat.php @@ -242,7 +242,7 @@ class CRM_Report_Form_Contribute_Repeat extends CRM_Report_Form { 'contribution_status_id' => array( 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => array('1'), ), ), diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 24b1c5a730a314740d8d11eeba2172a19062f12d..a37fdca580a0ca5c5e257d99f1fcda8c40fb9650 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -252,7 +252,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], ], diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index 2239525f91290958e864a563e6055c50e98e2032..735b8c50a8f671a8d1ffce526a32de0af3e7c020 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -156,7 +156,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { 'contribution_status_id' => array( 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => array(1), 'type' => CRM_Utils_Type::T_INT, ), @@ -220,7 +220,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { 'contribution_status_id' => array( 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => array(1), 'type' => CRM_Utils_Type::T_INT, ), diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index 98ac7baefc27127dc917e69eef105b4f1c4ba3ff..463d3f9db657109c62a75e50d800f5c5e4857487 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -231,7 +231,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => ['1'], ], ], diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index 093491fdc2c840355035c7c34a936409c2fa888c..a37280741df53e8c35180786fceda774ea55dd0b 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -156,7 +156,7 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], ], diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index a3106d0b7de69c84a5e3e887530aa2b51d6043b4..063950ae235ff95a32b1f3364414b80ddcbda8df 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -353,7 +353,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form { 'contribution_status_id' => array( 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => NULL, ), ), diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index ae361ba20ce04ec71bbc219f0e653d4848e67719..a976715062fd06f02672db5aa6b7a74ffca22f90 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -221,7 +221,7 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'default' => [1], ], 'total_amount' => ['title' => ts('Contribution Amount')], diff --git a/CRM/Report/Form/Member/Detail.php b/CRM/Report/Form/Member/Detail.php index c9d1effe5da8ad22c5c14e06c6bb3e21a709bf75..57820dd6dbdb8018bc851af4bcbdfd8522abe4cd 100644 --- a/CRM/Report/Form/Member/Detail.php +++ b/CRM/Report/Form/Member/Detail.php @@ -225,7 +225,7 @@ class CRM_Report_Form_Member_Detail extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), 'type' => CRM_Utils_Type::T_INT, ], 'total_amount' => ['title' => ts('Contribution Amount')], diff --git a/CRM/Report/Form/Member/Summary.php b/CRM/Report/Form/Member/Summary.php index 620189b553ea07aacd313b7107e72a30bbb1f852..2afd8a43f77483b3bc9c3a6609979f728d0beb76 100644 --- a/CRM/Report/Form/Member/Summary.php +++ b/CRM/Report/Form/Member/Summary.php @@ -165,7 +165,7 @@ class CRM_Report_Form_Member_Summary extends CRM_Report_Form { 'contribution_status_id' => [ 'title' => ts('Contribution Status'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, - 'options' => CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'label'), + 'options' => CRM_Contribute_BAO_Contribution::buildOptions('contribution_status_id', 'search'), ], ], 'grouping' => 'member-fields',