Merge pull request #1112 from PaulPoulain/949-develop

949 Put the ref_client in the subject mail
This commit is contained in:
Laurent Destailleur
2013-07-19 06:59:49 -07:00
3 changed files with 27 additions and 5 deletions

View File

@@ -2263,7 +2263,14 @@ else
$formmail->withto=GETPOST("sendto")?GETPOST("sendto"):$liste;
$formmail->withtocc=$liste;
$formmail->withtoccc=(! empty($conf->global->MAIN_EMAIL_USECCC)?$conf->global->MAIN_EMAIL_USECCC:false);
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__');
if(empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendPropalRef','__PROPREF__(__REFCLIENT__)');
}
$formmail->withfile=2;
$formmail->withbody=1;
$formmail->withdeliveryreceipt=1;
@@ -2272,6 +2279,7 @@ else
// Tableau des substitutions
$formmail->substit['__PROPREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']='';
@@ -2299,8 +2307,6 @@ else
$formmail->param['models']='propal_send';
$formmail->param['id']=$object->id;
$formmail->param['returnurl']=$_SERVER["PHP_SELF"].'?id='.$object->id;
// Init list of files
if (GETPOST("mode")=='init')
{

View File

@@ -2566,7 +2566,14 @@ else
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
$formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__');
if(empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->trans('SendOrderRef','__ORDERREF__(__REFCLIENT__)');
}
$formmail->withfile=2;
$formmail->withbody=1;
$formmail->withdeliveryreceipt=1;
@@ -2574,6 +2581,7 @@ else
// Tableau des substitutions
$formmail->substit['__ORDERREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']='';

View File

@@ -3763,7 +3763,14 @@ else if ($id > 0 || ! empty($ref))
$formmail->withto=GETPOST('sendto')?GETPOST('sendto'):$liste;
$formmail->withtocc=$liste;
$formmail->withtoccc=$conf->global->MAIN_EMAIL_USECCC;
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__');
if(empty($object->ref_client))
{
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__');
}
else if(!empty($object->ref_client))
{
$formmail->withtopic=$langs->transnoentities($topicmail,'__FACREF__(__REFCLIENT__)');
}
$formmail->withfile=2;
$formmail->withbody=1;
$formmail->withdeliveryreceipt=1;
@@ -3771,6 +3778,7 @@ else if ($id > 0 || ! empty($ref))
// Tableau des substitutions
$formmail->substit['__FACREF__']=$object->ref;
$formmail->substit['__SIGNATURE__']=$user->signature;
$formmail->substit['__REFCLIENT__']=$object->ref_client;
$formmail->substit['__PERSONALIZED__']='';
$formmail->substit['__CONTACTCIVNAME__']='';