fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [15165] property: calculate accumulmate deviation per


From: sigurdne
Subject: [Fmsystem-commits] [15165] property: calculate accumulmate deviation percentage
Date: Sat, 14 May 2016 09:40:42 +0000 (UTC)

Revision: 15165
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=15165
Author:   sigurdne
Date:     2016-05-14 09:40:42 +0000 (Sat, 14 May 2016)
Log Message:
-----------
property: calculate accumulmate deviation percentage

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

Modified: trunk/property/inc/class.soworkorder.inc.php
===================================================================
--- trunk/property/inc/class.soworkorder.inc.php        2016-05-13 14:25:48 UTC 
(rev 15164)
+++ trunk/property/inc/class.soworkorder.inc.php        2016-05-14 09:40:42 UTC 
(rev 15165)
@@ -2426,19 +2426,23 @@
                                }
 
                                $entry['deviation_period'] = $deviation;
-                               $budget_acc +=$entry['budget'];
+                               
+                               $entry['active'] = 
isset($active_period[$entry['period']]) && $active_period[$entry['period']] ? 
$active_period[$entry['period']] : 0;
+                               if ($entry['active'] != 2)
+                               {
+                                       $budget_acc +=$entry['budget'];
+                               }
 
+                               $entry['budget_acc'] = $budget_acc;
                                $entry['deviation_acc'] = abs($deviation) > 0 ? 
$deviation_acc : 0;
 
-
                                $entry['deviation_percent_period'] = $deviation 
/ $entry['budget'] * 100;
                                $entry['deviation_percent_acc'] = 
$entry['deviation_acc'] / $budget_acc * 100;
 
                                $entry['closed'] = 
isset($closed_period[$entry['period']]) && $closed_period[$entry['period']];
-                               $entry['active'] = 
isset($active_period[$entry['period']]) && $active_period[$entry['period']] ? 
$active_period[$entry['period']] : 0;
                                $entry['fictive'] = 
isset($fictive_period[$entry['period']]) && $fictive_period[$entry['period']];
                        }
-
+//                     _debug_array($values);die();
                        phpgwapi_cache::system_set('property', 
"budget_order_{$order_id}", $values);
 
                        return $values;




reply via email to

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