static function prepareExpenseContractLink($row, $node, $parent = false, $original_agreement_id = null) { $link = NULL; if (isset($row['contract_original_agreement_id'])) { $row['original_agreement_id'] = $row['contract_original_agreement_id']; } $row['original_agreement_id'] = $original_agreement_id ? $original_agreement_id : $row['original_agreement_id']; if ($parent && strlen($row['master_contract_number']) > 0) { $agrParamName = 'magid'; $docTypeStr = substr($row['master_contract_number'], 0, 3); $docType = $docTypeStr == 'MA1' ? 'MA1' : 'MMA1'; $row['original_agreement_id'] = $row['master_agreement_id']; $row['contract_number'] = $row['master_contract_number']; } else { if ($parent && strlen($row['master_contract_number']) == 0) { return ""; } else { $docType = $row['document_code@checkbook:ref_document_code']; $agrParamName = in_array($docType, array('MMA1', 'MA1')) ? 'magid' : 'agid'; } } if (RequestUtil::isExpandBottomContainer()) { $link = '<a href=/panel_html/contract_transactions/contract_details/' . $agrParamName . '/' . $row['original_agreement_id'] . '/doctype/' . $docType . _checkbook_append_url_params() . ' class=bottomContainerReload>' . $row['contract_number'] . '</a>'; } else { $link = '<a href=/contracts_landing' . _checkbook_project_get_url_param_string('contstatus', 'status') . _checkbook_append_url_params() . (isset($row['type_of_year@checkbook:contracts_coa_aggregates']) ? $row['type_of_year@checkbook:contracts_coa_aggregates'] == 'B' ? '/yeartype/B/year/' . $row['fiscal_year_id@checkbook:contracts_coa_aggregates'] : '/yeartype/C/calyear/' . $row['fiscal_year_id@checkbook:contracts_coa_aggregates'] : _checkbook_project_get_year_url_param_string()) . (_checkbook_check_isEDCPage() ? '/agency/' . $row['agency_id'] : '') . '?expandBottomContURL=/panel_html/contract_transactions/contract_details/' . $agrParamName . '/' . $row['original_agreement_id'] . '/doctype/' . $docType . _checkbook_append_url_params() . ' >' . $row['contract_number'] . '</a>'; } return $link; }
* 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/>. */ $city_agencies = array(); $edc_agencies = array(); foreach ($node->data as $key => $value) { if (array_key_exists('is_oge_agency', $value)) { $edc_agencies[$key] = $value; } else { $city_agencies[$key] = $value; } } $oge_filter_highlight = _checkbook_check_isEDCPage() ? 'agency_filter_highlight' : ''; $city_filter_highlight = !_checkbook_check_isEDCPage() ? 'agency_filter_highlight' : ''; $current_fy_year = _getFiscalYearID(); $current_cal_year = _getCalendarYearID(); $current_url = explode('/', $_SERVER['REQUEST_URI']); $url = $current_url[1]; if ($current_url[1] == 'contracts_landing' || $current_url[1] == 'contracts_revenue_landing' || $current_url[1] == 'contracts' || $current_url[1] == 'contracts_pending_exp_landing' || $current_url[1] == 'contracts_pending_rev_landing') { $all_agency_url = $url = 'contracts_landing/status/A/yeartype/B/year/' . $current_fy_year; } else { if ($current_url[1] == 'payroll') { $all_agency_url = $url = 'payroll/yeartype/B/year/' . $current_fy_year; } else { if ($current_url[1] == 'budget') { $all_agency_url = $url = 'budget/yeartype/B/year/' . $current_fy_year; } else { if ($current_url[1] == 'revenue') { $all_agency_url = $url = 'revenue/yeartype/B/year/' . $current_fy_year;
$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>'; } }
/** Returns top navigation URL */ static function getTopNavURL($domain) { $year = _getRequestParamValue("year"); if ($year == null) { $year = _getCurrentYearID(); } switch ($domain) { case "contracts": $path = "contracts_landing/status/A/yeartype/B/year/" . $year . _checkbook_append_url_params(null, array(), true); if (_getRequestParamValue("agency") > 0) { $path = $path . "/agency/" . _getRequestParamValue("agency"); } else { if (_checkbook_check_isEDCPage()) { $path = $path . "/agency/9000"; } } if (_getRequestParamValue("vendor") > 0) { $path = $path . "/vendor/" . _getRequestParamValue("vendor"); } break; case "spending": $path = "spending_landing/yeartype/B/year/" . $year . _checkbook_append_url_params(null, array(), true); if (_getRequestParamValue("agency") > 0) { $path = $path . "/agency/" . _getRequestParamValue("agency"); } else { if (_checkbook_check_isEDCPage()) { $path = $path . "/agency/9000"; } } if (_getRequestParamValue("vendor") > 0) { $path = $path . "/vendor/" . _getRequestParamValue("vendor"); } break; case "payroll": if (_getRequestParamValue("agency") > 0) { $path = "payroll/" . "agency/" . _getRequestParamValue("agency") . "/yeartype/B/year/" . $year; } else { $path = "payroll/yeartype/B/year/" . $year; } break; case "budget": if (_getRequestParamValue("agency") > 0) { $path = "budget/yeartype/B/year/" . $year . "/agency/" . _getRequestParamValue("agency"); } else { $path = "budget/yeartype/B/year/" . $year; } break; case "revenue": if (_getRequestParamValue("agency") > 0) { $path = "revenue/yeartype/B/year/" . $year . "/agency/" . _getRequestParamValue("agency"); } else { $path = "revenue/yeartype/B/year/" . $year; } break; } return $path; }
/** * Spending transaction no results page should be shown for citywide, oge * @return bool */ static function showNoSpendingTransactionPage() { $subvendor_exist = _checkbook_check_is_sub_vendor_page(); $ma1_mma1_contracts_exist = _checkbook_project_ma1_mma1_exist(); $edc_records_exist = _checkbook_check_isEDCPage() && _checkbook_project_recordsExists(6); $mwbe_records_exist = _checkbook_check_is_mwbe_page() && !$subvendor_exist && _checkbook_project_recordsExists(706); $citywide_exist = !$subvendor_exist && !$mwbe_records_exist && !$edc_records_exist && _checkbook_project_recordsExists(6); if ($ma1_mma1_contracts_exist || $subvendor_exist) { return false; } return $subvendor_exist || $ma1_mma1_contracts_exist || $edc_records_exist; }
echo WidgetUtil::generateLabelMapping("contract_agency"); ?> </th> <th> </th> </tr> </thead> <tbody> <?php if (isset($node->data) && is_array($node->data)) { foreach ($node->data as $datarow) { $datarow['contract_number'] = _checkbook_check_isEDCPage() ? $datarow['contract_number_contract_number'] : $datarow['contract_number']; $datarow['maximum_contract_amount'] = _checkbook_check_isEDCPage() ? $datarow['current_amount_sum'] : $datarow['maximum_contract_amount']; $datarow['legal_name@checkbook:vendor'] = _checkbook_check_isEDCPage() ? $datarow['display_vendor_names'] : $datarow['legal_name@checkbook:vendor']; $datarow['agency_name@checkbook:agency'] = _checkbook_check_isEDCPage() ? $datarow['display_agency_display_agency_agency_name'] : $datarow['agency_name@checkbook:agency']; echo '<tr> <td><div>' . $datarow['contract_number'] . '</div></td> <td>' . $datarow['maximum_contract_amount'] . '</td> <td> </td> <td><div>' . $datarow['legal_name@checkbook:vendor'] . '</div></td> <td><div>' . $datarow['agency_name@checkbook:agency'] . '</div></td> <td> </td> </tr>'; } } ?> </tbody> </table> <?php echo eval($node->widgetConfig->gridConfig->footer);