Ejemplo n.º 1
0
 public function getData(&$node)
 {
     $mag_id = _getRequestParamValue("magid");
     $query1 = "SELECT l1.contract_number,\r\n    l2.vendor_id AS vendor_id_checkbook_vendor_history,\r\n    l3.legal_name AS legal_name_checkbook_vendor,\r\n    l1.description,\r\n    l5.agency_name AS agency_name_checkbook_agency,\r\n    l5.agency_id AS agency_id_checkbook_agency,\r\n    l656.award_method_name AS award_method_name_checkbook_award_method,\r\n    l1.document_version,\r\n    l1.tracking_number,\r\n    l1.number_responses,\r\n    l1.number_solicitation,\r\n    l1.maximum_spending_limit,\r\n    l1.board_approved_award_no,\r\n    l1.original_contract_amount,\r\n    l444.document_code AS document_code_checkbook_ref_document_code,\r\n    l1040.date AS date_chckbk_dat_id_effctv_bgn_date_id_chckbk_hstr_mstr_agrmnt_0,\r\n    l1124.date AS date_chckbk_date_id_effctv_end_dat_id_chckbk_hstr_mstr_agrmnt_1,\r\n    l1208.date AS date_chckbk_date_id_rgstrd_date_id_chckbk_histr_master_agrmnt_2,\r\n    rat.agreement_type_name\r\n    FROM {history_master_agreement} AS l1\r\n    LEFT OUTER JOIN {vendor_history} AS l2 ON l2.vendor_history_id = l1.vendor_history_id\r\n    LEFT OUTER JOIN {vendor} AS l3 ON l3.vendor_id = l2.vendor_id\r\n    LEFT OUTER JOIN {ref_agency_history} AS l4 ON l4.agency_history_id = l1.agency_history_id\r\n    LEFT OUTER JOIN {ref_agency} AS l5 ON l5.agency_id = l4.agency_id\r\n    LEFT OUTER JOIN {ref_document_code} AS l444 ON l444.document_code_id = l1.document_code_id\r\n    LEFT OUTER JOIN {ref_award_method} AS l656 ON l656.award_method_id = l1.award_method_id\r\n    LEFT OUTER JOIN {ref_date} AS l1040 ON l1040.date_id = l1.effective_begin_date_id\r\n    LEFT OUTER JOIN {ref_date} AS l1124 ON l1124.date_id = l1.effective_end_date_id\r\n    LEFT OUTER JOIN {ref_date} AS l1208 ON l1208.date_id = l1.registered_date_id\r\n    LEFT OUTER JOIN {ref_agreement_type} AS rat ON l1.agreement_type_id = rat.agreement_type_id\r\n    WHERE l1.original_master_agreement_id = " . $mag_id . "\r\n    AND l1.latest_flag = 'Y'\r\n    ";
     $results1 = _checkbook_project_execute_sql_by_data_source($query1, _get_default_datasource());
     $node->data = $results1;
     if (_get_current_datasource() == _get_default_datasource()) {
         $query2 = "select rfed_amount from {agreement_snapshot} where original_agreement_id = " . $mag_id . "\r\n     \t\tand master_agreement_yn = 'Y'  and latest_flag = 'Y'";
         $results2 = _checkbook_project_execute_sql_by_data_source($query2, _get_default_datasource());
         $spent_amount = 0;
         foreach ($results2 as $row) {
             $spent_amount += $row["rfed_amount"];
         }
         $node->spent_amount = $spent_amount;
         $node->original_contract_amount = $node->data[0]['original_contract_amount'];
         $node->maximum_spending_limit = $node->data[0]['maximum_spending_limit'];
         $query3 = "SELECT COUNT(*) AS total_child_contracts\r\n\t    FROM {history_agreement}\r\n\t    WHERE master_agreement_id = " . $mag_id . "\r\n\t    AND latest_flag = 'Y'";
         $results3 = _checkbook_project_execute_sql_by_data_source($query3, _get_current_datasource());
         $total_child_contracts = 0;
         foreach ($results3 as $row) {
             $total_child_contracts += $row["total_child_contracts"];
         }
         $node->total_child_contracts = $total_child_contracts;
     } else {
         $query2 = "select sum(original_amount) original_amount, sum(current_amount) current_amount, \r\n    \t\t\tcount(distinct fms_contract_number) as num_associated_contracts, sum(check_amount) as spent_amount\r\n\t\t\t\tFROM {oge_contract_vendor_level} a\r\n\t\t\t\tJOIN (select distinct contract_number from {history_agreement} where master_agreement_id = " . $mag_id . ") b\r\n\t\t\t\tON a.fms_contract_number = b.contract_number\r\n\t\t\t\tLEFT JOIN (SELECT sum(check_amount) as check_amount, contract_number, vendor_id FROM {disbursement_line_item_details} group by 2,3) c\r\n\t\t\t\tON b.contract_number = c.contract_number AND a.vendor_id = c.vendor_id limit 1";
         $results2 = _checkbook_project_execute_sql_by_data_source($query2, _get_current_datasource());
         foreach ($results2 as $row) {
             $node->spent_amount = $row['spent_amount'];
             $node->original_contract_amount = $row['original_amount'];
             $node->maximum_spending_limit = $row['current_amount'];
             $node->total_child_contracts = $row['num_associated_contracts'];
         }
         $node->data_source_amounts_differ = ContractUtil::masterAgreementAmountsDiffer($mag_id);
     }
 }
Ejemplo n.º 2
0
 public function getData(&$node)
 {
     $contract_num = _getRequestParamValue("contract");
     $version_num = _getRequestParamValue("version");
     $query1 = "SELECT\n                vh.vendor_id,\n                l1.fms_parent_contract_number AS parent_contract_number,\n                l1.vendor_customer_code,\n                l1.contract_number,\n                l1.vendor_legal_name AS legal_name_checkbook_vendor,\n                l1.vendor_id vendor_vendor,\n                l1.description,\n                l1.document_agency_name AS agency_name_checkbook_agency,\n                l1.document_agency_id AS agency_id_checkbook_agency,\n                l1.award_method_name AS award_method_name_checkbook_award_method,\n                l1.document_version,\n                l1.tracking_number,\n                l1.board_award_number AS board_approved_award_no,\n                l1.original_maximum_amount AS original_contract_amount,\n                l1.revised_maximum_amount AS maximum_spending_limit,\n                l444.document_code AS document_code_checkbook_ref_document_code,\n                l1.start_date AS date_chckbk_dat_id_effctv_bgn_date_id_chckbk_hstr_mstr_agrmnt_0,\n                l1.end_date AS date_chckbk_date_id_effctv_end_dat_id_chckbk_hstr_mstr_agrmnt_1\n        FROM pending_contracts AS l1\n        LEFT OUTER JOIN ref_document_code AS l444 ON l444.document_code_id = l1.document_code_id\n        LEFT JOIN {vendor} v ON l1.vendor_id = v.vendor_id\n        LEFT JOIN (SELECT vendor_id, MAX(vendor_history_id) AS vendor_history_id\n                FROM {vendor_history} WHERE miscellaneous_vendor_flag::BIT = 0 ::BIT  GROUP BY 1) vh ON v.vendor_id = vh.vendor_id\n        WHERE l1.contract_number = '" . $contract_num . "' AND document_version = " . $version_num;
     $results1 = _checkbook_project_execute_sql($query1);
     $node->data = $results1;
     $parent_contract_number = $node->data[0]['parent_contract_number'];
     if (!empty($parent_contract_number)) {
         $mag_details = _get_master_agreement_details_by_parent_contract_number($parent_contract_number);
         $node->original_master_agreement_id = $mag_details['original_master_agreement_id'];
         $node->contract_number = $mag_details['contract_number'];
         $node->document_code = $mag_details['document_code@checkbook:ref_document_code'];
         $node->contract_number = $parent_contract_number;
     }
 }
Ejemplo n.º 3
0
 public function getData(&$node)
 {
     $ag_id = _getRequestParamValue("agid");
     $query1 = "SELECT l1.contract_number, a.master_contract_number,\n           l2.vendor_id AS vendor_id_checkbook_vendor_history,\n           l529.legal_name AS legal_name_checkbook_vendor,\n           l1.description,\n           l531.agency_name AS agency_name_checkbook_agency,\n           l531.agency_id AS agency_id_checkbook_agency,\n           l1071.award_method_name AS award_method_name_checkbook_award_method,\n           l1.document_version,\n           l1.tracking_number,\n           l1.number_responses,\n           l1.number_solicitation,\n           l1.maximum_contract_amount,\n           l1.brd_awd_no,\n           l1.original_contract_amount,\n           l903.document_code AS document_code_checkbook_ref_document_code,\n           l1237.date AS date_chckbk_date_id_effctv_begin_date_id_chckbk_histor_agrmnt_0,\n           l1318.date AS date_checkbk_date_id_effctv_end_date_id_chckbk_history_agrmnt_1,\n           l1399.date AS date_chckbk_date_id_rgstrd_date_id_checkbook_history_agreemnt_2,\n           rat.agreement_type_name\n      FROM history_agreement AS l1\n           LEFT OUTER JOIN agreement_snapshot AS a ON l1.master_agreement_id = a.master_agreement_id\n           LEFT OUTER JOIN vendor_history AS l2 ON l2.vendor_history_id = l1.vendor_history_id\n           LEFT OUTER JOIN vendor AS l529 ON l529.vendor_id = l2.vendor_id\n           LEFT OUTER JOIN ref_agency_history AS l530 ON l530.agency_history_id = l1.agency_history_id\n           LEFT OUTER JOIN ref_agency AS l531 ON l531.agency_id = l530.agency_id\n           LEFT OUTER JOIN ref_document_code AS l903 ON l903.document_code_id = l1.document_code_id\n           LEFT OUTER JOIN ref_award_method AS l1071 ON l1071.award_method_id = l1.award_method_id\n           LEFT OUTER JOIN ref_date AS l1237 ON l1237.date_id = l1.effective_begin_date_id\n           LEFT OUTER JOIN ref_date AS l1318 ON l1318.date_id = l1.effective_end_date_id\n           LEFT OUTER JOIN ref_date AS l1399 ON l1399.date_id = l1.registered_date_id\n           LEFT OUTER JOIN {ref_agreement_type} AS rat ON l1.agreement_type_id = rat.agreement_type_id\n     WHERE l1.original_agreement_id = " . $ag_id . "\n       AND l1.latest_flag = 'Y'\n    ";
     $query2 = "select rfed_amount from history_agreement where original_agreement_id = " . $ag_id . " and latest_flag = 'Y' limit 1";
     $results1 = _checkbook_project_execute_sql_by_data_source($query1, _get_current_datasource());
     $node->data = $results1;
     $magid = _get_master_agreement_id();
     if (!empty($magid)) {
         $magdetails = _get_master_agreement_details($magid);
         $node->magid = $magid;
         $node->document_code = $magdetails['document_code@checkbook:ref_document_code'];
         $node->contract_number = $magdetails['contract_number'];
     }
     if (_get_current_datasource() == _get_default_datasource()) {
         $results2 = _checkbook_project_execute_sql_by_data_source($query2, _get_current_datasource());
         $spent_amount = 0;
         foreach ($results2 as $row) {
             $spent_amount += $row["rfed_amount"];
         }
         $node->spent_amount = $spent_amount;
         $query3 = "SELECT COUNT(*) AS total_child_contracts\n\t    FROM {history_agreement}\n\t   WHERE master_agreement_id = " . $magid . "\n\t     AND latest_flag = 'Y'";
         $results3 = _checkbook_project_execute_sql($query3);
         $total_child_contracts = 0;
         foreach ($results3 as $row) {
             $total_child_contracts += $row["total_child_contracts"];
         }
         $node->total_child_contracts = $total_child_contracts;
     } else {
         $query2 = "select sum(original_amount) original_amount, sum(current_amount) current_amount,\n    \t\t\t sum(check_amount) as spent_amount\n\t\t\t\tFROM {oge_contract_vendor_level} a\n\t\t\t\tJOIN (select distinct contract_number from {history_agreement} where agreement_id = " . $ag_id . ") b\n\t\t\t\tON a.fms_contract_number = b.contract_number\n\t\t\t\tLEFT JOIN (SELECT sum(check_amount) as check_amount, contract_number, vendor_id FROM {disbursement_line_item_details} group by 2,3) c\n\t\t\t\tON b.contract_number = c.contract_number AND a.vendor_id = c.vendor_id limit 1";
         $results2 = _checkbook_project_execute_sql_by_data_source($query2, _get_current_datasource());
         foreach ($results2 as $row) {
             $node->spent_amount = $row['spent_amount'];
             $node->original_contract_amount = $row['original_amount'];
             $node->maximum_contract_amount = $row['current_amount'];
             $node->total_child_contracts = $row['num_associated_contracts'];
         }
         $node->data_source_amounts_differ = ContractUtil::childAgreementAmountsDiffer($ag_id);
     }
 }
Ejemplo n.º 4
0
 public static function getSpentToDateParams()
 {
     $url = $_GET['q'];
     $parameters = '';
     $contract_status = _getRequestParamValue('status');
     $contract_type = 'expense';
     if (preg_match('/revenue/', $url)) {
         $contract_type = 'revenue';
     } else {
         if (preg_match('/pending_exp/', $url)) {
             $contract_type = 'expense';
         } else {
             if (preg_match('/pending_rev/', $url)) {
                 $contract_type = 'revenue';
             }
         }
     }
     if (isset($contract_status)) {
         $parameters = '/contstatus/' . $contract_status;
     }
     $parameters .= '/contcat/' . $contract_type;
     return $parameters;
 }
Ejemplo n.º 5
0
<?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/>.
*/
$refURL = $_GET['refURL'];
$title = "New York City";
$agencyId = _getRequestParamValue('agency');
if (isset($agencyId)) {
    $title = _checkbook_project_get_name_for_argument("agency_id", $agencyId);
}
$domain = 'Payroll';
Ejemplo n.º 6
0
 * 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;
Ejemplo n.º 7
0
* 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/>.
*/
$records = $node->data;
if (is_array($records)) {
    $row = $records[0];
    $noContr = WidgetUtil::getLabel("no_of_contracts");
    $smnid = _getRequestParamValue('smnid');
    $dynamicLabel = $node->widgetConfig->summaryView->entityColumnLabel;
    $dynamicValue = strtoupper($row[$node->widgetConfig->summaryView->entityColumnName]);
    if ($smnid == 720) {
        $noContr = WidgetUtil::getLabel("num_sub_contracts");
        $mwbe_category = '<strong>' . WidgetUtil::getLabel("mwbe_category") . '</strong>: ' . strtoupper(MappingUtil::getMinorityCategoryById($row['minority_type_minority_type']));
    } else {
        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']));
			<th><div><span>Spending Chart</span></div></th>
			<th><div><span>YTD Spending</span></div></th>
			<th>&nbsp</th>
		</tr>
	</thead>
	<tbody class="hidden_body" style="display:none" >
		<?php 
$id = 0;
foreach ($left_agencies_data as $row) {
    $agency = $row['agency_name'];
    $chart = theme('mwbe_agency_grading_row_chart', array('id' => $id, 'data_row' => $row['data_row']));
    if ($row['spending_amount'] > 0) {
        if ($is_prime == 'sub_vendor_data') {
            $link = "/spending_landing/year/" . _getRequestParamValue("year") . "/yeartype/" . _getRequestParamValue("yeartype") . "/agency/" . $row["agency_id"] . "/dashboard/sp/mwbe/" . MappingUtil::$total_mwbe_cats;
        } else {
            $link = "/spending_landing/year/" . _getRequestParamValue("year") . "/yeartype/" . _getRequestParamValue("yeartype") . "/agency/" . $row["agency_id"] . "/dashboard/mp/mwbe/" . MappingUtil::$total_mwbe_cats;
        }
        echo "<tr>\n\t\t\t\t\t\t<td><div><a href=\"" . $link . "\">" . $agency . "</a></div></td>\n\t\t\t\t\t\t<td>" . $chart . "  </td>\n\t\t\t\t\t\t<td>" . $row['spending_amount'] . "  </td>\n\t\t\t\t\t\t<td></td>\n\t\t\t\t\t\t</tr>\t\n\t\t\t\t\t";
    }
    $id += 1;
}
?>
	</tbody>
	
</table>
</div>



<script>
Ejemplo n.º 9
0
                    $link = $url . '?expandBottomContURL=' . $bottom_url;
                }
                $link = preg_replace("/yeartype\\/./", "yeartype/C", $link);
                $link = str_replace("/dept/" . $deptId, "/dept/" . $dept_Ids[$value['year_id']], $link);
                $link = str_replace("/expcategory/" . $expCatId, "/expcategory/" . $expCatIds[$value['year_id']], $link);
            }
            /*For the charts with the months links, need to persist the month param for the newly selected year*/
            if (isset($bottomURL) && preg_match('/month/', $bottomURL)) {
                $old_month_id = RequestUtil::getRequestKeyValueFromURL("month", $bottomURL);
                $year_id = $value['year_id'];
                if (isset($old_month_id) && isset($year_id)) {
                    $new_month_id = _translateMonthIdByYear($old_month_id, $year_id, "C");
                    $link = preg_replace('/\\/month\\/' . $old_month_id . '/', '/month/' . $new_month_id, $link);
                }
            }
            $calendar_year_data_array[] = array('display_text' => 'CY ' . $value['year_value'] . ' (Jan 1, ' . $value['year_value'] . ' - Dec 31, ' . $value['year_value'] . ')', 'value' => $value['year_id'] . '~C', 'link' => $link, 'selected' => $selected_cal_year);
        }
    }
    $year_data_array = array_merge($fiscal_year_data_array, $calendar_year_data_array);
    if (_getRequestParamValue('contstatus') == 'P') {
        return;
    }
    $year_list = "<select id='year_list'>";
    foreach ($year_data_array as $key => $value) {
        $year_list .= "<option " . $value['selected'] . " value=" . $value['value'] . " link='" . $value['link'] . "'  >" . $value['display_text'] . "</option>";
    }
    $year_list .= "</select>";
    if ($isSelected) {
        print "<span class=\"filter\" >Filter: </span>" . $year_list;
    }
}
Ejemplo n.º 10
0
 function _mwbe_spending_use_subvendor()
 {
     if (_getRequestParamValue('vendor') > 0 || _getRequestParamValue('mwbe') == '7' || _getRequestParamValue('mwbe') == '11') {
         return true;
     } else {
         return false;
     }
 }
Ejemplo n.º 11
0
    static function getCurrentSubMWBEApplicableFilters($domain)
    {
        switch ($domain) {
            case "spending":
                $table = "aggregateon_subven_spending_coa_entities";
                $urlParamMap = array("year" => "year_id", "yeartype" => "type_of_year", "agency" => "agency_id", "subvendor" => "vendor_id", "vendor" => "prime_vendor_id", "category" => "spending_category_id");
                $where_filters = array();
                foreach ($urlParamMap as $param => $value) {
                    if (_getRequestParamValue($param) != null) {
                        $where_filters[] = _widget_build_sql_condition(' a1.' . $value, _getRequestParamValue($param));
                    }
                }
                if (count($where_filters) > 0) {
                    $where_filter = ' where ' . implode(' and ', $where_filters);
                }
                $sql = 'select a1.minority_type_id
				    from ' . $table . ' a1
				   ' . $where_filter . '
				    group by a1.minority_type_id  ';
                $data = _checkbook_project_execute_sql($sql);
                break;
            case "contracts":
                $table = "aggregateon_subven_contracts_cumulative_spending";
                $urlParamMap = array("year" => "fiscal_year_id", "agency" => "agency_id", "yeartype" => "type_of_year", "awdmethod" => "award_method_id", "vendor" => "prime_vendor_id", "subvendor" => "vendor_id", "status" => "status_flag", "csize" => "award_size_id", "cindustry" => "industry_type_id");
                $where_filters = array();
                foreach ($urlParamMap as $param => $value) {
                    if (_getRequestParamValue($param) != null) {
                        $where_filters[] = _widget_build_sql_condition(' a1.' . $value, _getRequestParamValue($param));
                    }
                }
                if (count($where_filters) > 0) {
                    $where_filter = ' where ' . implode(' and ', $where_filters);
                }
                //$where_filter .= ' and rd.document_code in (' . ContractUtil::getCurrentPageDocumentIds() . ') ';
                $sql = 'select a1.minority_type_id
				    from {' . $table . '} a1
	    				join {ref_document_code} rd on a1.document_code_id = rd.document_code_id
				   ' . $where_filter . '
				    group by a1.minority_type_id';
                $data = _checkbook_project_execute_sql($sql);
                break;
        }
        $applicable_minority_types = array();
        foreach ($data as $row) {
            $applicable_minority_types[] = $row['minority_type_id'];
        }
        return $applicable_minority_types;
    }
Ejemplo n.º 12
0
 static function generateLabelMappingNoDiv($labelAlias, $labelOnly = false)
 {
     $dynamic_labelAlias = array("current_modified", "previous_modified", "previous_1_modified", "previous_2_modified", "recognized_current", "recognized_1", "recognized_2", "recognized_3");
     if (in_array($labelAlias, $dynamic_labelAlias)) {
         $year = _getYearValueFromID(_getRequestParamValue('year'));
         $dynamic_labels = array("current_modified" => "Modified<br/>" . $year, "previous_modified" => "Modified<br/>" . ($year - 1), "previous_1_modified" => "Modified<br/>" . ($year - 2), "previous_2_modified" => "Modified<br/>" . ($year - 3), "recognized_current" => "Recognized<br/>" . $year, "recognized_1" => "Recognized<br/>" . ($year + 1), "recognized_2" => "Recognized<br/>" . ($year + 2), "recognized_3" => "Recognized<br/>" . ($year + 3));
         $label = $dynamic_labels[$labelAlias];
     } else {
         $label = NULL;
         if ($labelOnly) {
             $label = self::getLabel($labelAlias);
         } else {
             $label = self::$labels[$labelAlias];
         }
     }
     return $label;
 }
                   class="toggler collapsed <?php 
    echo $clickClass . ' ' . $class;
    ?>
"
                   id="master_assoc_cta_expand"></span>
        <div class='contract-title-text'>Contract Spending for 
        <a href="/panel_html/contract_transactions/contract_details/agid/<?php 
    echo $contract['original_agreement_id'] . $datasource;
    ?>
/doctype/CTA1"
          class="bottomContainerReload"><?php 
    echo $contract['contract_number'];
    ?>
</a></div>
		<?php 
    if (_getRequestParamValue("datasource") == "checkbook_oge" && !preg_match('/newwindow/', $_GET['q']) && $contract['data_source_amounts_differ']) {
        $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 
<?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/>.
*/
$categoryId = _getRequestParamValue('category');
$catname = RequestUtil::getSpendingTransactionTitle();
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">' . ($catname . ' Amount') . '</div></div></div>';
Ejemplo n.º 15
0
        <?php 
    echo $count;
    ?>
Trust & Agency<br>Spending<br><?php 
    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;
* 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/>.
*/
?>
<h4>
Prime Vendor Information
</h4>
<?php 
//TODO temp fix move bottom code to separate custom preprocess function
$contract_num = _getRequestParamValue("contract");
$version_num = _getRequestParamValue("version");
$queryVendorDetails = "SELECT\n       vh.vendor_id,\n       rb.business_type_code,\n       p.vendor_id vendor_vendor,\n       l444.document_code,\n       va.address_id,\n       p.vendor_legal_name AS vendor_name,\n       a.address_line_1,\n       a.address_line_2,\n       a.city, a.state, a.zip, a.country,\n      (CASE WHEN (rb.business_type_code = 'MNRT' OR rb.business_type_code = 'WMNO') THEN 'Yes' ELSE 'NO' END) AS mwbe_vendor,\n      (CASE WHEN rm.minority_type_id in (4,5) then 'Asian American' ELSE rm.minority_type_name END)AS ethnicity\n\t                        FROM {pending_contracts} p\n\t                            LEFT JOIN {vendor} v ON p.vendor_id = v.vendor_id\n\t                            LEFT JOIN (SELECT vendor_id, MAX(vendor_history_id) AS vendor_history_id\n\t                                        FROM {vendor_history} WHERE miscellaneous_vendor_flag::BIT = 0 ::BIT  GROUP BY 1) vh ON v.vendor_id = vh.vendor_id\n\t                            LEFT JOIN {vendor_address} va ON vh.vendor_history_id = va.vendor_history_id\n\t                            LEFT JOIN {address} a ON va.address_id = a.address_id\n\t                            LEFT JOIN {ref_address_type} ra ON va.address_type_id = ra.address_type_id\n\t                            LEFT JOIN {vendor_business_type} vb ON vh.vendor_history_id = vb.vendor_history_id\n\t                            LEFT JOIN {ref_business_type} rb ON vb.business_type_id = rb.business_type_id\n\t                            LEFT JOIN {ref_minority_type} rm ON vb.minority_type_id = rm.minority_type_id\n\t                            LEFT JOIN {ref_document_code} AS l444 ON l444.document_code_id = p.document_code_id\n\t                        WHERE p.contract_number = '" . $contract_num . "'" . " AND p.document_version =" . $version_num;
$results1 = _checkbook_project_execute_sql($queryVendorDetails);
$node->data = $results1;
foreach ($node->data as $key => $value) {
    if ($value['business_type_code'] == "MNRT" || $value['business_type_code'] == "WMNO") {
        $node->data[0]["mwbe_vendor"] = "Yes";
    }
}
if ($node->data[0]["vendor_id"]) {
    $queryVendorCount = "SELECT COUNT(*) AS total_contracts_sum FROM {agreement_snapshot} WHERE latest_flag= 'Y' AND vendor_id =" . $node->data[0]["vendor_id"];
    $results2 = _checkbook_project_execute_sql($queryVendorCount);
    foreach ($results2 as $row) {
        $total_cont += $row['total_contracts_sum'];
    }
    $vendor_link = '/contracts_landing/status/A/year/' . _getCurrentYearID() . '/yeartype/B/vendor/' . $node->data[0]['vendor_id'] . '?expandBottomCont=true';
Ejemplo n.º 17
0
        <?php 
    echo $count;
    ?>
<br>Active<br>Revenue Contracts<br><?php 
    echo $dollars;
    ?>
        <?php 
}
?>
            
        </div>
        <div class="indicator"></div>
      </td>
      <?php 
$class = "";
if (preg_match("/^contracts_revenue_landing/", $_GET['q']) & _getRequestParamValue("status") == "R") {
    $class = ' class="active"';
}
$reg_link = ContractURLHelper::prepareActRegContractsSliderFilter('contracts_revenue_landing', 'R');
$count = "<span class='count'>" . number_format($node->data[3]['total_contracts']) . "</span>";
$dollars = "<span class='dollars'>" . custom_number_formatter_format($node->data[3]['current_amount_sum'], 1, '$') . "</span>";
?>
      <td<?php 
echo $class;
?>
>
        <div class="positioning">
      <?php 
if ($node->data[3]['total_contracts'] > 0) {
    ?>
                
Ejemplo n.º 18
0
        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 (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';
Ejemplo n.º 19
0
						            January: 12, February: 11, March: 10, April: 9, May: 8, June: 7,
						            July: 6, August: 5, September: 4, October: 3, November:2, December:1
						        };
							source.month' . $index . ' = months[val];
							source.month_display' . $index . ' =  "<div class=\\"text\\">" + val + "</div>";
							return;
					}else if (type == "display") {
						return source.month_display' . $index . ';
					}
					return source.month' . $index . ';
					},
					"sClass":"' . $column->columnType . '",
					"asSorting": [ "desc", "asc" ]
					},
				';
    } elseif (($column->formatType == 'monthfy' || $column->formatType == 'month') && _getRequestParamValue('yeartype') == 'B') {
        $aoColumnDefs .= '	{
				"aTargets": [' . $index . '],
					"aExportFn":"function",
					"mDataProp": function ( source, type, val ) {
						if (type == "set") {
            				var months_fy = {
									January: 6, February: 5, March: 4, April: 3, May: 2, June: 1,
						            July: 12, August: 11, September: 10, October: 9, November:8, December:7
						        };
							source.month' . $index . ' = months_fy[val];
							source.month_display' . $index . ' =  "<div class=\\"text\\">" + val + "</div>";
							return;
						}else if (type == "display") {
							return source.month_display' . $index . ';
						}
Ejemplo n.º 20
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>&nbsp;' . 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>&nbsp;' . 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>&nbsp;' . 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>&nbsp;' . 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';
}
$expclass = '';
$rclass = '';
$cclass = '';
* 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/>.
*/
$smnid = _getRequestParamValue('smnid');
$dashboard = _getRequestParamValue('dashboard');
$contactStatus = _getRequestParamValue('contstatus');
$contactStatusLabel = 'Active';
if ($contactStatus == 'R') {
    $contactStatusLabel = 'Registered';
}
$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() || $dashboard) {
        $summaryTitle = RequestUtil::getDashboardTitle() . " ";
    }
}
Ejemplo n.º 22
0
    function get_top_nav_records_count($urlParamMap, $default_params, $table)
    {
        $where_filters = array();
        foreach ($urlParamMap as $param => $value) {
            if (_getRequestParamValue($param) != null) {
                $where_filters[] = _widget_build_sql_condition(' a1.' . $value, _getRequestParamValue($param));
            }
        }
        foreach ($default_params as $param => $value) {
            $where_filters[] = _widget_build_sql_condition(' a1.' . $param, $value);
        }
        if (count($where_filters) > 0) {
            $where_filter = ' where ' . implode(' and ', $where_filters);
        }
        $sql = 'select count(*) count
				    from ' . $table . ' a1
				   ' . $where_filter;
        $data = _checkbook_project_execute_sql($sql);
        return $data[0]['count'];
    }
Ejemplo n.º 23
0
/**
* 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/>.
*/
$title = 'New York City';
$domain = 'Budget';
$agency = _getRequestParamValue('agency');
$expcategory = _getRequestParamValue('expcategory');
if (!empty($expcategory)) {
    $expName = _checkbook_project_get_name_for_argument('object_class_id', $expcategory);
    $title = $expName;
} else {
    if (!empty($agency)) {
        $title = _checkbook_project_get_name_for_argument('agency_id', $agency);
    }
}
Ejemplo n.º 24
0
            echo "<th{$headerClass}>" . $label . "</th>";
        }
    }
}
echo "</tr>\n";
?>
  </thead>

  <tbody>

  <?php 
if (isset($node->data) && is_array($node->data)) {
    foreach ($node->data as $datarow) {
        echo "<tr>";
        foreach ($node->widgetConfig->table_columns as $row) {
            if (!isset($row->datasource) || isset($row->datasource) && $row->datasource == _getRequestParamValue('datasource')) {
                echo '<td class="' . $datarow[$row->classColumn] . '">' . $datarow[$row->column] . '</td>';
            }
        }
        echo "</tr>";
    }
}
?>
  </tbody>
</table>

<?php 
echo '<div class="tableFooter">';
if ($node->widgetConfig->enableExpand == TRUE) {
    if ($node->totalDataCount > 5) {
        echo '<a href="#" class="expandCollapseWidget"><img src="/' . drupal_get_path('theme', $GLOBALS['theme']) . '/images/open.png"></a>';
Ejemplo n.º 25
0
* 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']);
    $total_hourly_employees = number_format($results['total_hourly_employees@checkbook:payroll_year']);
    $total_employees = number_format($results['total_employees@checkbook:payroll_year']);
    $year = $results['year_year'];
    $yearType = $results['year_type_year_type'];
    if (_getRequestParamValue('smnid') == 322) {
        $total_overtime_employees = number_format($results['total_overtime_employees']);
        $total_overtime_employees_label = WidgetUtil::getLabel('total_no_of_ot_employees') . ':';
    }
    $table = "\r\n<div id='payroll-tx-static-content'>\r\n    <table id='payroll-tx-static-content-table'>\r\n        <tr>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('annual_salary') . "</strong>: {$total_annual_salary}</td>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('total_no_of_employees') . "</strong>: {$total_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('gross_pay_ytd') . "</strong>: {$total_gross_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_sal_employees') . "</strong>: {$total_salaried_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('base_pay_ytd') . "</strong>: {$total_base_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_non_sal_employees') . "</strong>: {$total_hourly_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('other_pay_1_ytd') . "</strong>: {$total_other_payments}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('overtime_pay_1_ytd') . "</strong>: {$total_overtime_pay}</td>\r\n        </tr>";
    if (isset($total_overtime_employees)) {
        $table .= "<tr>";
        $table .= "<td><strong>{$total_overtime_employees_label} </strong> {$total_overtime_employees}</td>";
        $table .= "</tr>";
    }
    $table .= "</table></div>";
    print $table;
}
$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>';
    }
}
    $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';
    }
    if (_getRequestParamValue('smnid') == 491) {
        $total_overtime_employees_label = WidgetUtil::getLabel('total_no_of_ot_employees') . ':';
        $overtime_employees_value = number_format($results['total_overtime_employees']);
    }
    $table = "\r\n<div id='payroll-tx-static-content'>\r\n<div class='payroll-year-month'><span class='label'>" . WidgetUtil::getLabel('month') . ": </span><span class='data'> {$month_value} </span> &nbsp;&nbsp;|&nbsp;&nbsp;<span class='label'>" . WidgetUtil::getLabel('year') . ":</span><span class='data'> {$yeartype} {$year_value}</span></div>\r\n    <table id='payroll-tx-static-content-table'>\r\n        <tr>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('annual_salary') . "</strong>: {$total_annual_salary}</td>\r\n            <td width='50%'><strong>" . WidgetUtil::getLabel('total_no_of_employees') . "</strong>: {$total_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('gross_pay') . "</strong>: {$total_gross_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_sal_employees') . "</strong>: {$total_salaried_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('base_pay') . "</strong>:{$total_base_pay}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('total_no_of_non_sal_employees') . "</strong>: {$total_hourly_employees}</td>\r\n        </tr>\r\n        <tr>\r\n            <td><strong>" . WidgetUtil::getLabel('other_pay') . "</strong>: {$total_other_payments}</td>\r\n            <td><strong>" . WidgetUtil::getLabel('overtime_pay') . "</strong>: {$total_overtime_pay}</td>\r\n        </tr>";
    if (isset($overtime_employees_value)) {
        $table .= "<tr>";
        $table .= "<td><strong>{$total_overtime_employees_label} </strong> {$overtime_employees_value}</td>";
        $table .= "</tr>";
    }
    $table .= "</table></div>";
    print $table;
}
* 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/>.
*/
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;
    }
}
    ?>
                        window.location = "/mwbe_agency_grading/sub_vendor_data/year/<?php 
    echo _getRequestParamValue('year');
    ?>
/yeartype/<?php 
    echo _getRequestParamValue('yeartype');
    ?>
/mwbe_filter/" + filter;
                        <?php 
} else {
    ?>
                        window.location = "/mwbe_agency_grading/year/<?php 
    echo _getRequestParamValue('year');
    ?>
/yeartype/<?php 
    echo _getRequestParamValue('yeartype');
    ?>
/mwbe_filter/" + filter;
                        <?php 
}
?>

	                });

	            }
	        };
	    
	    
	}(jQuery));    

</script>
Ejemplo n.º 30
0
* 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");
    $dept = WidgetUtil::getLabel("dept_name");
    $percent_spending = WidgetUtil::getLabel("percent_spending");
    $percent_spending_value = $row['percent_spending'];
    if (_getRequestParamValue('smnid') == 29) {
        $percent_spending = '';
        $percent_spending_value = '';
    }
    $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}</div>
\t</div>
\t<div class="dollar-amounts">
        <div class="ytd-spending-amount">
            {$row['formatted_check_amount_sum']}
            <div class="amount-title">{$ytdspending}</div>
        </div>
        <div class="percent-spending-amount">