$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() . " ";
    }
}
//Handle Sub Vendor widget to not repeat 'Sub Vendor' in title in certain dashboards
$suppress_widget_title = $dashboard == "ss" && $smnid == 720 || $dashboard == "sp" && $smnid == 720;
//Sub Vendors (M/WBE)
if (!$suppress_widget_title) {
    $summaryTitle .= NodeSummaryUtil::getInitNodeSummaryTitle();
}
$summaryTitle = $summaryTitle != '' ? $summaryTitle : '';
print "<h2 class='contract-title' class='title'>{$summaryTitle} {$contactStatusLabel} {$contactCategoryLabel} Contracts Transactions</h2>";
global $checkbook_breadcrumb_title;
$checkbook_breadcrumb_title = "{$summaryTitle} {$contactStatusLabel} {$contactCategoryLabel} Contracts Transactions";
示例#2
0
 /** Returns Spending page title and Breadcrumb */
 static function getSpendingBreadcrumbTitle()
 {
     $bottomURL = $_REQUEST['expandBottomContURL'];
     if (preg_match('/transactions/', current_path())) {
         $title = SpendingUtil::getSpendingTransactionsTitle();
     } elseif (isset($bottomURL) && preg_match('/transactions/', $bottomURL)) {
         $dtsmnid = RequestUtil::getRequestKeyValueFromURL("dtsmnid", $bottomURL);
         $smnid = RequestUtil::getRequestKeyValueFromURL("smnid", $bottomURL);
         if ($dtsmnid > 0) {
             $title = NodeSummaryUtil::getInitNodeSummaryTitle($dtsmnid);
         } else {
             if ($smnid > 0) {
                 $title = NodeSummaryUtil::getInitNodeSummaryTitle($smnid);
             } else {
                 $last_id = _getLastRequestParamValue($bottomURL);
                 if ($last_id['vendor'] > 0) {
                     $title = _checkbook_project_get_name_for_argument("vendor_id", RequestUtil::getRequestKeyValueFromURL("vendor", $bottomURL));
                 } elseif ($last_id["agency"] > 0) {
                     $title = _checkbook_project_get_name_for_argument("agency_id", RequestUtil::getRequestKeyValueFromURL("agency", $bottomURL));
                 } elseif ($last_id["expcategory"] > 0) {
                     $title = _checkbook_project_get_name_for_argument("expenditure_object_id", RequestUtil::getRequestKeyValueFromURL("expcategory", $bottomURL));
                 } elseif ($last_id["dept"] > 0) {
                     $title = _checkbook_project_get_name_for_argument("department_id", RequestUtil::getRequestKeyValueFromURL("dept", $bottomURL));
                 } elseif (preg_match("/\\/agid/", $bottomURL)) {
                     $title = _checkbook_project_get_name_for_argument("agreement_id", RequestUtil::getRequestKeyValueFromURL("agid", $bottomURL));
                 } elseif (preg_match("/\\/magid/", $bottomURL)) {
                     $title = _checkbook_project_get_name_for_argument("master_agreement_id", RequestUtil::getRequestKeyValueFromURL("magid", $bottomURL));
                 }
                 if (preg_match('/\\/category\\/1/', $bottomURL)) {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Contract Spending Transactions';
                 } elseif (preg_match('/\\/category\\/2/', $bottomURL)) {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Payroll Spending Transactions';
                 } elseif (preg_match('/\\/category\\/3/', $bottomURL)) {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Capital Contracts Spending Transactions';
                 } elseif (preg_match('/\\/category\\/4/', $bottomURL)) {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Others Spending Transactions';
                 } elseif (preg_match('/\\/category\\/5/', $bottomURL)) {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Trust & Agency Spending Transactions';
                 } else {
                     $title = $title . ' ' . RequestUtil::getDashboardTitle() . ' Total Spending Transactions';
                 }
             }
         }
     } elseif (preg_match('/\\/category\\/1/', current_path())) {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Contract Spending';
     } elseif (preg_match('/\\/category\\/2/', current_path())) {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Payroll Spending';
     } elseif (preg_match('/\\/category\\/3/', current_path())) {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Capital Contracts Spending';
     } elseif (preg_match('/\\/category\\/4/', current_path())) {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Others Spending';
     } elseif (preg_match('/\\/category\\/5/', current_path())) {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Trust & Agency Spending';
     } else {
         $title = _get_spending_breadcrumb_title_drilldown(false) . ' ' . RequestUtil::getDashboardTitle() . ' Total Spending';
     }
     return html_entity_decode($title);
 }
$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>';
    }
}
示例#4
0
 static function getSpentToDateTitle($widgetTitle)
 {
     $dashboard = RequestUtil::getDashboardTitle();
     $contractTitle = self::getContractTitle();
     $dashboard_param = _getRequestParamValue('dashboard');
     $smnid = _getRequestParamValue('smnid');
     if ($smnid == 720) {
         if ($dashboard_param == "ms") {
             $dashboard = "M/WBE";
         } else {
             if ($dashboard_param == "ss") {
                 $dashboard = "";
             }
         }
     } else {
         if ($smnid == "subven_mwbe_contracts_visual_2" && $dashboard_param == "ms") {
             $dashboard = MappingUtil::getCurrenEhtnicityName();
         } else {
             if ($smnid == "mwbe_contracts_visual_2") {
                 $dashboard = MappingUtil::getCurrenEhtnicityName();
             } else {
                 if ($smnid == "subvendor_contracts_visual_1" && $dashboard_param == "ss") {
                     $dashboard = MappingUtil::getCurrenEhtnicityName();
                 } else {
                     if ($smnid == "subvendor_contracts_visual_1" && $dashboard_param == "sp") {
                         $dashboard = MappingUtil::getCurrenEhtnicityName();
                     }
                 }
             }
         }
     }
     return $dashboard . " " . $widgetTitle . " " . $contractTitle . " Contracts Transactions";
 }