if ($node->widgetConfig->filterName == 'M/WBE Category') { $dashboard = _getRequestParamValue('dashboard'); foreach ($unchecked as $key => $value) { if (isset($dashboard) && $dashboard != 'ss') { if ($value[0] == 7 || $value[0] == 11) { unset($unchecked[$key]); } } } foreach ($checked as $key => $value) { if ($value[0] == 4 || $value[0] == 5) { $count = $count + $value[2]; $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 ($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"); }
<?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; ?>
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; }