$year_type_value = 'B'; $q = $q . "/yeartype/B/year/"; } } } else { $display = false; } } else { if (!preg_match('/yeartype/', $_GET['q'])) { $display = false; } } } if ($display) { $dept_Ids = SpendingUtil::getDepartmentIds(); $expCatIds = SpendingUtil::getExpenseCatIds(); $bottomURL = $_REQUEST['expandBottomContURL']; if (isset($bottomURL)) { $pathParams = explode('/', $bottomURL); if (preg_match("/dept/", $bottomURL)) { $index = array_search('dept', $pathParams); $deptId = filter_xss($pathParams[$index + 1]); } if (preg_match("/expcategory/", $bottomURL)) { $index = array_search('expcategory', $pathParams); $expCatId = filter_xss($pathParams[$index + 1]); } } if (!isset($year_id_value)) { $year_id_value = $array_q[$year_key + 1]; if (!($year_id_value > 0)) {
static function getDashboardTopNavURL($dashboard_filter) { if (self::isContractsSpendingLandingPage()) { $url = $_GET['q']; if (preg_match('/contract/', $url)) { $url = ContractUtil::getLandingPageWidgetUrl(null); //Default to active status if (preg_match('/status/', $url)) { $url = preg_replace('/\\/status\\/./', '/status/A', $url); } else { $url = preg_replace('/contracts_landing\\//', 'contracts_landing/status/A/', $url); } } else { //Default to total spending $override_params = array("category" => null); $url = SpendingUtil::getLandingPageWidgetUrl($override_params); } } else { $url = self::getCurrentDomainURLFromParams(); } switch ($dashboard_filter) { case "mwbe": if (_getRequestParamValue("dashboard") != null) { $url = preg_replace('/\\/dashboard\\/[^\\/]*/', '', $url); } $url .= "/dashboard/" . self::getNextMWBEDashboardStateParam(); if (!preg_match('/mwbe/', $url)) { if (_getRequestParamValue("mwbe") != null) { $url .= "/mwbe/" . _getRequestParamValue("mwbe"); } else { $url .= "/mwbe/2~3~4~5~9"; } } break; case "subvendor": if (_getRequestParamValue("dashboard") != null) { $url = preg_replace('/\\/dashboard\\/[^\\/]*/', '', $url); } // tm_wbe is an exception case for total MWBE link. When prime data is not present but sub data is present for the agency vendor combination. if (_getRequestParamValue("dashboard") == 'ms' && _getRequestParamValue("mwbe") == '2~3~4~5~9' && _getRequestParamValue("tm_wbe") != 'Y') { $url = preg_replace('/\\/mwbe\\/[^\\/]*/', '', $url); } $url .= "/dashboard/" . self::getNextSubvendorDashboardStateParam(); break; } return $url; }
/** Returns Spending Category based on 'category' value from current path */ static function getTransactionPageCategoryName($defaultName = 'Total Spending') { $categoryId = _getRequestParamValue('category'); $dtsmnid = _getRequestParamValue('dtsmnid'); $smnid = _getRequestParamValue('smnid'); $nid = isset($dtsmnid) ? $dtsmnid : $smnid; $category_name = $defaultName; if (isset($categoryId)) { $categoryDetails = SpendingUtil::getSpendingCategoryDetails($categoryId, 'display_name'); $category_name = is_array($categoryDetails) ? $categoryDetails[0]['display_name'] : $defaultName; } return $category_name; }
$fiscal_year_id = $spending_results['fiscal_year_id'][0]; } else { $fiscal_year_id = _getCurrentYearID(); } if ($IsOge) { $linkable_fields = array("oge_agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . '/datasource/checkbook_oge' . "/year/" . _getFiscalYearID() . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . '/datasource/checkbook_oge' . '/agency/' . $spending_results['agency_id'] . "/year/" . _getFiscalYearID() . "/yeartype/B/vendor/" . $spending_results["vendor_id"]); } else { if ($spending_results['spending_category_name'] == 'Payroll') { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => $spending_results['vendor_name']); } elseif ($spending_results['vendor_id'] == 1) { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/vendor/" . $spending_results["vendor_id"]); } elseif ($spending_results['is_prime_or_sub'] == 'Yes' && SpendingUtil::getLatestMwbeCategoryBySpendingVendorByTransactionYear($spending_results["vendor_id"], $fiscal_year_id, 'B') == '') { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/subvendor/" . $spending_results["vendor_id"] . "/dashboard/ss"); } elseif ($spending_results['is_prime_or_sub'] == 'No' && SpendingUtil::getLatestMwbeCategoryBySpendingVendorByTransactionYear($spending_results["vendor_id"], $fiscal_year_id, 'B') != '') { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/yeartype/B/year/" . $fiscal_year_id . "/category/" . $spending_results['spending_category_id'] . "/mwbe/2~3~4~5~9/dashboard/mp/vendor/" . $spending_results["vendor_id"]); } elseif ($spending_results['is_prime_or_sub'] == 'Yes' && SpendingUtil::getLatestMwbeCategoryBySpendingVendorByTransactionYear($spending_results["vendor_id"], $fiscal_year_id, 'B') != '') { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/yeartype/B/year/" . $fiscal_year_id . "/category/" . $spending_results['spending_category_id'] . "/mwbe/2~3~4~5~9/dashboard/ms/subvendor/" . $spending_results["vendor_id"]); } else { $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/vendor/" . $spending_results["vendor_id"]); } } if (!$IsOge) { $date_fields = array("check_eft_issued_date"); } $amount_fields = array("check_amount"); $count = 1; $row = array(); $rows = array(); $spending_results["check_eft_issued_date"] = $IsOge ? "N/A" : $spending_results["check_eft_issued_date"]; if ($fiscal_year_id < 111) { $linkable_fields = array();
static function getPrimeVendorEthinictyTitle($vendor_id, $domain, $is_prime_or_sub = "P") { switch ($domain) { case "spending": $ethnicity_id = SpendingUtil::getLatestMwbeCategoryByVendor($vendor_id, null, null, null, $is_prime_or_sub); if ($ethnicity_id > 0) { $title = " <br/><span class=\"second-line\">M/WBE Category: " . MappingUtil::getMinorityCategoryById($ethnicity_id) . "</span>"; } break; case "contracts": $ethnicity_id = ContractUtil::getLatestMwbeCategoryByVendor($vendor_id, null, null, null, $is_prime_or_sub); if (!$ethnicity_id) { $query = "SELECT year_id, minority_type_id\n FROM contract_vendor_latest_mwbe_category\n WHERE vendor_id = " . $vendor_id . " AND is_prime_or_sub = '" . $is_prime_or_sub . "'" . " ORDER BY year_id DESC " . " LIMIT 1 "; $results = _checkbook_project_execute_sql_by_data_source($query, 'checkbook'); if ($results) { $ethnicity_id = $results[0]['minority_type_id']; } } if ($ethnicity_id != 7 && $ethnicity_id != 11) { $title = " <br/><span class=\"second-line\">M/WBE Category: " . MappingUtil::getMinorityCategoryById($ethnicity_id) . "</span>"; } break; } return $title; }