$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";
* 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/>.
*/
$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()) {
        $summaryTitle = MappingUtil::getCurrenEhtnicityName() . " ";
    }
}
$summaryTitle .= NodeSummaryUtil::getInitNodeSummaryTitle();
print "<h2 class='contract-title' class='title'>{$summaryTitle} Pending {$contactCategoryLabel} Contracts Transactions</h2>";
global $checkbook_breadcrumb_title;
$checkbook_breadcrumb_title = "{$summaryTitle} Pending {$contactCategoryLabel} Contracts Transactions";
Example #3
0
 /**
  * Returns chart title for a prime or sub vendor page based on 'category'/'featured dashboard'/'domain'
  * using values from current path.
  *
  * The page title above the visualization for Prime vendor Level and Sub vendor level pages:
  *
  * 1. Follow a three-line format when the M/WBE Category is equal to any of the following:
  *    Asian American, Black American, Women or Hispanic
  * 2. Follow a two-line format when the M/WBE Category is equal to any of the following:
  *    Individual & Others or Non M/WBE
  *
  * @param string $domain
  * @param string $defaultTitle
  * @return string
  */
 static function getTitleByVendorType($domain, $defaultTitle = 'Total Spending')
 {
     $title = $minority_category = $minority_type_id = '';
     if (_checkbook_check_is_mwbe_page()) {
         $minority_type_id = _getRequestParamValue('mwbe');
     } else {
         $lastReqParam = _getLastRequestParamValue();
         foreach ($lastReqParam as $key => $value) {
             switch ($key) {
                 case 'vendor':
                     $minority_type_id = self::getLatestMinorityTypeByVendorType($domain, $value, VendorType::$PRIME_VENDOR);
                     break;
                 case 'subvendor':
                     if ($value != 'all') {
                         $minority_type_id = self::getLatestMinorityTypeByVendorType($domain, $value, VendorType::$SUB_VENDOR);
                     }
                     break;
                 default:
             }
         }
     }
     $minority_type_ids = explode('~', $minority_type_id);
     $minority_category = MappingUtil::getCurrenEhtnicityName($minority_type_ids);
     $MWBE_certified = MappingUtil::isMWBECertified($minority_type_ids);
     $title = $MWBE_certified ? '<p class="sub-chart-title">M/WBE Category: ' . $minority_category . '</p>' : $minority_category . ' ';
     $title .= RequestUtil::getSpendingCategoryName($defaultTitle);
     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>';
    }
}
Example #5
0
 /**
  * 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;
 }