* 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";
Exemplo n.º 2
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";
 }
Exemplo n.º 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);
 }
Exemplo n.º 4
0
 static function getSubVendorEthinictyTitle($vendor_id, $domain, $is_prime_or_sub = "S")
 {
     switch ($domain) {
         case "spending":
             $current_ethnicity_from_filter = MappingUtil::getCurrenEhtnicityName();
             if ($current_ethnicity_from_filter != null && $current_ethnicity_from_filter != "M/WBE") {
                 $title = " <br/><span class=\"second-line\">M/WBE Category: " . $current_ethnicity_from_filter . "</span>";
             } else {
                 $ethnicity_id = SpendingUtil::getLatestMwbeCategoryByVendor($vendor_id, null, null, null, $is_prime_or_sub);
                 if ($ethnicity_id > 0) {
                     $title = " <br/><span class=\"second-line\">M/WBE Category: " . MappingUtil::getMinorityCategoryById($ethnicity_id) . "</span>";
                 }
             }
             break;
         case "contracts":
             $current_ethnicity_from_filter = MappingUtil::getCurrenEhtnicityName();
             if ($current_ethnicity_from_filter != null && $current_ethnicity_from_filter != "M/WBE") {
                 $title = " <br/><span class=\"second-line\">M/WBE category: " . $current_ethnicity_from_filter . "</span>";
             } else {
                 $ethnicity_id = ContractUtil::getLatestMwbeCategoryByVendor($vendor_id, null, null, null, $is_prime_or_sub);
                 if (!$ethnicity_id) {
                     $query = "SELECT year_id, minority_type_id\n                      FROM contract_vendor_latest_mwbe_category\n                      WHERE  vendor_id = " . $vendor_id . " AND is_prime_or_sub = '" . $is_prime_or_sub . "'" . " ORDER BY year_id DESC " . " LIMIT 1 ";
                     $results = _checkbook_project_execute_sql_by_data_source($query, 'checkbook');
                     if ($results) {
                         $ethnicity_id = $results[0]['minority_type_id'];
                     }
                 }
                 if ($ethnicity_id != 7 && $ethnicity_id != 11) {
                     $title = " <br/><span class=\"second-line\">M/WBE Category: " . MappingUtil::getMinorityCategoryById($ethnicity_id) . "</span>";
                 }
             }
             break;
     }
     return $title;
 }