Skip to content
Snippets Groups Projects
Commit 34de4cef authored by Edselopez's avatar Edselopez
Browse files

RG-141 Reverted status checks

parent 03f6b1a5
No related branches found
No related tags found
No related merge requests found
......@@ -86,11 +86,12 @@ class CRM_Grant_Form_GrantProgramView extends CRM_Core_Form {
public function allocate() {
$grantStatus = CRM_Core_OptionGroup::values('grant_status', TRUE);
if ($_POST['algorithm'] == 'Best to Worst, Fully Funded') {
$statuses = $grantStatus['Eligible'];
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $_POST['algorithm'], 'grouping', 'name');
if ($algoName == 'immediate') {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
}
else {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
$statuses = $grantStatus['Eligible'];
}
$params = array(
'status_id' => $statuses,
......@@ -214,12 +215,12 @@ class CRM_Grant_Form_GrantProgramView extends CRM_Core_Form {
$grantedAmount = 0;
$grantStatus = CRM_Core_OptionGroup::values('grant_status', TRUE);
$algoId = CRM_Core_DAO::getFieldValue('CRM_Grant_DAO_GrantProgram', $_POST['pid'], 'allocation_algorithm');
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'name');
if ($algoName == "Best to Worst, Fully Funded") {
$statuses = $grantStatus['Eligible'];
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'grouping');
if ($algoName == "immediate") {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
}
else {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
$statuses = $grantStatus['Eligible'];
}
$params = array(
'status_id' => $statuses,
......@@ -249,12 +250,12 @@ class CRM_Grant_Form_GrantProgramView extends CRM_Core_Form {
public function processFinalization() {
$grantStatus = CRM_Core_OptionGroup::values('grant_status', TRUE);
$algoId = CRM_Core_DAO::getFieldValue('CRM_Grant_DAO_GrantProgram', $_POST['pid'], 'allocation_algorithm');
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'name');
if ($algoName == "Best to Worst, Fully Funded") {
$statuses = $grantStatus['Eligible'];
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'grouping', 'name');
if ($algoName == "immediate") {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
}
else {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
$statuses = $grantStatus['Eligible'];
}
$params = array(
'status_id' => $statuses,
......@@ -277,12 +278,12 @@ class CRM_Grant_Form_GrantProgramView extends CRM_Core_Form {
public function reject() {
$grantStatus = CRM_Core_OptionGroup::values( 'grant_status', TRUE);
$algoId = CRM_Core_DAO::getFieldValue('CRM_Grant_DAO_GrantProgram', $_POST['pid'], 'allocation_algorithm');
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'name');
if ($algoName == "Best to Worst, Fully Funded") {
$statuses = $grantStatus['Eligible'];
$algoName = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_OptionValue', $algoId, 'grouping', 'name');
if ($algoName == "immediate") {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
}
else {
$statuses = $grantStatus['Eligible'].', '.$grantStatus['Awaiting Information'].', '.$grantStatus['Submitted'];
$statuses = $grantStatus['Eligible'];
}
$id = $_POST['pid'];
$params = array(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment