fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11558] property: remove debug


From: Sigurd Nes
Subject: [Fmsystem-commits] [11558] property: remove debug
Date: Sat, 21 Dec 2013 21:01:30 +0000

Revision: 11558
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11558
Author:   sigurdne
Date:     2013-12-21 21:01:26 +0000 (Sat, 21 Dec 2013)
Log Message:
-----------
property: remove debug

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

Modified: trunk/property/inc/class.soproject.inc.php
===================================================================
--- trunk/property/inc/class.soproject.inc.php  2013-12-20 23:25:20 UTC (rev 
11557)
+++ trunk/property/inc/class.soproject.inc.php  2013-12-21 21:01:26 UTC (rev 
11558)
@@ -2054,7 +2054,6 @@
 
                }
 
-
                function get_budget($project_id)
                {
                        $project_id = (int) $project_id;
@@ -2068,7 +2067,7 @@
                        . " GROUP BY fm_project_budget.year, 
fm_project_budget.month, fm_project_budget.budget, fm_project_budget.closed, 
fm_project_budget.active"
                        . " ORDER BY fm_project_budget.year, 
fm_project_budget.month";
                        $this->db->query($sql,__LINE__,__FILE__);
-//     _debug_array($sql);
+
                        while ($this->db->next_record())
                        {
                                $period = $this->db->f('year') . 
sprintf("%02s", $this->db->f('month'));
@@ -2084,7 +2083,6 @@
                                . " FROM fm_workorder"
                                . " WHERE project_id = {$project_id}";
 
-//     _debug_array($sql);die();
                        $this->db->query($sql,__LINE__,__FILE__);
                        $_order_list = array();
                        while ($this->db->next_record())
@@ -2103,13 +2101,6 @@
                        foreach ($order_budgets  as $_order_id => $order_budget 
)
                        {
 
-/*
-if(!$order_budget[0]['closed_order'])
-{
-//     _debug_array($order_budget);
-}
-*/
-
                                foreach ($order_budget as $budget_entry)
                                {
                                        $period = $budget_entry['period'];
@@ -2125,8 +2116,6 @@
                                        $_found = false;
                                        if(isset($project_budget[$period]) && 
!$budget_entry['closed_order'])
                                        {
-//_debug_array($_order_id);
-//_debug_array($budget_entry);
                                                
$_orders[$period]['sum_oblications'] += $budget_entry['sum_oblications'];
                                                $_orders[$period]['sum_orders'] 
+= $budget_entry['sum_orders'];
                                                $_found = true;
@@ -2164,8 +2153,6 @@
                                }
                        }
                        $sort_period = array();
-//_debug_array($_orders);
-//die();
 
                        $_values = array();
                        foreach ($project_budget as $period => $_budget)
@@ -2205,10 +2192,9 @@
                        }
 
                        ksort($_values);
-//_debug_array($_values);die();
 
                        $values = array();
-//_debug_array($active_period);die();
+
                        $total_sum = 0;
                        foreach ($_values as $period => $_budget)
                        {
@@ -2219,8 +2205,6 @@
                                }
                        }
 
-//_debug_array($values);die();
-//_debug_array($total_sum);
                        $corretion = $total_sum >= 0 ? 1 : -1; 
                        $deviation_acc = 0;
                        $budget_acc = 0;
@@ -2230,14 +2214,12 @@
                                $month = substr( $entry['period'], 4, 2 );
                                $entry['month'] = $month == '00' ? '' : $month;
 
-       //                      if($active_period[$entry['period']])
                                if($closed_period[$entry['period']])
                                {
                                        $_diff_start = abs($entry['budget']) > 
0 ? $entry['budget'] : $entry['sum_orders'];
                                        $entry['diff'] = $_diff_start - 
$entry['sum_oblications'] - $entry['actual_cost'];
 
                                        $_deviation = $entry['budget'] - 
$entry['actual_cost'];
-       //                              $deviation = abs($entry['actual_cost']) 
> 0 ? $_deviation : 0;
                                        $deviation = $_deviation;
                                }
                                else
@@ -2262,8 +2244,6 @@
                                $entry['active'] = 
$active_period[$entry['period']];
                        }
 
-//_debug_array($values);die();
-
                        return $values;
                }
 

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2013-12-20 23:25:20 UTC 
(rev 11557)
+++ trunk/property/inc/class.soworkorder.inc.php        2013-12-21 21:01:26 UTC 
(rev 11558)
@@ -1826,7 +1826,6 @@
                                                
if(isset($order_budget[$_period]))
                                                {
                                                        
$order_budget[$_period]['actual_cost'] += $this->db->f('actual_cost');
-//_debug_array($test+=$this->db->f('actual_cost'));
                                                        $_found = true;
                                                        break;
                                                }
@@ -1844,8 +1843,6 @@
 
                        $sort_period = array();
                        $values = array();
-//_debug_array($order_budget);die();
-//$test = 0;
                        $_current_period = date('Ym');
                        $_delay_period_sum = 0;
                        $_delay_period = false;
@@ -1857,42 +1854,32 @@
                                $_actual_cost = 0;
 
                                $_actual_cost += $_budget['actual_cost'];
-//_debug_array( $test+= $_budget['actual_cost']);
                                $_sum_orders += $_budget['combined_cost'];
 
-                               if(!$_budget['closed_order'])// && 
$active_period[$period])
+                               if(!$_budget['closed_order'])
                                {
                                        if($active_period[$period])
                                        {
-                                       $_sum_oblications += 
$_budget['combined_cost'];
-                                       $_sum_oblications -= 
$_budget['actual_cost'];
+                                               $_sum_oblications += 
$_budget['combined_cost'];
+                                               $_sum_oblications -= 
$_budget['actual_cost'];
 
-                       //              if($project_total_budget >= 0)
-                                       if($_budget['budget'] >= 0)
-                                       {
-                                               if($_sum_oblications < 0)
+                                               if($_budget['budget'] >= 0)
                                                {
-                                                       $_sum_oblications = 0;
+                                                       if($_sum_oblications < 
0)
+                                                       {
+                                                               
$_sum_oblications = 0;
+                                                       }
                                                }
-                                       }
-                                       else // income
-                                       {
-                                               if($_sum_oblications > 0)
+                                               else // income
                                                {
-                                                       $_sum_oblications = 0;
+                                                       if($_sum_oblications > 
0)
+                                                       {
+                                                               
$_sum_oblications = 0;
+                                                       }
                                                }
                                        }
-                                       }
                                }
 
-/*
-                               if(($period < $_current_period) && 
$active_period[$period] && !$closed_period[$period])
-                               {
-                                       $_delay_period = true;
-                                       $_delay_period_sum += $_sum_oblications;
-                                       $_sum_oblications = 0;
-                               }
-*/
                                //override if periode is closed
                                if(!isset($active_period[$period]) || 
!$active_period[$period])
                                {
@@ -1911,7 +1898,7 @@
                                        $_delay_period_sum =0;
                                }
                                $_delay_period = false;
-//die();
+
                                $values[] = array
                                (
                                        'year'                                  
=> $_budget['year'],
@@ -1938,16 +1925,13 @@
                        $budget_acc = 0;
                        foreach ($values as &$entry)
                        {
-                       //      if($active_period[$entry['period']])
                                if($closed_period[$entry['period']])
                                {
                                        $_diff_start = abs($entry['budget']) > 
0 ? $entry['budget'] : $entry['sum_orders'];
                                        $entry['diff'] = $_diff_start - 
$entry['sum_oblications'] - $entry['actual_cost'];
 
                                        $_deviation = $entry['budget'] - 
$entry['actual_cost'];
-       //                              $deviation = abs($entry['actual_cost']) 
> 0 ? $_deviation : 0;
                                        $deviation = $_deviation;
-
                                }
                                else
                                {
@@ -1958,7 +1942,6 @@
                                $entry['deviation_period'] = $deviation;
                                $budget_acc +=$entry['budget'];
 
-       //                      if($active_period[$entry['period']])
                                if($closed_period[$entry['period']])
                                {
                                        $deviation_acc += $deviation;




reply via email to

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