本文整理汇总了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
示例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]);
}