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

@@ -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__']='';