phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] projects/inc/class.bostatistics.inc.php, 1.19


From: nomail
Subject: [Phpgroupware-cvs] projects/inc/class.bostatistics.inc.php, 1.19
Date: Mon, 17 May 2004 16:32:48 +0200

Update of /projects/inc
Modified Files:
        Branch: 
          class.bostatistics.inc.php

date: 2004/05/17 14:32:48;  author: ceb;  state: Exp;  lines: +24 -10

Log Message:
update
=====================================================================
Index: projects/inc/class.bostatistics.inc.php
diff -u projects/inc/class.bostatistics.inc.php:1.18 
projects/inc/class.bostatistics.inc.php:1.19
--- projects/inc/class.bostatistics.inc.php:1.18        Wed May 12 21:52:02 2004
+++ projects/inc/class.bostatistics.inc.php     Mon May 17 14:32:48 2004
@@ -129,12 +129,16 @@
                        $this->boprojects->limit                = False;
                        $this->boprojects->html_output  = False;
 
+                       $hwd = $this->boprojects->siteconfig['hwday'];
+
                        if(is_array($project_array))
                        {
                                $projects = array();
                                foreach($project_array as $pro)
                                {
-                                       $project = 
$this->boprojects->list_projects(array('action' => 'mainsubsorted','project_id' 
=> $pro,'mstones_stat' => True));
+                                       $project = 
$this->boprojects->list_projects(array('action' => 'mainsubsorted','project_id' 
=> $pro,'mstones_stat' => True,'page' => 'hours'));
+
+                                       //_debug_array($project);
 
                                        if(is_array($project))
                                        {
@@ -196,15 +200,25 @@
                                                                                
                        'extracolor'    => 'darkorange');
                                        }
 
+                                       $edate = 
$pro['edate']?$pro['edate']:mktime(12,0,0,date('m'),date('d'),date('Y'));
+                                       $period = 
$this->graph->date_format($pro['sdate'],$edate);
+                                       //echo 'PERIOD: ' . $period . "\n";
+                                       $hprogress      = 
$pro['uhours_jobs']/$pro['phours'];
+                                       //echo 'hprogress: ' . $hprogress . 
"\n";
+                                       $progress       = $hprogress*$period;
+                                       //echo 'progress: ' . $progress . "\n";
+                                       $progress_date = 
mktime(12,0,0,date('m',$pro['sdate']),date('d',$pro['sdate'])+$progress,date('Y',$pro['sdate']));
+
                                        $spro[] = array
                                        (
-                                               'title'         => 
$pro['title'],
-                                               'sdate'         => 
$pro['sdate'],
-                                               'edate'         => 
$pro['edate']?$pro['edate']:mktime(0,0,0,date('m'),date('d'),date('Y')),
-                                               'color'         => 
$pro['level'],
-                                               'pro_id'        => 
$pro['project_id'],
-                                               'previous'      => 
$pro['previous'],
-                                               'mstones'       => 
$pro['mstones']
+                                               'title'                 => 
$pro['title'],
+                                               'sdate'                 => 
$pro['sdate'],
+                                               'edate'                 => 
$edate,
+                                               'progress'              => 
$progress_date,
+                                               'color'                 => 
$pro['level'],
+                                               'pro_id'                => 
$pro['project_id'],
+                                               'previous'              => 
$pro['previous'],
+                                               'mstones'               => 
$pro['mstones']
                                        );
                                        //set_y_text
                                        $this->graph->line_captions_y[$i] = 
$pro['title'];
@@ -238,7 +252,7 @@
                                $this->graph->color_legend = $color;
 
                                //set_x_text
-                               $this->graph->date_format($sdate,$edate);
+                               $this->graph->format_data($sdate,$edate);
 
                                $sdate = $sdate + (60*60) * 
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'];
                                $sdateout = 
$GLOBALS['phpgw']->common->show_date($sdate,$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat']);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]