fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11755] property: percent alert


From: Sigurd Nes
Subject: [Fmsystem-commits] [11755] property: percent alert
Date: Wed, 26 Feb 2014 10:18:43 +0000

Revision: 11755
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11755
Author:   sigurdne
Date:     2014-02-26 10:18:42 +0000 (Wed, 26 Feb 2014)
Log Message:
-----------
property: percent alert

Modified Paths:
--------------
    trunk/property/inc/class.boworkorder.inc.php
    trunk/property/inc/class.soXport.inc.php

Modified: trunk/property/inc/class.boworkorder.inc.php
===================================================================
--- trunk/property/inc/class.boworkorder.inc.php        2014-02-26 09:51:04 UTC 
(rev 11754)
+++ trunk/property/inc/class.boworkorder.inc.php        2014-02-26 10:18:42 UTC 
(rev 11755)
@@ -909,6 +909,12 @@
                                $lang_actual_cost = lang('actual cost');
                                $lang_percent = lang('percent');
                                $lang_obligation = lang('obligation');
+
+                               $_budget = 
number_format($budget_info['budget'], 0, ',', ' ');
+                               $_actual_cost = 
number_format($budget_info['actual_cost'], 0, ',', ' ');
+                               $_budget = 
number_format($budget_info['budget'], 0, ',', ' ');
+                               $_obligation = 
number_format($budget_info['obligation'], 0, ',', ' ');
+
                                $to = implode(';',$toarray);
                                $cc = 'address@hidden';
                                $body = '<a href ="' . 
$GLOBALS['phpgw']->link('/index.php',array('menuaction'=> 
'property.uiworkorder.edit','id'=> $order_id),false,true).'">' . 
lang('workorder %1 has been edited',$order_id) .'</a>' . "\n";
@@ -923,7 +929,7 @@
                                                        {$lang_budget}
                                                </td>
                                                <td align = 'right'>
-                                                       {$budget_info['budget']}
+                                                       {$_budget}
                                                </td>
                                        </tr>
                                        <tr>
@@ -931,7 +937,7 @@
                                                        {$lang_actual_cost}
                                                </td>
                                                <td align = 'right'>
-                                                       
{$budget_info['actual_cost']}
+                                                       {$_actual_cost}
                                                </td>
                                        </tr>
                                        <tr>
@@ -947,7 +953,7 @@
                                                        {$lang_obligation}
                                                </td>
                                                <td align = 'right'>
-                                                       
{$budget_info['obligation']}
+                                                       {$_obligation}
                                                </td>
                                        </tr>
                                </table>

Modified: trunk/property/inc/class.soXport.inc.php
===================================================================
--- trunk/property/inc/class.soXport.inc.php    2014-02-26 09:51:04 UTC (rev 
11754)
+++ trunk/property/inc/class.soXport.inc.php    2014-02-26 10:18:42 UTC (rev 
11755)
@@ -724,16 +724,7 @@
                {
                        $orders_affected = array();
                        $_dateformat = $this->db->date_format();
-/*
-                       if ( $this->db->get_transaction() )
-                       {
-                               $this->global_lock = true;
-                       }
-                       else
-                       {
-                               $this->db->transaction_begin();
-                       }
-*/
+
                        $this->db->transaction_begin();
 
                        $this->add($values, $skip_update_voucher_id);
@@ -753,12 +744,16 @@
                                $line['manual_record']                  = 1;
 
                                $this->add_OverfBilag($line);
+                       }
+                       
$this->delete_voucher_from_fm_ecobilag($values[0]['bilagsnr']);
 
-                               $amount =  $line['godkjentbelop'] * 100; 
+                       reset($voucher);
 
+                       foreach ($voucher as &$line)
+                       {
                                if($line['order_id'])
                                {
-                                       $orders_affected[$line['order_id']] = 
true;
+                                       $amount =  $line['godkjentbelop'] * 
100; 
                                        //Oppdater beløp på bestilling
                                        if ($line['dimd'] % 2 == 0)
                                        {
@@ -776,14 +771,12 @@
                                }
                        }
 
-                       
$this->delete_voucher_from_fm_ecobilag($values[0]['bilagsnr']);
+
                        
$this->update_actual_cost_from_archive($orders_affected);
 
-//                     if ( !$this->global_lock )
-//                     {
-//                             $this->db->transaction_commit();
-//                     }
                        return $this->db->transaction_commit();
+
+
                }
 
 




reply via email to

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