fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10611] Property: correct userfilter at project and a


From: Sigurd Nes
Subject: [Fmsystem-commits] [10611] Property: correct userfilter at project and adjust reporting on cost
Date: Wed, 19 Dec 2012 07:44:31 +0000

Revision: 10611
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10611
Author:   sigurdne
Date:     2012-12-19 07:44:29 +0000 (Wed, 19 Dec 2012)
Log Message:
-----------
Property: correct userfilter at project and adjust reporting on cost

Modified Paths:
--------------
    trunk/property/inc/class.soproject.inc.php
    trunk/property/inc/class.uiproject.inc.php

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2012-12-18 14:21:28 UTC (rev 
10610)
+++ trunk/property/inc/class.soproject.inc.php  2012-12-19 07:44:29 UTC (rev 
10611)
@@ -671,10 +671,14 @@
                                        $project['actual_cost']         = 0;
                                        $project['billable_hours']      = 0;
 
-                                       $sql_workder  = 'SELECT contract_sum, 
addition, calculation, budget, actual_cost,'
-                                       . ' billable_hours,closed'
+                                       $sql_workder  = 'SELECT combined_cost, 
actual_cost, billable_hours,closed'//, contract_sum, addition, calculation, 
budget'
                                        . " FROM fm_workorder {$this->join} 
fm_workorder_status ON fm_workorder.status  = fm_workorder_status.id"
                                        . " WHERE project_id = 
'{$project['project_id']}'";
+//_debug_array($sql_workder);
+                                       if ($start_date)
+                                       {
+                                               $sql_workder .= " AND 
fm_workorder.start_date >= $start_date AND fm_workorder.start_date <= $end_date 
";
+                                       }
 
                                        $this->db->query($sql_workder);
                                        while ($this->db->next_record())
@@ -685,6 +689,11 @@
                                                        $_sum = 0;
                                                        $closed = true;
                                                }
+                                               else
+                                               {
+                                                       $_sum = 
$this->db->f('combined_cost');
+                                               }
+/*     
                                                else 
if(abs($this->db->f('contract_sum')) > 0)
                                                {
                                                        $_sum = 
$this->db->f('contract_sum') * ( 1 + ((int)$this->db->f('addition')/100));
@@ -701,7 +710,7 @@
                                                {
                                                        $_sum = 0;
                                                }
-
+*/
                                                $_actual_cost = 
(int)$this->db->f('actual_cost');
 
                                                if($closed)

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2012-12-18 14:21:28 UTC (rev 
10610)
+++ trunk/property/inc/class.uiproject.inc.php  2012-12-19 07:44:29 UTC (rev 
10611)
@@ -374,7 +374,7 @@
                                                                                
'value' => lang('User'),
                                                                                
'type' => 'select',
                                                                                
'style' => 'filter',
-                                                                               
'values' => $values_combo_box[5],
+                                                                               
'values' => $values_combo_box[6],
                                                                                
'onchange'=> 'onChangeSelect("filter");',
                                                                                
'tab_index' => 7
                                                                        ),
@@ -2344,6 +2344,7 @@
 
                function view()
                {
+
                        if(!$this->acl_read)
                        {
                                $this->bocommon->no_access();




reply via email to

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