[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Fmsystem-commits] [16053] property: fix send order
From: |
sigurdne |
Subject: |
[Fmsystem-commits] [16053] property: fix send order |
Date: |
Wed, 7 Dec 2016 15:47:16 +0000 (UTC) |
Revision: 16053
http://svn.sv.gnu.org/viewvc/?view=rev&root=fmsystem&revision=16053
Author: sigurdne
Date: 2016-12-07 15:47:15 +0000 (Wed, 07 Dec 2016)
Log Message:
-----------
property: fix send order
Modified Paths:
--------------
trunk/property/inc/class.uitts.inc.php
Modified: trunk/property/inc/class.uitts.inc.php
===================================================================
--- trunk/property/inc/class.uitts.inc.php 2016-12-06 14:58:32 UTC (rev
16052)
+++ trunk/property/inc/class.uitts.inc.php 2016-12-07 15:47:15 UTC (rev
16053)
@@ -3374,6 +3374,7 @@
{
$show_cost = phpgw::get_var('show_cost',
'bool');
}
+ $historylog = CreateObject('property.historylog',
'tts');
$ticket = $this->bo->read_single($id);
$subject = lang('workorder') . ":
{$ticket['order_id']}";
@@ -3419,6 +3420,11 @@
$order_description = $ticket['order_descr'];
+ $contact_data =
$this->bocommon->initiate_ui_contact_lookup(array(
+ 'contact_id' => $ticket['contact_id'],
+ 'field' => 'contact',
+ 'type' => 'form'));
+
if (isset($contact_data['value_contact_name']) &&
$contact_data['value_contact_name'])
{
$contact_name =
$contact_data['value_contact_name'];
@@ -3613,7 +3619,9 @@
phpgwapi_cache::message_set(lang('missing
recipient for order %1', $ticket['order_id']),'error' );
return false;
}
+ $historylog = CreateObject('property.historylog',
'tts');
+ $id = $ticket['id'];
if (isset($ticket['file_attachments']) &&
is_array($ticket['file_attachments']))
{
$attachments =
CreateObject('property.bofiles')->get_attachments($ticket['file_attachments']);
@@ -3669,6 +3677,10 @@
$coordinator_email =
"{$coordinator_name}<{$GLOBALS['phpgw_info']['user']['preferences']['property']['email']}>";
$cc = '';
$bcc = $coordinator_email;
+ $contact_data =
$this->bocommon->initiate_ui_contact_lookup(array(
+ 'contact_id' => $ticket['contact_id'],
+ 'field' => 'contact',
+ 'type' => 'form'));
if (isset($contact_data['value_contact_email']) &&
$contact_data['value_contact_email'])
{
$cc = $contact_data['value_contact_email'];
@@ -3746,12 +3758,9 @@
try
{
$rcpt =
$GLOBALS['phpgw']->send->msg('email', $_to, $subject, stripslashes($body), '',
$cc, $bcc, $coordinator_email, $coordinator_name, 'html', '', $attachments,
true);
- if ($rcpt)
- {
-
phpgwapi_cache::message_set(lang('%1 is notified', $_address),'message' );
- $historylog->add('M', $id,
"{$_to}{$attachment_log}");
-
phpgwapi_cache::message_set(lang('Workorder is sent by email!'),'message' );
- }
+ 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' );
}
catch (Exception $exc)
{
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Fmsystem-commits] [16053] property: fix send order,
sigurdne <=