fix: [AdvTargetEmailling] bad table from select and use of dict for prospect status
This commit is contained in:
parent
2e8734a950
commit
3777b7dffe
@ -111,6 +111,8 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
global $langs;
|
global $langs;
|
||||||
$langs->load('customers');
|
$langs->load('customers');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
||||||
$this->select_target_type = array(
|
$this->select_target_type = array(
|
||||||
@ -119,13 +121,15 @@ class AdvanceTargetingMailing extends CommonObject
|
|||||||
'3' => $langs->trans('ThirdParty'),
|
'3' => $langs->trans('ThirdParty'),
|
||||||
'4' => $langs->trans('ContactsWithThirdpartyFilter')
|
'4' => $langs->trans('ContactsWithThirdpartyFilter')
|
||||||
);
|
);
|
||||||
$this->type_statuscommprospect = array(
|
|
||||||
-1 => $langs->trans("StatusProspect-1"),
|
require_once DOL_DOCUMENT_ROOT.'/societe/class/client.class.php';
|
||||||
0 => $langs->trans("StatusProspect0"),
|
$customerStatic = new Client($this->db);
|
||||||
1 => $langs->trans("StatusProspect1"),
|
$customerStatic->loadCacheOfProspStatus();
|
||||||
2 => $langs->trans("StatusProspect2"),
|
if (!empty($customerStatic->cacheprospectstatus)) {
|
||||||
3 => $langs->trans("StatusProspect3")
|
foreach ($customerStatic->cacheprospectstatus as $dataProspectSt) {
|
||||||
);
|
$this->type_statuscommprospect[$dataProspectSt['id']]=$dataProspectSt['label'];
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -355,7 +355,7 @@ class FormAdvTargetEmailing extends Form
|
|||||||
$out = '';
|
$out = '';
|
||||||
|
|
||||||
$sql = "SELECT c.rowid, c.name, c.fk_element";
|
$sql = "SELECT c.rowid, c.name, c.fk_element";
|
||||||
$sql .= " FROM ".MAIN_DB_PREFIX."advtargetemailing as c";
|
$sql .= " FROM ".MAIN_DB_PREFIX."mailing_advtarget as c";
|
||||||
$sql .= " WHERE type_element = '".$this->db->escape($type_element)."'";
|
$sql .= " WHERE type_element = '".$this->db->escape($type_element)."'";
|
||||||
$sql .= " ORDER BY c.name";
|
$sql .= " ORDER BY c.name";
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user