fmsystem-commits
[Top][All Lists]
Advanced

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

[Fmsystem-commits] [16066] more on integration


From: sigurdne
Subject: [Fmsystem-commits] [16066] more on integration
Date: Fri, 9 Dec 2016 15:05:54 +0000 (UTC)

Revision: 16066
          http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16066
Author:   sigurdne
Date:     2016-12-09 15:05:53 +0000 (Fri, 09 Dec 2016)
Log Message:
-----------
more on integration

Modified Paths:
--------------
    trunk/property/inc/class.botts.inc.php
    trunk/property/inc/class.uilocation.inc.php
    trunk/property/inc/class.uitts.inc.php
    trunk/property/inc/class.uiwo_hour.inc.php
    trunk/property/setup/phpgw_en.lang
    trunk/property/setup/phpgw_no.lang

Modified: trunk/property/inc/class.botts.inc.php
===================================================================
--- trunk/property/inc/class.botts.inc.php      2016-12-09 12:37:29 UTC (rev 
16065)
+++ trunk/property/inc/class.botts.inc.php      2016-12-09 15:05:53 UTC (rev 
16066)
@@ -2001,6 +2001,39 @@
                        }
 
                        $supervisor_email = array();
+
+                       //Check if user is asked for approval
+                       if($need_approval && 
empty($supervisors[$this->account]))
+                       {
+                               $action_params = array(
+                                       'appname' => 'property',
+                                       'location' => $location,
+                                       'id'            => $location_item_id,
+                                       'responsible' => $this->account,
+                                       'responsible_type' => 'user',
+                                       'action' => 'approval',
+                                       'deadline' => '',
+                                       'created_by' => '',
+                                       'allrows' => false,
+                                       'closed' => false
+                               );
+                               $requests = 
CreateObject('property.sopending_action')->get_pending_action($action_params);
+                               if($requests)
+                               {
+                                       $supervisors[$this->account] = 
array('id' => $this->account, 'required' => true, 'default' => true);
+                               }
+                               else
+                               {
+                                       $action_params['closed'] = true;
+                                       $requests = 
CreateObject('property.sopending_action')->get_pending_action($action_params);
+                                       if($requests)
+                                       {
+                                               $supervisors[$this->account] = 
array('id' => $this->account, 'required' => false, 'default' => true);
+                                       }
+                               }
+                       }
+
+
                        if ($supervisors && $need_approval)
                        {
                                $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];

Modified: trunk/property/inc/class.uilocation.inc.php
===================================================================
--- trunk/property/inc/class.uilocation.inc.php 2016-12-09 12:37:29 UTC (rev 
16065)
+++ trunk/property/inc/class.uilocation.inc.php 2016-12-09 15:05:53 UTC (rev 
16066)
@@ -1663,6 +1663,11 @@
                        $location_code = phpgw::get_var('location_code');
 
                        $values = $this->bo->get_history($location_code);
+                       $dateformat = 
$GLOBALS['phpgw_info']['user']['preferences']['common']['dateformat'];
+                       foreach ($values as &$entry)
+                       {
+                               $entry['entry_date'] = 
$GLOBALS['phpgw']->common->show_date($entry['entry_date'],$dateformat);
+                       }
 
                        $result_data = array('results' => $values);
 

Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php      2016-12-09 12:37:29 UTC (rev 
16065)
+++ trunk/property/inc/class.uitts.inc.php      2016-12-09 15:05:53 UTC (rev 
16066)
@@ -3622,6 +3622,8 @@
                        $historylog = CreateObject('property.historylog', 
'tts');
 
                        $id = $ticket['id'];
+                       $order_id = $ticket['order_id'];
+
                        if (isset($ticket['file_attachments']) && 
is_array($ticket['file_attachments']))
                        {
                                $attachments = 
CreateObject('property.bofiles')->get_attachments($ticket['file_attachments']);
@@ -3712,7 +3714,7 @@
                                        $rcpt = 
$GLOBALS['phpgw']->send->msg('email', $_to, $subject, stripslashes($body), '', 
$cc, $bcc, $coordinator_email, $coordinator_name, 'html', '', $attachments, 
true);
                                        phpgwapi_cache::message_set(lang('%1 is 
notified', $_to),'message' );
                                        $historylog->add('M', $id, 
"{$_to}{$attachment_log}");
-                                       
phpgwapi_cache::message_set(lang('Workorder is sent by email!'),'message' );
+                                       
phpgwapi_cache::message_set(lang('Workorder %1 is sent by email to %2', 
$order_id, $_to),'message' );
                                }
                                catch (Exception $exc)
                                {

Modified: trunk/property/inc/class.uiwo_hour.inc.php
===================================================================
--- trunk/property/inc/class.uiwo_hour.inc.php  2016-12-09 12:37:29 UTC (rev 
16065)
+++ trunk/property/inc/class.uiwo_hour.inc.php  2016-12-09 15:05:53 UTC (rev 
16066)
@@ -1536,7 +1536,7 @@
                                        $_attachment_log = $attachment_log ? 
"::$attachment_log" : '';
                                        $historylog = 
CreateObject('property.historylog', 'workorder');
                                        $historylog->add('M', $workorder_id, 
"{$_to}{$_attachment_log}");
-                                       $receipt['message'][] = array('msg' => 
lang('Workorder is sent by email!'));
+                                       $receipt['message'][] = array('msg' => 
lang('Workorder %1 is sent by email!', $workorder_id));
                                        if ($attachment_log)
                                        {
                                                $receipt['message'][] = 
array('msg' => $attachment_log);
@@ -3344,7 +3344,7 @@
                function send_order( $workorder_id )
                {
                        $workorder = 
$this->boworkorder->read_single($workorder_id);
-                       $show_cost = true;
+                       $show_cost = false;
                        $email_receipt = true;
                        $pdfcode = $this->pdf_order($workorder_id, $show_cost);
                        $dir = 
"{$GLOBALS['phpgw_info']['server']['temp_dir']}/pdf_files";
@@ -3373,10 +3373,7 @@
 
                        $from_name = 
$GLOBALS['phpgw']->accounts->get($workorder['user_id'])->__toString();
                        $from_email = 
"{$from_name}<{$GLOBALS['phpgw']->preferences->data['property']['email']}>";
-                       if 
($GLOBALS['phpgw']->preferences->data['property']['order_email_rcpt'] == 1)
-                       {
-                               $bcc = $from_email;
-                       }
+                       $bcc = 
!empty($GLOBALS['phpgw']->preferences->data['property']['email']) ? $from_email 
: '';
 
                        $subject = lang('Workorder') . ": " . $workorder_id;
 
@@ -3409,6 +3406,8 @@
                        try
                        {
                                $GLOBALS['phpgw']->send->msg('email', $_to, 
$subject, $body, '', $cc, $bcc, $from_email, $from_name, 'html', '', 
$attachments, $email_receipt);
+                               phpgwapi_cache::message_set(lang('Workorder %1 
is sent by email to %2', $workorder_id, $_to),'message');
+                               phpgwapi_cache::message_set(lang('%1 is 
notified', $bcc),'message');
                        }
                        catch (Exception $e)
                        {

Modified: trunk/property/setup/phpgw_en.lang
===================================================================
--- trunk/property/setup/phpgw_en.lang  2016-12-09 12:37:29 UTC (rev 16065)
+++ trunk/property/setup/phpgw_en.lang  2016-12-09 15:05:53 UTC (rev 16066)
@@ -1640,7 +1640,7 @@
 Workorder end date     property        en      Workorder end date
 workorder entry date   property        en      Workorder entry date
 Workorder ID   property        en      Workorder ID
-Workorder is sent by email!    property        en      Workorder is sent by 
email!
+Workorder %1 is sent by email to %2    property        en      Workorder %1 is 
sent by email to %2
 Workorder start date   property        en      Workorder start date
 workorder status       property        en      Workorder status
 Workorder template     property        en      Workorder template

Modified: trunk/property/setup/phpgw_no.lang
===================================================================
--- trunk/property/setup/phpgw_no.lang  2016-12-09 12:37:29 UTC (rev 16065)
+++ trunk/property/setup/phpgw_no.lang  2016-12-09 15:05:53 UTC (rev 16066)
@@ -1977,7 +1977,7 @@
 workorder end date     property        no      Sluttdato
 workorder entry date   property        no      Registreringsdato
 workorder id   property        no      Bestilling
-workorder is sent by email!    property        no      Bestilling er sendt pr 
e-post!
+Workorder %1 is sent by email to %2    property        no      Bestilling %1 
er sendt pr e-post til %2
 workorders status      property        no      Status bestilling
 workorder start date   property        no      Start dato for bestilling
 workorder status       property        no      Status




reply via email to

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