fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [11756] property: update project budget based on orde


From: Sigurd Nes
Subject: [Fmsystem-commits] [11756] property: update project budget based on orders
Date: Wed, 26 Feb 2014 13:36:54 +0000

Revision: 11756
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=11756
Author:   sigurdne
Date:     2014-02-26 13:36:53 +0000 (Wed, 26 Feb 2014)
Log Message:
-----------
property: update project budget based on orders

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

Modified: trunk/property/inc/class.boworkorder.inc.php
===================================================================
--- trunk/property/inc/class.boworkorder.inc.php        2014-02-26 10:18:42 UTC 
(rev 11755)
+++ trunk/property/inc/class.boworkorder.inc.php        2014-02-26 13:36:53 UTC 
(rev 11756)
@@ -874,13 +874,18 @@
                        }
                        $toarray = array();
                        $workorder      = $this->so->read_single($order_id);
+
+                       if(!$workorder['continuous'])
+                       {
+                               return false;
+                       }
+
                        $project        = 
ExecMethod('property.boproject.read_single_mini',$workorder['project_id']);
                        $coordinator = $project['coordinator'];
                        $prefs_coordinator = 
$this->bocommon->create_preferences('property',$coordinator);
                        if(isset($prefs_coordinator['email']) && 
$prefs_coordinator['email'])
                        {
-//                             $toarray[] = $prefs_coordinator['email'];
-                               $toarray[] = 'address@hidden';
+                               $toarray[] = $prefs_coordinator['email'];
                        }
 
                        if ($toarray)
@@ -916,7 +921,8 @@
                                $_obligation = 
number_format($budget_info['obligation'], 0, ',', ' ');
 
                                $to = implode(';',$toarray);
-                               $cc = 'address@hidden';
+                               $cc = false;
+                               $bcc = 'address@hidden';//test phase
                                $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";
                                $body .= <<<HTML
                                </br>
@@ -966,7 +972,7 @@
 
                                try
                                {
-                                       $ok = 
$GLOBALS['phpgw']->send->msg('email',$to,$subject,$body, false,$cc,false, 
$from_email, $from_name, 'html');
+                                       $ok = 
$GLOBALS['phpgw']->send->msg('email',$to,$subject,$body, false,$cc,$bcc, 
$from_email, $from_name, 'html');
                                }
                                catch (phpmailerException $e)
                                {
@@ -977,6 +983,7 @@
                                {
                                        $historylog     = 
CreateObject('property.historylog','workorder');
                                        $historylog->add('ON', $order_id, 
lang('%1 is notified',$to));
+                                       $historylog->add('RM', $order_id, 
$subject);
                                        return true;
                                }
                        }




reply via email to

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