forked from Wavyzz/dolibarr
Fix: Select of recipient on email form
This commit is contained in:
@@ -27,7 +27,7 @@
|
|||||||
* \file htdocs/comm/propal.php
|
* \file htdocs/comm/propal.php
|
||||||
* \ingroup propale
|
* \ingroup propale
|
||||||
* \brief Page of commercial proposals card and list
|
* \brief Page of commercial proposals card and list
|
||||||
* \version $Id: propal.php,v 1.608 2011/07/04 10:30:02 eldy Exp $
|
* \version $Id: propal.php,v 1.609 2011/07/07 21:32:22 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -475,10 +475,10 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile']
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -1975,6 +1975,6 @@ else
|
|||||||
}
|
}
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/04 10:30:02 $ - $Revision: 1.608 $');
|
llxFooter('$Date: 2011/07/07 21:32:22 $ - $Revision: 1.609 $');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
* \file htdocs/commande/fiche.php
|
* \file htdocs/commande/fiche.php
|
||||||
* \ingroup commande
|
* \ingroup commande
|
||||||
* \brief Page to show customer order
|
* \brief Page to show customer order
|
||||||
* \version $Id: fiche.php,v 1.523 2011/07/02 16:48:32 eldy Exp $
|
* \version $Id: fiche.php,v 1.524 2011/07/07 21:32:21 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -993,10 +993,10 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -2134,5 +2134,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.523 $');
|
llxFooter('$Date: 2011/07/07 21:32:21 $ - $Revision: 1.524 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
* \file htdocs/compta/facture.php
|
* \file htdocs/compta/facture.php
|
||||||
* \ingroup facture
|
* \ingroup facture
|
||||||
* \brief Page to create/see an invoice
|
* \brief Page to create/see an invoice
|
||||||
* \version $Id: facture.php,v 1.845 2011/07/02 17:02:00 eldy Exp $
|
* \version $Id: facture.php,v 1.846 2011/07/07 21:32:20 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require('../main.inc.php');
|
require('../main.inc.php');
|
||||||
@@ -1234,10 +1234,10 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -3236,5 +3236,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/02 17:02:00 $ - $Revision: 1.845 $');
|
llxFooter('$Date: 2011/07/07 21:32:20 $ - $Revision: 1.846 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/expedition/fiche.php
|
* \file htdocs/expedition/fiche.php
|
||||||
* \ingroup expedition
|
* \ingroup expedition
|
||||||
* \brief Fiche descriptive d'une expedition
|
* \brief Fiche descriptive d'une expedition
|
||||||
* \version $Id: fiche.php,v 1.208 2011/07/02 16:48:32 eldy Exp $
|
* \version $Id: fiche.php,v 1.209 2011/07/07 21:32:19 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -337,10 +337,10 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -1381,5 +1381,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.208 $');
|
llxFooter('$Date: 2011/07/07 21:32:19 $ - $Revision: 1.209 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -23,7 +23,7 @@
|
|||||||
* \file htdocs/fichinter/fiche.php
|
* \file htdocs/fichinter/fiche.php
|
||||||
* \brief Fichier fiche intervention
|
* \brief Fichier fiche intervention
|
||||||
* \ingroup ficheinter
|
* \ingroup ficheinter
|
||||||
* \version $Id: fiche.php,v 1.168 2011/07/07 15:54:02 simnandez Exp $
|
* \version $Id: fiche.php,v 1.169 2011/07/07 21:32:20 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../main.inc.php");
|
require("../main.inc.php");
|
||||||
@@ -467,10 +467,10 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -482,7 +482,7 @@ if ($action == 'send' && ! $_POST['cancel'] && (empty($conf->global->MAIN_USE_AD
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strlen($sendto))
|
if (dol_strlen($sendto))
|
||||||
{
|
{
|
||||||
$langs->load("commercial");
|
$langs->load("commercial");
|
||||||
|
|
||||||
@@ -1184,5 +1184,5 @@ elseif ($fichinterid)
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/07 15:54:02 $ - $Revision: 1.168 $');
|
llxFooter('$Date: 2011/07/07 21:32:20 $ - $Revision: 1.169 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/fourn/commande/fiche.php
|
* \file htdocs/fourn/commande/fiche.php
|
||||||
* \ingroup supplier, order
|
* \ingroup supplier, order
|
||||||
* \brief Card supplier order
|
* \brief Card supplier order
|
||||||
* \version $Id: fiche.php,v 1.230 2011/07/02 16:48:32 eldy Exp $
|
* \version $Id: fiche.php,v 1.231 2011/07/07 21:32:21 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@@ -624,10 +624,10 @@ if ($action == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile'] && ! $_P
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $object->client->email;
|
$sendto = $object->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -1545,5 +1545,5 @@ if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.230 $');
|
llxFooter('$Date: 2011/07/07 21:32:21 $ - $Revision: 1.231 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
* \file htdocs/fourn/facture/fiche.php
|
* \file htdocs/fourn/facture/fiche.php
|
||||||
* \ingroup facture, fournisseur
|
* \ingroup facture, fournisseur
|
||||||
* \brief Page for supplier invoice card (view, edit, validate)
|
* \brief Page for supplier invoice card (view, edit, validate)
|
||||||
* \version $Id: fiche.php,v 1.259 2011/07/02 16:48:32 eldy Exp $
|
* \version $Id: fiche.php,v 1.260 2011/07/07 21:32:19 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require("../../main.inc.php");
|
require("../../main.inc.php");
|
||||||
@@ -677,10 +677,10 @@ if ($_POST['action'] == 'send' && ! $_POST['addfile'] && ! $_POST['removedfile']
|
|||||||
$sendto = $_POST['sendto'];
|
$sendto = $_POST['sendto'];
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
}
|
}
|
||||||
elseif ($_POST['receiver'])
|
elseif ($_POST['receiver'] != '-1')
|
||||||
{
|
{
|
||||||
// Le destinataire a ete fourni via la liste deroulante
|
// Recipient was provided from combo list
|
||||||
if ($_POST['receiver'] < 0) // Id du tiers
|
if ($_POST['receiver'] == 'thirdparty') // Id of third party
|
||||||
{
|
{
|
||||||
$sendto = $facturefourn->client->email;
|
$sendto = $facturefourn->client->email;
|
||||||
$sendtoid = 0;
|
$sendtoid = 0;
|
||||||
@@ -1916,5 +1916,5 @@ else
|
|||||||
|
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|
||||||
llxFooter('$Date: 2011/07/02 16:48:32 $ - $Revision: 1.259 $');
|
llxFooter('$Date: 2011/07/07 21:32:19 $ - $Revision: 1.260 $');
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -29,7 +29,7 @@
|
|||||||
* \file htdocs/lib/functions.lib.php
|
* \file htdocs/lib/functions.lib.php
|
||||||
* \brief A set of functions for Dolibarr
|
* \brief A set of functions for Dolibarr
|
||||||
* This file contains all frequently used functions.
|
* This file contains all frequently used functions.
|
||||||
* \version $Id: functions.lib.php,v 1.542 2011/07/06 22:42:34 eldy Exp $
|
* \version $Id: functions.lib.php,v 1.543 2011/07/07 21:32:18 eldy Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// For compatibility during upgrade
|
// For compatibility during upgrade
|
||||||
@@ -3893,6 +3893,8 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
|
|||||||
$mesgstring=preg_replace('/<div class="error">/','',$mesgstring);
|
$mesgstring=preg_replace('/<div class="error">/','',$mesgstring);
|
||||||
$mesgstring=preg_replace('/<\/div>/','',$mesgstring);
|
$mesgstring=preg_replace('/<\/div>/','',$mesgstring);
|
||||||
// Remove div from texts array
|
// Remove div from texts array
|
||||||
|
if (is_array($mesgarray))
|
||||||
|
{
|
||||||
$newmesgarray=array();
|
$newmesgarray=array();
|
||||||
foreach($mesgarray as $val)
|
foreach($mesgarray as $val)
|
||||||
{
|
{
|
||||||
@@ -3902,6 +3904,7 @@ function dol_htmloutput_mesg($mesgstring='',$mesgarray='', $style='ok', $keepemb
|
|||||||
$newmesgarray[]=$tmpmesgstring;
|
$newmesgarray[]=$tmpmesgstring;
|
||||||
}
|
}
|
||||||
$mesgarray=$newmesgarray;
|
$mesgarray=$newmesgarray;
|
||||||
|
}
|
||||||
print get_htmloutput_mesg($mesgstring,$mesgarray,'error',$keepembedded);
|
print get_htmloutput_mesg($mesgstring,$mesgarray,'error',$keepembedded);
|
||||||
}
|
}
|
||||||
else print get_htmloutput_mesg($mesgstring,$mesgarray,'ok',$keepembedded);
|
else print get_htmloutput_mesg($mesgstring,$mesgarray,'ok',$keepembedded);
|
||||||
|
|||||||
@@ -27,7 +27,7 @@
|
|||||||
* \file htdocs/societe/class/societe.class.php
|
* \file htdocs/societe/class/societe.class.php
|
||||||
* \ingroup societe
|
* \ingroup societe
|
||||||
* \brief File for third party class
|
* \brief File for third party class
|
||||||
* \version $Id: societe.class.php,v 1.90 2011/07/06 05:08:52 hregis Exp $
|
* \version $Id: societe.class.php,v 1.91 2011/07/07 21:32:21 eldy Exp $
|
||||||
*/
|
*/
|
||||||
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/core/class/commonobject.class.php");
|
||||||
|
|
||||||
@@ -1534,14 +1534,14 @@ class Societe extends CommonObject
|
|||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$contact_email = $this->contact_property_array('email');
|
$contact_emails = $this->contact_property_array('email');
|
||||||
if ($this->email)
|
if ($this->email)
|
||||||
{
|
{
|
||||||
if (empty($this->name)) $this->name=$this->nom;
|
if (empty($this->name)) $this->name=$this->nom;
|
||||||
// TODO: Tester si email non deja present dans tableau contact
|
// TODO: Tester si email non deja present dans tableau contact
|
||||||
$contact_email[-1]=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">";
|
$contact_emails['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->email.">";
|
||||||
}
|
}
|
||||||
return $contact_email;
|
return $contact_emails;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1557,7 +1557,7 @@ class Societe extends CommonObject
|
|||||||
{
|
{
|
||||||
if (empty($this->name)) $this->name=$this->nom;
|
if (empty($this->name)) $this->name=$this->nom;
|
||||||
// TODO: Tester si tel non deja present dans tableau contact
|
// TODO: Tester si tel non deja present dans tableau contact
|
||||||
$contact_phone[-1]=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->tel.">";
|
$contact_phone['thirdparty']=$langs->trans("ThirdParty").': '.dol_trunc($this->name,16)." <".$this->tel.">";
|
||||||
}
|
}
|
||||||
return $contact_phone;
|
return $contact_phone;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user