Example #1
0
* 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/>.
*/
$budget_parameter_mapping = _checkbook_smart_search_domain_fields('budget');
$linkable_fields = array("agency_name" => "/budget/year/" . _getCurrentYearID() . "/yeartype/B/agency/" . $budget_results["agency_id"], "expenditure_object_name" => "/budget/year/" . _getCurrentYearID() . "/yeartype/B/expcategory/" . $budget_results["expenditure_object_id"]);
if ($budget_results['fiscal_year'][0] < 2010) {
    $linkable_fields = array();
}
$amount_fields = array("adopted_amount", "current_budget_amount", "total_expenditure", "pre_encumbered_amount", "encumbered_amount", "accrued_expense_amount", "cash_expense_amount", "post_closing_adjustment_amount");
$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];
Example #2
0
* 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/>.
*/
$spending_parameter_mapping = _checkbook_smart_search_domain_fields('spending', $IsOge);
if ($spending_results['fiscal_year_id'] != '') {
    $fiscal_year_id = $spending_results['fiscal_year_id'][0];
} else {
    $fiscal_year_id = _getCurrentYearID();
}
if ($IsOge) {
    $linkable_fields = array("oge_agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . '/datasource/checkbook_oge' . "/year/" . _getFiscalYearID() . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . '/datasource/checkbook_oge' . '/agency/' . $spending_results['agency_id'] . "/year/" . _getFiscalYearID() . "/yeartype/B/vendor/" . $spending_results["vendor_id"]);
} else {
    if ($spending_results['spending_category_name'] == 'Payroll') {
        $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => $spending_results['vendor_name']);
    } elseif ($spending_results['vendor_id'] == 1) {
        $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/vendor/" . $spending_results["vendor_id"]);
    } elseif ($spending_results['is_prime_or_sub'] == 'Yes' && SpendingUtil::getLatestMwbeCategoryBySpendingVendorByTransactionYear($spending_results["vendor_id"], $fiscal_year_id, 'B') == '') {
        $linkable_fields = array("agency_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/agency/" . $spending_results["agency_id"], "vendor_name" => "/spending_landing/category/" . $spending_results['spending_category_id'] . "/year/" . $fiscal_year_id . "/yeartype/B/subvendor/" . $spending_results["vendor_id"] . "/dashboard/ss");
    } elseif ($spending_results['is_prime_or_sub'] == 'No' && SpendingUtil::getLatestMwbeCategoryBySpendingVendorByTransactionYear($spending_results["vendor_id"], $fiscal_year_id, 'B') != '') {
Example #3
0
* 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/>.
*/
$payroll_parameter_mapping = _checkbook_smart_search_domain_fields('payroll');
$agency_id = $payroll_results['agency_id'];
$dept_id = $payroll_results['department_id'];
$emp_id = $payroll_results['employee_id'];
$year_id = _getCurrentYearID();
$linkable_fields = array("civil_service_title" => "/payroll/employee/transactions/xyz/" . $emp_id . "/agency/" . $agency_id, "agency_name" => "/payroll/agency/" . $agency_id);
if ($payroll_results['fiscal_year'] < 2010) {
    $linkable_fields = array();
}
$date_fields = array("pay_date");
$amount_fields = array("annual_salary", "gross_pay", "base_pay", "other_payments", "overtime_pay");
$count = 1;
$row = array();
$rows = array();
foreach ($payroll_parameter_mapping as $key => $title) {
    $value = $payroll_results[$key];
Example #4
0
<?php

/**
*	GNU AFFERO GENERAL PUBLIC LICENSE 
*	   Version 3, 19 November 2007
* This software is licensed under the GNU AGPL Version 3
* 	(see the file LICENSE for details)
*/
$contracts_parameter_mapping = _checkbook_smart_search_domain_fields('contracts', $IsOge);
if (strtolower($contracts_results['contract_status']) == 'registered') {
    $search_terms = explode('*|*', $_REQUEST['search_term']);
    $contract_status = '';
    foreach ($search_terms as $id => $keyvaluepair) {
        $keys = explode("=", $keyvaluepair);
        if ($keys[0] == 'registered_fiscal_years') {
            $reg_year = $keys[1];
        }
        if ($keys[0] == 'contract_status' && $keys[1] == 'active') {
            $contract_status = 'Active';
        }
        if ($keys[0] == 'contract_status' && $keys[1] == 'registered') {
            $contract_status = 'Registered';
        }
    }
    $act_fiscal_year = $contracts_results['fiscal_year'];
    $reg_fiscal_year = $contracts_results['registered_fiscal_year'];
    $current_date = date("c") . 'Z';
    $start_date = date("c", strtotime($contracts_results['start_date']));
    $end_date = date("c", strtotime($contracts_results['end_date']));
    if ($contract_status == 'Active') {
        $contracts_results['contract_status'] = 'Active';
Example #5
0
* 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/>.
*/
$revenue_parameter_mapping = _checkbook_smart_search_domain_fields('revenue');
$linkable_fields = array("agency_name" => "/agency/" . $revenue_results["agency_id"]);
if ($revenue_results['fiscal_year'][0] < 2010) {
    $linkable_fields = array();
}
$amount_fields = array("adopted_amount", "current_budget_amount", "posting_amount");
$count = 1;
$row = array();
$rows = array();
foreach ($revenue_parameter_mapping as $key => $title) {
    $value = $revenue_results[$key];
    if ($key == 'fiscal_year') {
        $value = $revenue_results[$key][0];
    }
    if (strpos(strtoupper($value), strtoupper($SearchTerm)) !== FALSE) {
        $temp = substr($value, strpos(strtoupper($value), strtoupper($SearchTerm)), strlen($SearchTerm));