static function getMonthDetails($monthId) { if (!isset($monthId)) { return NULL; } $monthDetails = _checkbook_project_querydataset('checkbook:month', array('month_id', 'month_value', 'month_name', 'month_short_name'), array('month_id' => $monthId)); return $monthDetails; }
static function getSpendingCategoryDetails($categoryId, $columns = array('spending_category_id', 'display_name')) { if (!isset($categoryId)) { return NULL; } $categoryDetails = _checkbook_project_querydataset('checkbook:category', $columns, array('spending_category_id' => $categoryId)); return $categoryDetails; }
$display = true; // if page is spending transactions page coming from advanced search if (preg_match('/^spending\\/search\\/transactions/', $_GET['q']) || preg_match('/yeartype/', $_GET['q'])) { // both dates are not given if (isset($chkdate) && $chkdate != "") { $dates = explode('~', $chkdate); if (isset($dates[0])) { $start_fy = _checkbook_project_querydataset('checkbook:date_id', array('nyc_year_id'), array("date" => $dates[0])); $start_fy = $start_fy[0]['nyc_year_id']; $start_cy_year = substr($dates[0], 0, 4); } else { $start_fy = 0; $start_cy_year = 0; } if (isset($dates[1])) { $end_fy = _checkbook_project_querydataset('checkbook:date_id', array('nyc_year_id'), array("date" => $dates[1])); $end_fy = $end_fy[0]['nyc_year_id']; $end_cy_year = substr($dates[1], 0, 4); } else { $end_fy = 0; $end_cy_year = 0; } if ($end_cy_year >= 2010) { // Dates are in different fiscal year if ($start_fy != $end_fy) { if ($start_cy_year == $end_cy_year) { $year_id_value = $start_fy > 0 ? $start_fy : $end_fy; $q = preg_replace("/\\/chkdate\\/[^\\/]*/", "", $q); $year_type_value = 'C'; $cal_year_id_value = $year_id_value; $q = $q . "/yeartype/C/year/";
static function getSpendingEDCURL() { $vendor = _checkbook_project_querydataset("checkbook:vendor", "vendor_id", array("vendor_customer_code" => "0000776804")); $url = "spending_landing/yeartype/B/year/" . _getCurrentYearID() . "/vendor/" . $vendor[0]['vendor_id']; return $url; }
function _prepare_oge_contracts_spending_url($row, $node) { $agencies = _checkbook_project_querydataset('checkbook_oge:agency', array('agency_id', 'agency_name'), array('agency_id' => $row['agency_id'], 'is_oge_agency' => 'Y')); $oge_agency_name = $agencies[0]['agency_name']; $vendors = _checkbook_project_querydataset('checkbook_oge:vendor', array('vendor_id', 'legal_name'), array('vendor_id' => $row['vendor_id'])); $oge_vendor_name = $vendors[0]['legal_name']; $vendor_url = ''; if (strtolower($oge_agency_name) != strtolower($oge_vendor_name)) { $vendor_url = '/svendor/' . $row['vendor_id']; } $year_url = ''; if (!(_getRequestParamValue('year') || _getRequestParamValue('calyear'))) { $year_url = '/yeartype/B/year/' . _getFiscalYearID() . '/syear/' . _getFiscalYearID(); } else { $year_url = $row['type_of_year'] == 'B' ? '/year/' . $row['fiscal_year_id'] . '/syear/' . $row['fiscal_year_id'] : '/calyear/' . $row['fiscal_year_id'] . '/scalyear/' . $row['fiscal_year_id']; } $url = "<a href='/spending/transactions" . ($row['master_agreement_yn'] == 'Y' ? '/magid/' : '/agid/') . $row['original_agreement_id'] . ($row['master_agreement_yn'] == 'Y' ? $vendor_url : '/svendor/' . $row['vendor_id']) . ($row['master_agreement_yn'] == 'Y' ? '' : '/scomline/' . $row['fms_commodity_line']) . $year_url . _checkbook_project_get_url_param_string('vendor') . _checkbook_append_url_params() . "/newwindow' class='new_window'>" . custom_number_formatter_basic_format($row['spending_amount_disb']) . '</a>'; return $url; }