當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CProject::getBillingCodes方法代碼示例

本文整理匯總了PHP中CProject::getBillingCodes方法的典型用法代碼示例。如果您正苦於以下問題:PHP CProject::getBillingCodes方法的具體用法?PHP CProject::getBillingCodes怎麽用?PHP CProject::getBillingCodes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CProject的用法示例。


在下文中一共展示了CProject::getBillingCodes方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: die

<?php

/* $Id$ $URL$ */
if (!defined('W2P_BASE_DIR')) {
    die('You should not access this file directly.');
}
global $AppUI, $project_id, $df, $canEdit, $m, $tab;
// Lets check which cost codes have been used before
$company_id = CProject::getCompany($project_id);
$task_log_costcodes = array(0 => '(all)') + CProject::getBillingCodes($company_id, true);
$users = w2PgetUsers();
$cost_code = w2PgetParam($_GET, 'cost_code', 0);
if (isset($_GET['user_id'])) {
    $AppUI->setState('ProjectsTaskLogsUserFilter', w2PgetParam($_GET, 'user_id', 0));
}
$user_id = $AppUI->getState('ProjectsTaskLogsUserFilter') ? $AppUI->getState('ProjectsTaskLogsUserFilter') : 0;
if (isset($_GET['hide_inactive'])) {
    $AppUI->setState('ProjectsTaskLogsHideArchived', true);
} else {
    $AppUI->setState('ProjectsTaskLogsHideArchived', false);
}
$hide_inactive = $AppUI->getState('ProjectsTaskLogsHideArchived');
if (isset($_GET['hide_complete'])) {
    $AppUI->setState('ProjectsTaskLogsHideComplete', true);
} else {
    $AppUI->setState('ProjectsTaskLogsHideComplete', false);
}
$hide_complete = $AppUI->getState('ProjectsTaskLogsHideComplete');
?>
<script language="JavaScript">
<?php 
開發者ID:joly,項目名稱:web2project,代碼行數:31,代碼來源:vw_logs.php

示例2: testGetBillingCodesAll

 /**
  * Tests getting billing codes with all set to true, so any billing
  * codes with this company id or no company assigned.
  */
 public function testGetBillingCodesAll()
 {
     $billing_codes = CProject::getBillingCodes(1, true);
     $this->assertEquals(3, count($billing_codes));
     $this->assertEquals('Cheap', $billing_codes[1]);
     $this->assertEquals('Medium', $billing_codes[2]);
     $this->assertEquals('Expensive', $billing_codes[3]);
 }
開發者ID:eureka2,項目名稱:web2project,代碼行數:12,代碼來源:projects.test.php


注:本文中的CProject::getBillingCodes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。