fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [10978] property: condition survey / request


From: Sigurd Nes
Subject: [Fmsystem-commits] [10978] property: condition survey / request
Date: Tue, 12 Mar 2013 08:36:34 +0000

Revision: 10978
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=10978
Author:   sigurdne
Date:     2013-03-12 08:36:31 +0000 (Tue, 12 Mar 2013)
Log Message:
-----------
property: condition survey / request

Modified Paths:
--------------
    trunk/property/inc/class.socondition_survey.inc.php
    trunk/property/inc/class.uiproject.inc.php
    trunk/property/templates/base/css/base.css

Modified: trunk/property/inc/class.socondition_survey.inc.php
===================================================================
--- trunk/property/inc/class.socondition_survey.inc.php 2013-03-11 14:53:01 UTC 
(rev 10977)
+++ trunk/property/inc/class.socondition_survey.inc.php 2013-03-12 08:36:31 UTC 
(rev 10978)
@@ -459,8 +459,10 @@
                        $table = 'fm_request';
 
                        $condition_survey_id            = (int)$id;
-                       $sql = "SELECT category as cat_id, 
left(building_part,1) as building_part_, sum(fm_request_planning.amount) as 
amount , EXTRACT(YEAR from to_timestamp(fm_request_planning.date) ) as year"
-                       ." FROM {$table} {$this->_join} fm_request_planning ON 
fm_request_planning.request_id = {$table}.id"
+                       $sql = "SELECT category as cat_id, 
left(building_part,1) as building_part_,"
+                       . " sum(amount_investment) as investment 
,sum(amount_operation) as operation,"
+                       . " recommended_year as year"
+                       ." FROM {$table}"
                        ." WHERE condition_survey_id={$condition_survey_id}"
                        ." GROUP BY building_part_ ,category, year ORDER BY 
building_part_";
 
@@ -469,11 +471,13 @@
                        $values = array();
                        while ($this->_db->next_record())
                        {
+                               $amount = $this->_db->f('investment') + 
$this->_db->f('operation');
+                               
                                $values[] = array
                                (
                                        'building_part'         => 
$this->_db->f('building_part_'),
-                                       'amount'                        => 
$this->_db->f('amount'),
-                                       'year'                          => 
$this->_db->f('year'),//date('Y', $this->_db->f('date')),
+                                       'amount'                        => 
$amount,
+                                       'year'                          => 
$this->_db->f('year'),
                                        'cat_id'                        => 
$this->_db->f('cat_id'),
                                );
                        }

Modified: trunk/property/inc/class.uiproject.inc.php
===================================================================
--- trunk/property/inc/class.uiproject.inc.php  2013-03-11 14:53:01 UTC (rev 
10977)
+++ trunk/property/inc/class.uiproject.inc.php  2013-03-12 08:36:31 UTC (rev 
10978)
@@ -1050,8 +1050,8 @@
                                }
 
                                $bypass = phpgw::get_var('bypass', 'bool');
-
-                               if ( phpgw::get_var('origin') == 
'.project.request' &&  phpgw::get_var('origin_id', 'int') )
+//_debug_array($_REQUEST);
+                               if ( phpgw::get_var('origin') == 
'.project.request' &&  phpgw::get_var('origin_id', 'int') && !$bypass)
                                {
                                        $id = phpgw::get_var('project_id', 
'int');
                                        $add_request = array('request_id'=> 
array(phpgw::get_var('origin_id', 'int')));

Modified: trunk/property/templates/base/css/base.css
===================================================================
--- trunk/property/templates/base/css/base.css  2013-03-11 14:53:01 UTC (rev 
10977)
+++ trunk/property/templates/base/css/base.css  2013-03-12 08:36:31 UTC (rev 
10978)
@@ -134,12 +134,12 @@
 }
 fieldset {
   margin-top: 0.5em;
-  border:1px solid #cccccc;
+  border:1px solid #1E90FF;
 }
 
 legend {
   padding: 0.2em 0.5em;
-  border:1px solid #cccccc;
+  border:1px solid #1E90FF;
 /*  color:#cccccc;*/
   font-size:90%;
   text-align:right;




reply via email to

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