Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -21,12 +21,6 @@ $.initSidebar();
|
||||
</footer>
|
||||
<div id="noticeBox"><?php echo $this->loadModel('score')->getNotice(); ?></div>
|
||||
<script>
|
||||
<?php if(!isset($config->global->browserNotice)):?>
|
||||
browserNotice = <?php echo json_encode($lang->browserNotice)?>;
|
||||
function ajaxIgnoreBrowser(){$.get(createLink('misc', 'ajaxIgnoreBrowser'));}
|
||||
$(function(){showBrowserNotice()});
|
||||
<?php endif;?>
|
||||
|
||||
<?php $this->app->loadConfig('message');?>
|
||||
<?php if($config->message->browser->turnon):?>
|
||||
/* Alert got messages. */
|
||||
|
||||
@@ -310,16 +310,16 @@ class reportModel extends model
|
||||
$stmt = $this->dao->select('t1.*, t2.name as projectName')->from(TABLE_TASK)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.deleted')->eq(0)
|
||||
->andWhere('t1.status')->notin('cancel, closed, done, pause')
|
||||
->andWhere('t1.status')->in('wait,doing')
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->andWhere('t2.status')->notin('cancel, closed, done, suspended')
|
||||
->andWhere('t2.status')->in('wait, doing')
|
||||
->andWhere('assignedTo')->ne('');
|
||||
|
||||
$allTasks = $stmt->fetchAll('id');
|
||||
$tasks = $stmt->beginIF($dept)->andWhere('t1.assignedTo')->in(array_keys($deptUsers))->fi()->fetchAll('id');
|
||||
|
||||
if(empty($allTasks)) return array();
|
||||
|
||||
$tasks = $stmt->beginIF($dept)->andWhere('t1.assignedTo')->in(array_keys($deptUsers))->fi()->fetchAll('id');
|
||||
|
||||
/* Fix bug for children. */
|
||||
$parents = array();
|
||||
$taskIdList = array();
|
||||
|
||||
@@ -198,6 +198,7 @@ $lang->task->createDenied = '你不能在該項目添加任務';
|
||||
$lang->task->cannotDeleteParent = '不能刪除父任務。';
|
||||
|
||||
$lang->task->error = new stdclass();
|
||||
$lang->task->error->totalNumber = '"總計消耗"必須為數字';
|
||||
$lang->task->error->consumedNumber = '"本次消耗"必須為數字';
|
||||
$lang->task->error->estimateNumber = '"預計剩餘"必須為數字';
|
||||
$lang->task->error->recordMinus = '工時不能為負數';
|
||||
|
||||
+14
-4
@@ -1211,9 +1211,14 @@ class taskModel extends model
|
||||
public function recordEstimate($taskID)
|
||||
{
|
||||
$record = fixer::input('post')->get();
|
||||
foreach($record->consumed as $item)
|
||||
foreach($record->consumed as $id => $item)
|
||||
{
|
||||
if(!trim($item)) continue;
|
||||
if(!trim($item))
|
||||
{
|
||||
$record->consumed[$id] = trim($item);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!is_numeric($item))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->totalNumber;
|
||||
@@ -1221,9 +1226,14 @@ class taskModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
foreach($record->left as $item)
|
||||
foreach($record->left as $id => $item)
|
||||
{
|
||||
if(!trim($item)) continue;
|
||||
if(!trim($item))
|
||||
{
|
||||
$record->left[$id] = trim($item);
|
||||
continue;
|
||||
}
|
||||
|
||||
if(!is_numeric($item))
|
||||
{
|
||||
dao::$errors[] = $this->lang->task->error->estimateNumber;
|
||||
|
||||
Reference in New Issue
Block a user