echo $dollars; ?> <?php } ?> </div> <div class="indicator"></div> </td> <?php $class = ""; if (_getRequestParamValue("category") == 4) { $class = ' active'; } $link = RequestUtil::preparePayrollBottomNavFilter("spending_landing", 4); $dollars = "<span class='dollars'>" . custom_number_formatter_format($dollars_by_cat[4], 1, '$') . "</span>"; ?> <td class="last<?php echo $class; ?> "> <div class="positioning"> <?php if ($dollars_by_cat[4] != 0) { ?> <a href="/<?php echo $link; ?> ?expandBottomCont=true"><?php echo $count; ?>
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ print '<div class="dollar-amounts">'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[1]['revenue_amount_sum'], 2, '$') . "<div class='amount-title'>Total Revenue<br />Recognized</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['total_current_modified_budget_amount'], 2, '$') . "<div class='amount-title'>Total Modified<br />Budget</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['total_adopted_amount'], 2, '$') . "<div class='amount-title'>Total Adopted<br />Budget</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['total_current_modified_budget_amount'] - $node->data[1]['revenue_amount_sum'], 2, '$') . "<div class='amount-title'>Total Remaining<br />Budget</div>" . '</div>'; print '</div>';
<div class="dollar-amounts"> <div class="spent-to-date"><?php echo custom_number_formatter_format($contract['rfed_amount'], 2, "\$"); ?> <div class="amount-title">Spent to Date </div> </div> <div class="original-amount"><?php echo custom_number_formatter_format($contract['original_contract_amount'], 2, '$'); ?> <div class="amount-title">Original Amount </div> </div> <div class="current-amount"><?php echo custom_number_formatter_format($contract['maximum_contract_amount'], 2, '$'); ?> <div class="amount-title">Current Amount </div> </div> <div class="spent-to-date"><?php if ($subcontract_details[0]['sub_vendor_count']) { echo $subcontract_details[0]['sub_vendor_count']; } else { echo '0'; } ?> <div class="amount-title">Number of Sub Vendors </div> </div> </div>
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ $output = ''; foreach ($node->data as $key => $value) { $sum += $value['check_amount_sum']; $output .= $value['category_category_spending_category_name'] . ' - ' . custom_number_formatter_format($value['check_amount_sum'], 2, '$') . '<br/>'; } $sum = custom_number_formatter_format($sum, 2, '$'); $output = '<h2 class="pane-title">City Spending</h2>' . '<h4>Agencies Spending</h4><h4>' . $sum . '</h4>' . $output; print $output;
* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ $title = eval($node->widgetConfig->summaryView->templateTitleEval); $month = ''; $year = 'FY' . _getYearValueFromID(_getRequestParamValue('year')); $monthDetails = CheckbookDateUtil::getMonthDetails(_getRequestParamValue('month')); $amount = custom_number_formatter_format(_getRequestParamValue('amt'), 2); if (isset($monthDetails)) { $month = strtoupper($monthDetails[0]['month_name']); } $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>Year</b>: {$year}<br><b>Month</b>: {$month}</div> \t</div> \t<div class="dollar-amounts"><div class="total-spending-amount">{$amount}<div class="amount-title">Total Spending Amount</div></div></div> </div> EOD; print $summaryContent;
* This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ if (_getRequestParamValue("datasource") == "checkbook_oge") { $datasource = "/datasource/checkbook_oge"; } //Main table header $tbl['header']['title'] = "<h3>Spending by Expense Category</h3>"; $tbl['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("expense_category"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("encumbered_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number')); $count = 0; if (count($node->data) > 0) { foreach ($node->data as $row) { $spent_to_date_value = custom_number_formatter_format($row['spending_amount'], 2, '$'); $spent_to_date = custom_number_formatter_format($row['spending_amount'], 2, '$'); //Main table columns $tbl['body']['rows'][$count]['columns'] = array(array('value' => $row['expenditure_object_name'], 'type' => 'text'), array('value' => custom_number_formatter_format($row['encumbered_amount'], 2, '$'), 'type' => 'number'), array('value' => $spent_to_date_value, 'type' => 'number_link', 'link_value' => $spent_to_date)); $count += 1; } } $html = WidgetUtil::generateTable($tbl); echo $html;
?> <?php } ?> </div> <div class="indicator"></div> </td> <?php $class = ""; if (preg_match("/^contracts_pending_rev_landing/", $_GET['q'])) { $class = ' active'; } $pending_rev_link = ContractURLHelper::preparePendingContractsSliderFilter('contracts_pending_rev_landing'); $count = "<span class='count'>" . number_format($node->data[7]['total_contracts']) . "</span>"; $dollars = "<span class='dollars'>" . custom_number_formatter_format($node->data[6]['total_contract_amount'], 1, '$') . "</span>"; ?> <td class="last<?php echo $class; ?> "> <div class="positioning"> <?php if ($node->data[7]['total_contracts'] > 0) { ?> <a href="/<?php echo $pending_rev_link; ?> ?expandBottomCont=true"><?php echo $count; ?>
<?php if ($node->data[0]['parent_contract_number']) { echo $master_link_html; } ?> </div> <div class="dollar-amounts"> <div class="original-amount"> <?php echo custom_number_formatter_format($node->data[0]['original_contract_amount'], 2, '$'); ?> <div class="amount-title">Original Amount</div> </div> <div class="current-amount"> <?php echo custom_number_formatter_format($node->data[0]['maximum_spending_limit'], 2, '$'); ?> <div class="amount-title">Current Amount</div> </div> </div> </div> <div class="contract-information"> <div class="contract-details"> <h4>General Information</h4> <ul class="left"> <li><span class="gi-list-item">Prime Vendor:</span> <a href="<?php echo $vendor_link; ?> "><?php echo $node->data[0]['legal_name_checkbook_vendor'];
/** * Returns the legend displayed in the Sub Vendors (M/WBE) dashboard for the "Sub Spending by M/WBE Share" visualization * @param $year * @param $yeartype * @return string */ static function getSubMWBENYCLegend($year, $yeartype) { $where_filter = "where year_id = {$year} and type_of_year = '{$yeartype}' "; $sql = 'select rm.minority_type_id, rm.minority_type_name , sum(total_spending_amount) total_spending from aggregateon_subven_spending_coa_entities a1 join ref_minority_type rm on rm.minority_type_id = a1.minority_type_id ' . $where_filter . ' group by rm.minority_type_id, rm.minority_type_name '; $spending_rows = _checkbook_project_execute_sql($sql); foreach ($spending_rows as $row) { switch ($row['minority_type_id']) { case '2': $mwbe_spending_sub += $row['total_spending']; break; case '3': $mwbe_spending_sub += $row['total_spending']; break; case '4': $mwbe_spending_sub += $row['total_spending']; break; case '5': $mwbe_spending_sub += $row['total_spending']; break; case '7': $non_mwbe_spending_sub += $row['total_spending']; break; case '9': $mwbe_spending_sub += $row['total_spending']; break; } } $mwbe_share = custom_number_formatter_format($mwbe_spending_sub / ($non_mwbe_spending_sub + $mwbe_spending_sub) * 100, 1, null, '%'); $mwbe_spending = custom_number_formatter_format($mwbe_spending_sub, 2, '$'); $non_mwbe = custom_number_formatter_format($non_mwbe_spending_sub, 2, '$'); return '<div class="chart-nyc-legend"> <div class="legend-title"><span>NYC Total M/WBE</span></div> <div class="legend-item"><span>M/WBE Share: ' . $mwbe_share . ' </span></div> <div class="legend-item"><span>M/WBE Spending: ' . $mwbe_spending . ' </span></div> <div class="legend-item"><span>Non M/WBE: ' . $non_mwbe . '</span></div> </div> '; }
$tbl_spending_transaction['header']['title'] = "<h3>SPENDING TRANSACTIONS BY SUB VENDOR</h3>"; $tbl_spending_transaction['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("fiscal_year"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("no_of_transactions"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("amount_spent"), 'type' => 'number')); $index_spending_transaction = 0; if (count($vendor_spending_yearly_summary[$ref_id]) > 0) { foreach ($vendor_spending_yearly_summary[$ref_id] as $year => $results_spending_history_fy) { $open = $index_spending_transaction == 0 ? '' : 'open'; //Main table columns $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['columns'] = array(array('value' => "<a class='showHide " . $open . "' ></a>FY " . $year, 'type' => 'text'), array('value' => $results_spending_history_fy['no_of_trans'], 'type' => 'number'), array('value' => custom_number_formatter_format($results_spending_history_fy['amount_spent'], 2, '$'), 'type' => 'number')); //Inner table header $tbl_spending_transaction_inner = array(); $tbl_spending_transaction_inner['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv('date'), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv('check_amount'), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv('agency_name'), 'type' => 'text')); $index_spending_transaction_inner = 0; foreach ($node->results_spending as $contract_spending) { if ($contract_spending['fiscal_year'] == $year && $contract_spending['sub_contract_id'] == $ref_id) { //Inner table columns $tbl_spending_transaction_inner['body']['rows'][$index_spending_transaction_inner]['columns'] = array(array('value' => date_format(new DateTime($contract_spending['check_eft_issued_date']), 'm/d/Y'), 'type' => 'date'), array('value' => custom_number_formatter_format($contract_spending['check_amount'], 2, '$'), 'type' => 'number'), array('value' => $contract_spending['agency_name'], 'type' => 'text')); $index_spending_transaction_inner++; } } $index_spending_transaction++; $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['inner_table'] = $tbl_spending_transaction_inner; $index_spending_transaction++; } } $index_sub_contract_reference++; $tbl_subcontract_reference['body']['rows'][$index_sub_contract_reference]['child_tables'] = array($tbl_contract_history, $tbl_spending_transaction); $index_sub_contract_reference++; } $index_spending++; $tbl_spending['body']['rows'][$index_spending]['child_tables'] = array($tbl_subcontract_reference); $index_spending++;
$tbl_spending_transaction['header']['title'] = "<h3>SPENDING TRANSACTIONS BY PRIME VENDOR</h3>"; $tbl_spending_transaction['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("fiscal_year"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("no_of_transactions"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("amount_spent"), 'type' => 'number')); $index_spending_transaction = 0; if (count($vendor_spending_yearly_summary[$vendor]) > 0) { foreach ($vendor_spending_yearly_summary[$vendor] as $year => $results_spending_history_fy) { $open = $index_spending_transaction == 0 ? '' : 'open'; //Main table columns $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['columns'] = array(array('value' => "<a class='showHide " . $open . "' ></a>FY " . $year, 'type' => 'text'), array('value' => $results_spending_history_fy['no_of_trans'], 'type' => 'number'), array('value' => custom_number_formatter_format($results_spending_history_fy['amount_spent'], 2, '$'), 'type' => 'number')); //Inner table header $tbl_spending_transaction_inner = array(); $tbl_spending_transaction_inner['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv('check_amount'), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv('expense_category'), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv('agency_name'), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv('dept_name'), 'type' => 'text')); $index_spending_transaction_inner = 0; foreach ($node->results_spending as $contract_spending) { if ($contract_spending['fiscal_year'] == $year && $contract_spending['vendor_name'] == $vendor) { //Inner table columns $tbl_spending_transaction_inner['body']['rows'][$index_spending_transaction_inner]['columns'] = array(array('value' => custom_number_formatter_format($contract_spending['check_amount'], 2, '$'), 'type' => 'number'), array('value' => $contract_spending['expenditure_object_name'], 'type' => 'text'), array('value' => $contract_spending['agency_name'], 'type' => 'text'), array('value' => $contract_spending['department_name'], 'type' => 'text')); $index_spending_transaction_inner++; } } $index_spending_transaction++; $tbl_spending_transaction['body']['rows'][$index_spending_transaction]['inner_table'] = $tbl_spending_transaction_inner; $index_spending_transaction++; } } $index_spending++; $tbl_spending['body']['rows'][$index_spending]['child_tables'] = array($tbl_contract_history, $tbl_spending_transaction); $index_spending++; } $html = "<div class='contracts-oge-spending-bottom'>" . WidgetUtil::generateTable($tbl_spending) . "</div>"; echo $html; ?>
$alt_txt = "This contract agreement has information as a prime vendor.<br><br> Click this icon to view this contract as a prime vendor. "; $url = "/contract_details/agid/" . $contract['original_agreement_id'] . "/doctype/CTA1/newwindow"; echo "<div class='contractLinkNote'><a class='new_window' href='" . $url . "' alt='" . $alt_txt . "' target='_blank' >Open in New Window</a></div>"; } ?> <div class="assoc_amounts"> <div class="rfed-amount contract-details-assoc"><span class="amount"><?php echo custom_number_formatter_format($contract['spent_amount'], 2, '$'); ?> </span><span class="label">Spent to Date</span></div> <div class="rfed-amount contract-details-assoc"><span class="amount"><?php echo custom_number_formatter_format($contract['original_amount'], 2, '$'); ?> </span><span class="label">Orignal Amount</span></div> <div class="rfed-amount contract-details-assoc"><span class="amount"><?php echo custom_number_formatter_format($contract['current_amount'], 2, '$'); ?> </span><span class="label">Current Amount</span></div> </div> </div> <div class="resultsContainer<?php print $count; ?> "> </div> </td> </tr> <?php $count += 1; //if ($count > 0) {
} echo "<tr " . $class . ">"; echo "<td class='number thVNum'><div>" . $item['document_version'] . "</div></td>"; echo "<td class='text thStartDate'><div>" . $item['start_date'] . "</div></td>"; echo "<td class='text thEndDate'><div>" . $item['end_date'] . "</div></td>"; echo "<td class='text thRegDate'><div>" . $reg_date . "</div></td>"; if (isset($item['cif_received_date'])) { echo "<td class='text thLastMDate'><div>" . $item['cif_received_date'] . "</div></td>"; } elseif (trim($item['document_version']) == "1") { echo "<td></td>"; } else { echo "<td class='text thLastMDate'><div>" . $item['date@checkbook:date_id/source_updated_date_id@checkbook:history_master_agreement'] . "</div></td>"; } echo "<td class='number thCurAmt'><div>" . custom_number_formatter_format($item['maximum_spending_limit'], 2, '$') . "</div></td>"; echo "<td class='number thOrigAmt'><div>" . custom_number_formatter_format($item['original_contract_amount'], 2, '$') . "</div></td>"; echo "<td class='number thIncDec'><div>" . custom_number_formatter_format($item['maximum_spending_limit'] - $item['original_contract_amount'], 2, '$') . "</div></td>"; echo "<td class='text thVerStat'><div>" . $item['status'] . "</div></td>"; echo "</tr>"; $count += 1; } echo "</tbody>"; echo "</table>"; echo "</div>"; echo "</td>"; echo "</tr>"; } } } else { echo '<tr class="odd">'; echo '<td class="dataTables_empty" valign="top" colspan="4">' . '<div id="no-records-datatable" class="clearfix"> <span>No Matching Records Found</span>
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ $output = ''; foreach ($node->data as $key => $value) { $output .= '<div class="field-label">' . WidgetUtil::getLabel('contract_id') . ': </div><div class="field-items">' . $value['contract_id'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_status') . ': </div><div class="field-items">' . $value['status'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('vendor_name') . ': </div><div class="field-items">' . $value['vendor_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('current_amount') . ': </div><div class="field-items">' . custom_number_formatter_format($value['current_amount'], 2, '$') . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('original_amount') . ': </div><div class="field-items">' . custom_number_formatter_format($value['original_amount'], 2, '$') . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_purpose') . ': </div><div class="field-items">' . $value['description'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('start_date') . ': </div><div class="field-items">' . $value['start_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('end_date') . ': </div><div class="field-items">' . $value['end_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('contract_type') . ': </div><div class="field-items">' . $value['agreement_type_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('spent_to_date') . ': </div><div class="field-items">' . $value['spent_to_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('recv_date') . ': </div><div class="field-items">' . $value['receive_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('agency_name') . ': </div><div class="field-items">' . $value['agency_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('voucher_amount') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('reg_date') . ': </div><div class="field-items">' . $value['registered_date'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('award_method') . ': </div><div class="field-items">' . $value['award_method_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('encumbered_amount') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('version_number') . ': </div><div class="field-items">' . $value['document_version'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('apt_pin') . ': </div><div class="field-items">' . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('pin') . ': </div><div class="field-items">' . $value['pin'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('loc_site') . ': </div><div class="field-items">' . $value['worksites_name'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('sol_per_cont') . ': </div><div class="field-items">' . $value['number_solicitation'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('fms_doc') . ': </div><div class="field-items">' . $value['document_code'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('resp_per_sol') . ': </div><div class="field-items">' . $value['number_responses'] . '</div>' . '<div class="field-label">' . WidgetUtil::getLabel('fms_doc_id') . ': </div><div class="field-items">' . $value['parent_contract_id'] . '</div>'; } print $output;
?> <div class="amount-title">Spent to Date </div> </div> <div class="original-amount"><?php echo custom_number_formatter_format($original_contract_amount, 2, '$'); ?> <div class="amount-title">Original Amount </div> </div> <div class="current-amount"><?php echo custom_number_formatter_format($maximum_contract_amount, 2, '$'); ?> <div class="amount-title">Current Amount </div> </div> </div> </div> <div class="contract-information <?php echo $oge_class; ?> "> <div class="contract-details <?php echo _getRequestParamValue("datasource") == "checkbook_oge" ? "oge-cta-contract " : "";
?> </a> <div class="amount-title">Spent to<br/>Date</div> </div> <?php } ?> <div class="original-amount"> <?php echo custom_number_formatter_format($node->original_contract_amount, 2, '$'); ?> <div class="amount-title">Original Amount</div> </div> <div class="current-amount"> <?php echo custom_number_formatter_format($node->maximum_spending_limit, 2, '$'); ?> <div class="amount-title">Current Amount</div> </div> <div class="total-contracts"> <?php echo $node->total_child_contracts; ?> <div class="amount-title">Assoc. Contracts</div> </div> </div> <div class="contract-information <?php echo $oge_class; ?> "> <div class="contract-details">
$http_ref = $_SERVER['HTTP_REFERER']; $current_url = $_GET['q']; //Advanced Search page should not have static text $advanced_search_page = preg_match("/contract\\/search\\/transactions/", $current_url); $advanced_search_page = $advanced_search_page || preg_match("/contract\\/all\\/transactions/", $current_url); $advanced_search_page = $advanced_search_page || preg_match("/contract\\/search\\/transactions/", $http_ref); $advanced_search_page = $advanced_search_page || preg_match("/contract\\/all\\/transactions/", $http_ref); if ($advanced_search_page) { return; } $contactStatus = _getRequestParamValue('contstatus'); $contactStatusLabel = 'Active'; if ($contactStatus == 'R') { $contactStatusLabel = 'Registered'; } if (_checkbook_check_isEDCPage()) { print '<div class="transactions-total-amount">$' . custom_number_formatter_format($node->data[0]['total_amount_for_transaction'], 2) . '<div class="amount-title">Total ' . $contactStatusLabel . ' Current Contract Amount</div></div>'; } else { if (_checkbook_check_is_mwbe_page() || _getRequestParamValue('dashboard')) { $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 { $summaryTitle = 'Total ' . RequestUtil::getDashboardTitle() . " "; $summaryTitle = str_replace('Total Total', 'Total', $summaryTitle); } print '<div class="transactions-total-amount">$' . custom_number_formatter_format($node->data[0]['total_maximum_contract_amount'], 2) . '<div class="amount-title">Total ' . $contactStatusLabel . ' Current Contract Amount</div></div>'; } else { print '<div class="transactions-total-amount">$' . custom_number_formatter_format($node->data[0]['total_maximum_contract_amount'], 2) . '<div class="amount-title">Total ' . $contactStatusLabel . ' Current Contract Amount</div></div>'; } }
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ print '<div class="dollar-amounts">'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['revenue_amount_sum'], 2, '$') . "<div class='amount-title'>Total Revenue<br />Recognized</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['current_modified_budget'], 2, '$') . "<div class='amount-title'>Total Modified<br />Budget</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['adopted_budget'], 2, '$') . "<div class='amount-title'>Total Adopted<br />Budget</div>" . '</div>'; print '<div class="total-spending-amount">' . custom_number_formatter_format($node->data[0]['remaining_amount'], 2, '$') . "<div class='amount-title'>Total Remaining<br />Budget</div>" . '</div>'; print '</div>';
$count = 1; $row = array(); $rows = array(); foreach ($budget_parameter_mapping as $key => $title) { $value = $budget_results[$key]; if ($key == 'expenditure_object_name') { $value = $budget_results[$key][0]; } if ($key == 'fiscal_year') { $value = $budget_results[$key][0]; } $temp = substr($value, strpos(strtoupper($value), strtoupper($SearchTerm)), strlen($SearchTerm)); $value = str_ireplace($SearchTerm, '<em>' . $temp . '</em>', $value); $value = _checkbook_smart_search_str_html_entities($value); if (in_array($key, $amount_fields)) { $value = custom_number_formatter_format($value, 2, '$'); } else { if (array_key_exists($key, $linkable_fields)) { $value = "<a href='" . $linkable_fields[$key] . "'>" . $value . "</a>"; } } if ($count % 2 == 0) { if ($title) { $row[] = '<div class="field-label">' . $title . ':</div><div class="field-content">' . $value . '</div>'; } $rows[] = $row; $row = array(); } else { if ($title) { $row[] = '<div class="field-label">' . $title . ':</div><div class="field-content">' . $value . '</div>'; }
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ print '<div class="dollar-amounts"><div class="total-spending-amount">$' . custom_number_formatter_format($node->data[0]['check_amount_sum'], 2) . '<div class="amount-title">Total Spending Amount</div></div></div>';
* * 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/>. */ $records = $node->data; if (is_array($records)) { $row = $records[0]; $originalAmount = custom_number_formatter_format($row['original_amount_sum'], 2, '$'); $currentAmount = custom_number_formatter_format($row['current_amount_sum'], 2, '$'); $spentToDateAmount = custom_number_formatter_format($row['spending_amount_sum'], 2, '$'); $diffAmount = custom_number_formatter_format($row['dollar_difference'], 2, '$'); $diffAmountPercent = round($row['percent_difference'], 2) . '%'; $cont_id = WidgetUtil::getLabel("contract_id"); $spnttodt = WidgetUtil::getLabel("spent_to_date"); $oamnt = WidgetUtil::getLabel("original_amount"); $camnt = WidgetUtil::getLabel("current_amount"); $ddiff = WidgetUtil::getLabel("dollar_diff"); $pdiff = WidgetUtil::getLabel("percent_diff"); $purpose = WidgetUtil::getLabel("contract_purpose"); $agency = WidgetUtil::getLabel("contract_agency"); $vendor = WidgetUtil::getLabel("vendor_name"); $vendor_value = $row['vendor_vendor_legal_name']; $smnid = _getRequestParamValue('smnid'); if ($smnid == 722) { $purpose = WidgetUtil::getLabel("sub_contract_purpose"); $vendor = WidgetUtil::getLabel("sub_vendor_name");
* * 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/>. */ /* SPENDING BY PRIME VENDOR */ //Main table header $tbl_spending = array(); $tbl_spending['header']['title'] = "<h3>SPENDING BY PRIME VENDOR</h3>"; $tbl_spending['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_name"), 'type' => 'text'), array('value' => WidgetUtil::generateLabelMappingNoDiv("current_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("original_amount"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number')); $contract_vendor_details = ''; $spending_vendor_details = ''; $index_spending = 0; foreach ($node->results_prime_vendor_info as $vendor => $vendor_summary) { $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_summary['vendor_name'], 'type' => 'text'), array('value' => custom_number_formatter_format($vendor_summary['current_amount'], 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($vendor_summary['original_amount'], 2, '$'), 'type' => 'number'), array('value' => custom_number_formatter_format($vendor_summary['spent_to_date'], 2, '$'), 'type' => 'number')); if (_getRequestParamValue("datasource") != "checkbook_oge") { $contract_vendor_details = '<div id = "contract_history">'; $nid = 426; $node = node_load($nid); node_build_content($node); $contract_vendor_details .= drupal_render($node->content); $contract_vendor_details .= '</div>'; $spending_vendor_details = '<div id = "spending_transactions">'; $nid = 427; $node = node_load($nid); node_build_content($node); $spending_vendor_details .= drupal_render($node->content); $spending_vendor_details .= '</div>'; } $index_spending++;
} 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"); } if ($smnid == 453 || $smnid == 788 || $smnid == 729) { $dynamicLabel = WidgetUtil::getLabel("contract_size"); } $originalAmount = custom_number_formatter_format($row['original_amount_sum'], 2, '$'); $currentAmount = custom_number_formatter_format($row['current_amount_sum'], 2, '$'); $spentToDateAmount = custom_number_formatter_format($row['spending_amount_sum'], 2, '$'); $spnttodt = WidgetUtil::getLabel("spent_to_date"); $oamnt = WidgetUtil::getLabel("original_amount"); $camnt = WidgetUtil::getLabel("current_amount"); $totalContracts = number_format($row['total_contracts']); $summaryContent = <<<EOD <div class="contract-details-heading"> \t<div class="contract-id"> \t\t<h2 class="contract-title">{$node->widgetConfig->summaryView->templateTitle}</h2> \t</div> \t<div class="dollar-amounts"> \t\t<div class="spent-to-date"> \t\t\t{$spentToDateAmount} <div class="amount-title">{$spnttodt}</div> \t\t</div> \t\t<div class="original-amount">
} else { echo custom_number_formatter_format($total_spent_todate, 2, "\$"); ?> <?php } ?> <div class="amount-title">Total Spent to Date </div> </div> <div class="original-amount"><?php echo custom_number_formatter_format($total_original_amount, 2, '$'); ?> <div class="amount-title">Total Original Amount </div> </div> <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 } ?> </div>
</tr> </thead> <tbody> <?php $i = 0; foreach ($table_rows as $row) { echo "<tr>\n <td class='" . $cat_class . "' ><a href='/revenue/year/" . $req_year_id . "/fndsrc/" . $row['id'] . "'>" . $row['name'] . "</a></td>\n <td class='" . $cat_class . "' >" . custom_number_formatter_format($row['adopted_budget'], 2, '$') . "</td>\n <td class='" . $cat_class . "' >" . custom_number_formatter_format($row['current_modified_budget'], 2, '$') . "</td>"; foreach ($years as $year) { $amount_link = "<a href='/revenue/transactions/fundsrc/" . $row['id'] . "/year/" . _getYearIDFromValue($year) . "'>" . custom_number_formatter_format($row['revenue_collected'][$year], 2, '$') . "</a>"; echo "<td class='" . $amount_class . "' >" . $amount_link . "</td>"; } //echo "<td class='" . $amount_class . "' >" . custom_number_formatter_format(array_sum($row['revenue_collected']),2,'$') ."</td>"; $widgetNode = node_load(285); widget_set_uid($widgetNode, $i); $additionalParams = array(); $additionalParams["funding.funding"] = $row['id']; widget_add_additional_parameters($widgetNode, $additionalParams); $widgetChart = node_build_content($widgetNode); $widgetChart = drupal_render($widgetNode->content); echo "<td class='" . $amount_class . "' ><table><tr><td><a href='/revenue/transactions/fundsrc/" . $row['id'] . "'>" . custom_number_formatter_format(array_sum($row['revenue_collected']), 2, '$') . "</a></td><td>" . $widgetChart . "</td></tr></table></td>"; echo "</tr>"; $i++; } ?> </tbody> </table> <?php widget_data_tables_add_js($node);
<?php /** * This file is part of the Checkbook NYC financial transparency software. * * Copyright (C) 2012, 2013 New York City * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * 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/>. */ echo "Total Pending Contracts Amount: " . custom_number_formatter_format($node->data[0]['current_amount_sum'], 2, '$');
* * 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/>. */ $results = $node->data[0]; if ($results) { $total_annual_salary = custom_number_formatter_format($results['total_annual_salary'], 2, '$'); $total_gross_pay = custom_number_formatter_format($results['total_gross_pay'], 2, '$'); $total_base_pay = custom_number_formatter_format($results['total_base_pay'], 2, '$'); $total_other_payments = custom_number_formatter_format($results['total_other_payments'], 2, '$'); $total_overtime_pay = custom_number_formatter_format($results['total_overtime_pay'], 2, '$'); $total_salaried_employees = number_format($results['total_salaried_employees@checkbook:payroll_year_month']); $total_hourly_employees = number_format($results['total_hourly_employees@checkbook:payroll_year_month']); $total_employees = number_format($results['total_employees@checkbook:payroll_year_month']); $year = $results['year_year']; $month = $results['month_month']; $yearType = $results['year_type_year_type']; $year_value = _getYearValueFromID($year); $month_num = _getMonthValueFromId($month); if (isset($month_num)) { $dateObj = DateTime::createFromFormat('!m', $month_num); $month_value = $dateObj->format('F'); } $yeartype = 'FY'; if (_getRequestParamValue('yeartype') == 'C') { $yeartype = 'CY';
$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 = ' '; } if ($mwbe_amount == 0 && $mwbe_amount_active_inc == 0) { $mwbe_link = l('<div><div class="top-navigation-amount"><span class="nav-title">' . RequestUtil::getDashboardTopNavTitle("mwbe") . '</span><br> ' . custom_number_formatter_format(0, 1, '$') . '</div></div>', '', $options_disabled); } else { $mwbe_link = l('<div><div class="top-navigation-amount"><span class="nav-title">' . RequestUtil::getDashboardTopNavTitle("mwbe") . '</span><br> ' . custom_number_formatter_format($mwbe_amount, 1, '$') . '</div></div>', $mwbe_active_domain_link, $options); } if ($svendor_amount == 0 && $svendor_amount_active_inc == 0) { $subvendors_link = l('<div><div class="top-navigation-amount"><span class="nav-title">' . RequestUtil::getDashboardTopNavTitle("subvendor") . '</span><br> ' . custom_number_formatter_format(0, 1, '$') . '</div></div>', '', $options_disabled); } else { $subvendors_link = l('<div><div class="top-navigation-amount"><span class="nav-title">' . RequestUtil::getDashboardTopNavTitle("subvendor") . '</span><br> ' . custom_number_formatter_format($svendor_amount, 1, '$') . '</div></div>', $svendor_active_domain_link, $options); } $indicator_left = true; $featured_dashboard = _getRequestParamValue("dashboard"); if ($featured_dashboard != null) { $indicator_left = false; } else { $indicator_left = true; } // conditions for making mwbe active. if ($featured_dashboard == "mp" || $featured_dashboard == "ms" || $featured_dashboard != null && ($mwbe_amount > 0 || $mwbe_amount_active_inc > 0) || RequestUtil::$is_prime_mwbe_amount_zero_sub_mwbe_not_zero) { $mwbeclass = ' active'; } if ($featured_dashboard == "sp" || $featured_dashboard == "ss" || $featured_dashboard != null && ($svendor_amount > 0 || $svendor_amount_active_inc > 0) || RequestUtil::$is_prime_mwbe_amount_zero_sub_mwbe_not_zero) { $svclass = ' active'; }
$tbl['header']['columns'] = array(array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_name"), 'type' => 'text'), array('value' => $node->widget_count_label, 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("spent_to_date"), 'type' => 'number'), array('value' => WidgetUtil::generateLabelMappingNoDiv("prime_vendor_address"), 'type' => 'text')); $vendor_cont_count = array(); foreach ($node->vendor_contracts_count as $vendor_cont) { $vendor_cont_count[$vendor_cont['vendor_id']]['count'] = $vendor_cont['count']; $vendor_cont_count[$vendor_cont['vendor_id']]['count'] = $vendor_cont['count']; } $count = 0; if (count($node->vendors_list) > 0) { foreach ($node->vendors_list as $vendor) { $spending_link = "/spending/transactions/vendor/" . $vendor['vendor_id'] . "/datasource/checkbook_oge/newwindow"; if (preg_match("/newwindow/", $_GET['q'])) { $vendor_name = $vendor['vendor_name']; } else { $vendor_name = "<a href='/contracts_landing/status/A/year/" . _getCurrentYearID() . "/yeartype/B/agency/" . $vendor['agency_id'] . "/datasource/checkbook_oge/vendor/" . $vendor['vendor_id'] . "?expandBottomCont=true'>" . $vendor['vendor_name'] . "</a>"; } $spent_to_date_value = custom_number_formatter_format($vendor['check_amount_sum'], 2, '$'); if (preg_match("/newwindow/", $_GET['q'])) { $spent_to_date_link = custom_number_formatter_format($vendor['check_amount_sum'], 2, '$'); } else { $spent_to_date_link = "<a class='new_window' target='_new' href='" . $spending_link . "'>" . custom_number_formatter_format($vendor['check_amount_sum'], 2, '$') . "</a>"; } //Main table columns $tbl['body']['rows'][$count]['columns'] = array(array('value' => $vendor_name, 'type' => 'text'), array('value' => $vendor_cont_count[$vendor['vendor_id']]['count'], 'type' => 'number'), array('value' => $spent_to_date_value, 'type' => 'number_link', 'link_value' => $spent_to_date_link), array('value' => $vendor['address'], 'type' => 'text')); $count++; } } $html = WidgetUtil::generateTable($tbl); echo $html; ?>
$showCondition = "style='display:none'"; echo "<td colspan='3' >"; echo "<div class='scroll'>"; echo "<table class='sub-table col6'>"; echo "<thead><tr><th class='text th1'><div><span>Date</span></div></th>\n <th class='text th2'>" . WidgetUtil::generateLabelMapping("document_id") . "</th>\n <th class='number th3'>" . WidgetUtil::generateLabelMapping("check_amount") . "</th>\n <th class='text th4'>" . WidgetUtil::generateLabelMapping("expense_category") . "</th>\n <th class='text th5'>" . WidgetUtil::generateLabelMapping("agency_name") . "</th>\n <th class='text th6'>" . WidgetUtil::generateLabelMapping("dept_name") . "</th></tr></thead><tbody>"; $count = 0; foreach ($items as $item) { if ($count % 2 == 0) { $class = "class=\"odd\""; } else { $class = "class=\"even\""; } echo "<tr " . $class . ">"; echo "<td class='text td1'><div>" . $item['date@checkbook:date_id/check_eft_issued_date_id@checkbook:disbursement_line_item_details'] . "</div></td>"; echo "<td class='text td2'><div>" . $item['document_id'] . "</div></td>"; echo "<td class='number td3'><div>" . custom_number_formatter_format($item['check_amount'], 2, '$') . "</div></td>"; echo "<td class='text td4'><div>" . $item['expenditure_object_name'] . "</div></td>"; echo "<td class='text td5'><div>" . $item['agency_name'] . "</div></td>"; echo "<td class='text td6'><div>" . $item['department_name'] . "</div></td>"; echo "</tr>"; $count += 1; } echo "</tbody>"; echo "</table></div>"; echo "</td>"; echo "</tr>"; } } } else { echo '<tr class="odd">'; echo '<td class="dataTables_empty" valign="top" colspan="3">' . '<div id="no-records-datatable" class="clearfix">