* published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ $contactCategory = _getRequestParamValue('contcat'); $contactCategoryLabel = 'Expense'; if ($contactCategory == 'revenue') { $contactCategoryLabel = 'Revenue'; } if ($contactCategory == 'all') { $contactCategoryLabel = ''; } $current_url = explode('/', $_SERVER['REQUEST_URI']); if ($current_url[1] == 'contract' && ($current_url[2] == 'search' || $current_url[2] == 'all') && $current_url[3] == 'transactions') { $summaryTitle = ""; } else { if (_checkbook_check_is_mwbe_page()) { $summaryTitle = MappingUtil::getCurrenEhtnicityName() . " "; } } $summaryTitle .= NodeSummaryUtil::getInitNodeSummaryTitle(); print "<h2 class='contract-title' class='title'>{$summaryTitle} Pending {$contactCategoryLabel} Contracts Transactions</h2>"; global $checkbook_breadcrumb_title; $checkbook_breadcrumb_title = "{$summaryTitle} Pending {$contactCategoryLabel} Contracts Transactions";
if ($smnid == 725) { $noContr = WidgetUtil::getLabel("num_sub_contracts"); $mwbe_category = '<strong>' . WidgetUtil::getLabel("mwbe_category") . '</strong>: ' . strtoupper(MappingUtil::getMinorityCategoryById($row['prime_minority_type_prime_minority_type'])); } else { if ($smnid == 726 || $smnid == 727 || $smnid == 728 || $smnid == 729) { $noContr = WidgetUtil::getLabel("num_sub_contracts"); } else { if ($smnid == 783) { $mwbe_category = '<strong>' . WidgetUtil::getLabel("mwbe_category") . '</strong>: ' . strtoupper(MappingUtil::getMinorityCategoryById($row['current_prime_minority_type_id'])); } else { if ($smnid == 784) { $mwbe_category = '<strong>' . WidgetUtil::getLabel("mwbe_category") . '</strong>: ' . strtoupper(MappingUtil::getMinorityCategoryById($row['minority_type_minority_type'])); } else { if ($smnid == 791) { $noContr = WidgetUtil::getLabel("no_of_contracts"); $mwbe_category = '<strong>' . WidgetUtil::getLabel("mwbe_category") . '</strong>: ' . strtoupper(MappingUtil::getMinorityCategoryById($row['minority_type_minority_type'])); } } } } } } if ($smnid == 369 || $smnid == 785 || $smnid == 726) { $dynamicLabel = WidgetUtil::getLabel("award_method"); } if ($smnid == 370 || $smnid == 786 || $smnid == 727) { $dynamicLabel = WidgetUtil::getLabel("contract_agency"); } if ($smnid == 454 || $smnid == 787 || $smnid == 728) { $dynamicLabel = WidgetUtil::getLabel("industry_name"); }
$mwbe_subven_amount = $node->data[9]['check_amount_sum']; } else { $mwbe_amount = $node->data[9]['check_amount_sum']; $mwbe_subven_amount = 0; } $mwbe_prime_amount = $node->data[5]['check_amount_sum']; // if prime is zero and sub amount is not zero. change dashboard to ms if ($mwbe_prime_amount == null && $mwbe_subven_amount > 0) { $mwbe_amount += $mwbe_subven_amount; RequestUtil::$is_prime_mwbe_amount_zero_sub_mwbe_not_zero = true; $mwbe_active_domain_link = preg_replace('/\\/dashboard\\/../', '/dashboard/ms', $mwbe_active_domain_link); } // call function to get mwbe drop down filters. $mwbe_filters = MappingUtil::getCurrentMWBETopNavFilters($mwbe_active_domain_link, "spending"); // call function to get sub vendors drop down filters. $svendor_filters = MappingUtil::getCurrentSubVendorsTopNavFilters($svendor_active_domain_link, "spending"); $svendor_amount = $node->data[7]['check_amount_sum']; } } // 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("tm_wbe") == 'Y') { $svendor_amount = $mwbe_amount; } // make amounts zero for non mwbe and indviduals and others mwbe categories. if (preg_match('/mwbe\\/7/', $_GET['q']) || preg_match('/mwbe\\/11/', $_GET['q'])) { $mwbe_amount = 0; $svendor_amount == 0; } // dont hightlight mwbe for advanced search pages. if (!preg_match('/smnid/', $_GET['q']) && (preg_match('/spending\\/transactions/', $_GET['q']) || preg_match('/contract\\/all\\/transactions/', $_GET['q']) || preg_match('/contract\\/search\\/transactions/', $_GET['q']))) { $mwbeclass = ' ';
static function getNextMWBEDashboardStateParam($current_state = null) { if ($current_state == null) { $current_state = _getRequestParamValue('dashboard'); } if ($current_state == null) { if (preg_match('/contracts/', $_GET['q'])) { $domain = "contracts"; } else { $domain = "spending"; } $applicable_filters = MappingUtil::getCurrentPrimeMWBEApplicableFilters($domain); if (count($applicable_filters) == 0) { return 'ms'; } } switch ($current_state) { case "mp": return "mp"; break; case "sp": return "mp"; break; case "ms": return "ms"; break; case "ss": return "ms"; break; } return "mp"; }
<?php } ?> <?php $minority_type_id = $node->data[0]['minority_type_id']; $address = $node->data[0]['address_line_1']; $address .= " " . $node->data[0]['address_line_2']; $address .= " " . $node->data[0]['city']; $address .= " " . $node->data[0]['state']; $address .= " " . $node->data[0]['zip']; $address .= " " . $node->data[0]['country']; $ethnicities = array(); foreach ($node->data as $row) { if ($row['ethnicity'] != null and trim($row['ethnicity']) != '') { $ethnicities[] = MappingUtil::getMinorityCategoryById($minority_type_id); } } $ethnicity = implode(',', $ethnicities); if ($minority_type_id == "4" || $minority_type_id == "5") { $minority_type_id = "4~5"; } ?> <li><span class="gi-list-item">Address:</span> <?php echo $address; ?> </li> <li><span class="gi-list-item">Total Number of NYC Contracts:</span> <?php echo $total_cont; ?>
$id = "4~5"; unset($checked[$key]); } else { array_push($checked, array($value[0], MappingUtil::getMinorityCategoryById($value[0]), $value[2])); unset($checked[$key]); } } if ($count > 0) { array_push($checked, array($id, 'Asian American', $count)); } } //Data alteration for Vendor Type Facet if ($node->widgetConfig->filterName == 'Vendor Type') { $vendor_types = _getRequestParamValue('vendortype'); $vendor_type_data = MappingUtil::getVendorTypes($checked, $vendor_types); $vendor_type_data = MappingUtil::getVendorTypes($unchecked, $vendor_types); $checked = $vendor_type_data['checked']; $unchecked = $vendor_type_data['unchecked']; } if (count($checked) == 0) { $display_facet = "none"; $span = ""; } else { $display_facet = "block"; $span = "open"; } if (strtolower($filter_name) == 'agency') { if (_checkbook_check_isEDCPage()) { $filter_name = 'Other Government Entity'; } else { $filter_name = 'Citywide Agency';
static function getSpentToDateTitle($widgetTitle) { $dashboard = RequestUtil::getDashboardTitle(); $contractTitle = self::getContractTitle(); $dashboard_param = _getRequestParamValue('dashboard'); $smnid = _getRequestParamValue('smnid'); if ($smnid == 720) { if ($dashboard_param == "ms") { $dashboard = "M/WBE"; } else { if ($dashboard_param == "ss") { $dashboard = ""; } } } else { if ($smnid == "subven_mwbe_contracts_visual_2" && $dashboard_param == "ms") { $dashboard = MappingUtil::getCurrenEhtnicityName(); } else { if ($smnid == "mwbe_contracts_visual_2") { $dashboard = MappingUtil::getCurrenEhtnicityName(); } else { if ($smnid == "subvendor_contracts_visual_1" && $dashboard_param == "ss") { $dashboard = MappingUtil::getCurrenEhtnicityName(); } else { if ($smnid == "subvendor_contracts_visual_1" && $dashboard_param == "sp") { $dashboard = MappingUtil::getCurrenEhtnicityName(); } } } } } return $dashboard . " " . $widgetTitle . " " . $contractTitle . " Contracts Transactions"; }
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; }
<div class="current-amount"><?php echo custom_number_formatter_format($total_current_amount, 2, '$'); ?> <div class="amount-title">Total Current Amount </div> </div> </div> <?php $index_spending = 0; foreach ($vendor_contract_summary as $vendor => $vendor_summary) { $original_amount = $vendor_summary['original_amount']; $current_amount = $vendor_summary['current_amount']; $open = $index_spending == 0 ? '' : 'open'; //Main table columns $tbl_spending['body']['rows'][$index_spending]['columns'] = array(array('value' => "<a class='showHide " . $open . " expandTwo' ></a>" . $vendor, 'type' => 'text'), array('value' => MappingUtil::getMinorityCategoryById($vendor_summary['minority_type_id']), 'type' => 'text'), array('value' => custom_number_formatter_format($current_amount, 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($original_amount, 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($vendor_summary['check_amount'], 2, '$'), 'type' => 'number')); /* SUB CONTRACT REFERENCE ID*/ $index_sub_contract_reference = 0; $tbl_subcontract_reference = array(); foreach ($sub_contract_reference[$vendor] as $reference_id => $value) { $ref_id = $reference_id; $open = $index_sub_contract_reference == 0 ? '' : 'open'; $tbl_subcontract_reference['body']['rows'][$index_sub_contract_reference]['columns'] = array(array('value' => "<a class='showHide " . $open . " expandTwo' ></a>SUB CONTRACT REFERENCE ID: " . $ref_id, 'type' => 'text')); /* CONTRACT HISTORY BY SUB VENDOR */ //Main table header $tbl_contract_history = array(); $tbl_contract_history['header']['title'] = "<h3>CONTRACT HISTORY BY SUB VENDOR</h3>"; $tbl_contract_history['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("fiscal_year"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("no_of_mod"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("current_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("original_amount"), 'type' => 'number')); $index_contract_history = 0; if (count($vendor_contract_yearly_summary[$ref_id]) > 0) { foreach ($vendor_contract_yearly_summary[$ref_id] as $year => $results_contract_history_fy) {
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ $records = $node->data; if (is_array($records)) { $row = $records[0]; $title = eval($node->widgetConfig->summaryView->templateTitleEval); $label = $node->widgetConfig->summaryView->templateLabel; $value = eval($node->widgetConfig->summaryView->templateLabelEval); $ytdspending = WidgetUtil::getLabel("ytd_spending"); $totcontamnt = WidgetUtil::getLabel("total_contract_amount"); $mwbe_category_label = WidgetUtil::getLabel("mwbe_category"); $mwbe_category = strtoupper(MappingUtil::getMinorityCategoryById($row['minority_type_minority_type'])); $percent_spending = WidgetUtil::getLabel("percent_spending"); $percent_spending_value = $row['percent_spending']; $summaryContent = <<<EOD <div class="contract-details-heading"> \t<div class="contract-id"> \t\t<h2 class="contract-title">{$title}</h2> \t\t<div class="spending-tx-subtitle"><b>{$label}</b>: {$value}<br><b>{$mwbe_category_label}</b>: {$mwbe_category}</div> \t</div> \t<div class="dollar-amounts"> <div class="total-spending-contract-amount"> {$row['formatted_total_contract_amount_sum']} <div class="amount-title">{$totcontamnt}</div> </div> <div class="ytd-spending-amount"> {$row['formatted_check_amount_sum']}
public static function get_mwbe_category_url($minority_type_category_id, $is_prime_or_sub = null, $doctype = null) { $lower_doctype = strtolower($doctype); /* Begin update for NYCCHKBK-4676 */ $minority_type_category_name = MappingUtil::getMinorityCategoryById($minority_type_category_id); $dtsmnid = _getRequestParamValue("dtsmnid"); $smnid = _getRequestParamValue("smnid"); $dashboard = _getRequestParamValue("dashboard"); if ($dtsmnid != null) { $nid = $dtsmnid; } else { if ($smnid != null) { $nid = $smnid; } } $no_link = $dashboard == "mp" && $nid == 720; $no_link = $no_link || preg_match('/s/', $dashboard) && ($nid == 725 || $nid == 783); if ($no_link) { return $minority_type_category_name; } /* End update for NYCCHKBK-4676 */ $mwbe_cats = MappingUtil::getMinorityCategoryMappings(); $minority_type_category_string = implode('~', $mwbe_cats[$minority_type_category_name]); $current_url = explode('/', $_SERVER['HTTP_REFERER']); $status_index = array_search('contstatus', $current_url); $category_index = array_search('contcat', $current_url); $status = filter_xss($current_url[$status_index + 1]); $category = filter_xss($current_url[$category_index + 1]); $dashboard = $is_prime_or_sub == 'S' ? 'ms' : 'mp'; //From sub vendors widget if ($nid == 720) { $dashboard = "sp"; } if ($category == 'expense' && $status != 'P') { $url = '/contracts_landing/status/' . $status . '/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { if ($category == 'revenue' && $status != 'P') { $url = '/contracts_revenue_landing/status/' . $status . '/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { if ($category == 'expense' && $status == 'P') { $url = '/contracts_pending_exp_landing/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { if ($category == 'revenue' && $status == 'P') { $url = '/contracts_pending_rev_landing/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { if ($category == 'all' && $status != 'P') { if (_get_contract_cat($lower_doctype) == 'revenue') { $url = '/contracts_revenue_landing/status/' . $status . '/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { $url = '/contracts_landing/status/' . $status . '/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } } else { if ($category == 'all' && $status == 'P') { if (_get_contract_cat($lower_doctype) == 'revenue') { $url = '/contracts_pending_rev_landing/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } else { $url = '/contracts_pending_exp_landing/yeartype/B/year/' . _getFiscalYearID() . '/dashboard/' . $dashboard . '/mwbe/' . $minority_type_category_string; } } } } } } } // pending_changes $url .= _checkbook_project_get_url_param_string("agency") . _checkbook_project_get_url_param_string("cindustry") . _checkbook_project_get_url_param_string("csize") . _checkbook_project_get_url_param_string("awdmethod") . _checkbook_project_get_url_param_string("contstatus", "status") . _checkbook_project_get_url_param_string("vendor") . _checkbook_project_get_url_param_string("subvendor"); $result = !in_array($minority_type_category_id, array(7, 11)) ? "<a href='" . $url . "'>" . $minority_type_category_name . "</a>" : $minority_type_category_name; return $result; }