From 80dd25401f9247af332ccd5a24762f74ae20e667 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 13 Dec 2010 18:52:19 +0000 Subject: [PATCH] Fix: Maxi debug of emailing feature --- .../mailings/dolibarr_services_expired.modules.php | 6 +++++- htdocs/includes/modules/mailings/fraise.modules.php | 9 +++++---- htdocs/includes/modules/mailings/poire.modules.php | 7 +++---- htdocs/includes/modules/mailings/pomme.modules.php | 5 ++++- 4 files changed, 17 insertions(+), 10 deletions(-) diff --git a/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php b/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php index bb1b6d5b802..c7816336412 100644 --- a/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php +++ b/htdocs/includes/modules/mailings/dolibarr_services_expired.modules.php @@ -123,7 +123,11 @@ class mailing_dolibarr_services_expired extends MailingTargets $cibles[$j] = array( 'email' => $obj->email, 'name' => $obj->name, - 'other' => dol_print_date($this->db->jdate($obj->date_ouverture),'day').';'.dol_print_date($this->db->jdate($obj->date_fin_validite),'day').';'.$obj->fk_contrat.';'.$obj->cdid, + 'other' => + ('StartDate='.dol_print_date($this->db->jdate($obj->date_ouverture),'day')).';'. + ('EndDate='.dol_print_date($this->db->jdate($obj->date_fin_validite),'day')).';'. + ('Contract='.$obj->fk_contrat).';'. + ('ContactLine='.$obj->cdid), 'source_url' => $this->url($obj->rowid), 'source_id' => $obj->cdid, 'source_type' => 'contract_line' diff --git a/htdocs/includes/modules/mailings/fraise.modules.php b/htdocs/includes/modules/mailings/fraise.modules.php index 1e030a78072..32d69912b4b 100644 --- a/htdocs/includes/modules/mailings/fraise.modules.php +++ b/htdocs/includes/modules/mailings/fraise.modules.php @@ -184,10 +184,11 @@ class mailing_fraise extends MailingTargets 'fk_contact' => $obj->fk_contact, 'name' => $obj->name, 'firstname' => $obj->firstname, - 'other' => ($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')).';'. - ($langs->transnoentities("Civility").'='.$obj->civilite).';'. - ($langs->transnoentities("Login").'='.$obj->login).';'. - ($langs->transnoentities("Company").'='.$obj->societe), + 'other' => + ($langs->transnoentities("Login").'='.$obj->login).';'. + ($langs->transnoentities("Civility").'='.$langs->transnoentities("Civility".$obj->civilite)).';'. + ($langs->transnoentities("DateEnd").'='.dol_print_date($this->db->jdate($obj->datefin),'day')).';'. + ($langs->transnoentities("Company").'='.$obj->societe), 'source_url' => $this->url($obj->id), 'source_id' => $obj->id, 'source_type' => 'member' diff --git a/htdocs/includes/modules/mailings/poire.modules.php b/htdocs/includes/modules/mailings/poire.modules.php index 3952938487d..6b65e79fdb4 100644 --- a/htdocs/includes/modules/mailings/poire.modules.php +++ b/htdocs/includes/modules/mailings/poire.modules.php @@ -219,15 +219,14 @@ class mailing_poire extends MailingTargets $obj = $this->db->fetch_object($result); if ($old <> $obj->email) { - $other=''; - if ($obj->companyname) { if ($other) $other.=';'; $other.=$langs->transnoentities("ThirdParty").'='.$obj->companyname; } - if ($obj->civilite) { if ($other) $other.=';'; $other.=$langs->transnoentities("Civility".$obj->civilite); } $cibles[$j] = array( 'email' => $obj->email, 'fk_contact' => $obj->fk_contact, 'name' => $obj->name, 'firstname' => $obj->firstname, - 'other' => $other, + 'other' => + ($langs->transnoentities("ThirdParty").'='.$obj->companyname).';'. + ($langs->transnoentities("Civility").'='.$langs->transnoentities("Civility".$obj->civilite)), 'source_url' => $this->url($obj->id), 'source_id' => $obj->id, 'source_type' => 'contact' diff --git a/htdocs/includes/modules/mailings/pomme.modules.php b/htdocs/includes/modules/mailings/pomme.modules.php index 603a5386b09..aa400d5972c 100644 --- a/htdocs/includes/modules/mailings/pomme.modules.php +++ b/htdocs/includes/modules/mailings/pomme.modules.php @@ -163,7 +163,10 @@ class mailing_pomme extends MailingTargets 'fk_contact' => $obj->fk_contact, 'name' => $obj->name, 'firstname' => $obj->firstname, - 'other' => $langs->transnoentities("Login").'='.$obj->login.';'.$langs->transnoentities("PhonePro").'='.$obj->office_phone, + 'other' => + ($langs->transnoentities("Login").'='.$obj->login).';'. +// ($langs->transnoentities("Civility").'='.$obj->civilite).';'. + ($langs->transnoentities("PhonePro").'='.$obj->office_phone), 'source_url' => $this->url($obj->id), 'source_id' => $obj->id, 'source_type' => 'user'