Fix regression for v13
This commit is contained in:
parent
7297950308
commit
d9818405c6
@ -91,7 +91,11 @@ $hookmanager->initHooks(array('admin'));
|
|||||||
// Put here declaration of dictionaries properties
|
// Put here declaration of dictionaries properties
|
||||||
|
|
||||||
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
|
||||||
|
if (! empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) {
|
||||||
$taborder = array(9, 0, 4, 3, 2, 0, 1, 8, 19, 16, 39, 27, 40, 38, 0, 5, 11, 0, 32, 33, 34, 0, 6, 0, 29, 0, 7, 24, 28, 17, 35, 36, 0, 10, 23, 12, 13, 0, 14, 0, 22, 20, 18, 21, 0, 15, 30, 0, 37, 0, 25, 0);
|
$taborder = array(9, 0, 4, 3, 2, 0, 1, 8, 19, 16, 39, 27, 40, 38, 0, 5, 11, 0, 32, 33, 34, 0, 6, 0, 29, 0, 7, 24, 28, 17, 35, 36, 0, 10, 23, 12, 13, 0, 14, 0, 22, 20, 18, 21, 0, 15, 30, 0, 37, 0, 25, 0);
|
||||||
|
} else {
|
||||||
|
$taborder = array(9, 0, 4, 3, 2, 0, 1, 8, 19, 16, 27, 38, 0, 5, 11, 0, 32, 33, 34, 0, 6, 0, 29, 0, 7, 24, 28, 17, 35, 36, 0, 10, 23, 12, 13, 0, 14, 0, 22, 20, 18, 21, 0, 15, 30, 0, 37, 0, 25, 0);
|
||||||
|
}
|
||||||
|
|
||||||
// Name of SQL tables of dictionaries
|
// Name of SQL tables of dictionaries
|
||||||
$tabname = array();
|
$tabname = array();
|
||||||
|
|||||||
@ -1351,8 +1351,11 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
print '</table>';
|
print '</table>';
|
||||||
|
print '</div>';
|
||||||
|
|
||||||
$object->fetch_thirdparty();
|
$object->fetch_thirdparty();
|
||||||
|
|
||||||
|
if (! empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) {
|
||||||
if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3)
|
if ($object->thirdparty->client == 2 || $object->thirdparty->client == 3)
|
||||||
{
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
@ -1368,33 +1371,31 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action))
|
|||||||
if ($action != 'editlevel' && $user->rights->societe->contact->creer) print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editlevel&id=' . $object->id . '">' . img_edit($langs->trans('Modify'), 1) . '</a></td>';
|
if ($action != 'editlevel' && $user->rights->societe->contact->creer) print '<td align="right"><a href="' . $_SERVER["PHP_SELF"] . '?action=editlevel&id=' . $object->id . '">' . img_edit($langs->trans('Modify'), 1) . '</a></td>';
|
||||||
print '</tr></table>';
|
print '</tr></table>';
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
if ($action == 'editlevel')
|
if ($action == 'editlevel') {
|
||||||
{
|
|
||||||
$formcompany->formProspectContactLevel($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_prospectlevel, 'prospect_contact_level_id', 1);
|
$formcompany->formProspectContactLevel($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->fk_prospectlevel, 'prospect_contact_level_id', 1);
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
print $object->getLibProspLevel();
|
print $object->getLibProspLevel();
|
||||||
}
|
}
|
||||||
print "</td>";
|
print "</td>";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Status
|
// Status of prospection
|
||||||
$object->loadCacheOfProspStatus();
|
$object->loadCacheOfProspStatus();
|
||||||
print '<tr><td>' . $langs->trans("StatusProsp") . '</td><td>' . $object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
|
print '<tr><td>' . $langs->trans("StatusProsp") . '</td><td>' . $object->getLibProspCommStatut(4, $object->cacheprospectstatus[$object->stcomm_id]['label']);
|
||||||
print ' ';
|
print ' ';
|
||||||
print '<div class="floatright">';
|
print '<div class="floatright">';
|
||||||
foreach ($object->cacheprospectstatus as $key => $val)
|
foreach ($object->cacheprospectstatus as $key => $val) {
|
||||||
{
|
|
||||||
$titlealt = 'default';
|
$titlealt = 'default';
|
||||||
if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label'];
|
if (!empty($val['code']) && !in_array($val['code'], array('ST_NO', 'ST_NEVER', 'ST_TODO', 'ST_PEND', 'ST_DONE'))) $titlealt = $val['label'];
|
||||||
if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&stcomm=' . $val['code'] . '&action=setstcomm">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>';
|
if ($object->stcomm_id != $val['id']) print '<a class="pictosubstatus" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '&stcomm=' . $val['code'] . '&action=setstcomm">' . img_action($titlealt, $val['code'], $val['picto']) . '</a>';
|
||||||
}
|
}
|
||||||
print '</div></td></tr>';
|
print '</div></td></tr>';
|
||||||
|
|
||||||
print "</table>";
|
print "</table>";
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print '</div>';
|
|
||||||
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
print '<div class="fichehalfright"><div class="ficheaddleft">';
|
||||||
|
|
||||||
print '<div class="underbanner clearboth"></div>';
|
print '<div class="underbanner clearboth"></div>';
|
||||||
|
|||||||
@ -232,6 +232,10 @@ class Contact extends CommonObject
|
|||||||
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0;
|
if (empty($conf->global->MAIN_SHOW_TECHNICAL_ID) && isset($this->fields['rowid'])) $this->fields['rowid']['visible'] = 0;
|
||||||
if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0;
|
if (empty($conf->mailing->enabled)) $this->fields['no_email']['enabled'] = 0;
|
||||||
if (!empty($conf->global->SOCIETE_DISABLE_CONTACTS)) $this->fields['thirdparty']['enabled'] = 0;
|
if (!empty($conf->global->SOCIETE_DISABLE_CONTACTS)) $this->fields['thirdparty']['enabled'] = 0;
|
||||||
|
if (empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) { // Default behaviour
|
||||||
|
$this->field['fk_stcomm']['enabled'] = 0;
|
||||||
|
$this->field['fk_prospectlevel']['enabled'] = 0;
|
||||||
|
}
|
||||||
$this->statut = 1; // By default, status is enabled
|
$this->statut = 1; // By default, status is enabled
|
||||||
|
|
||||||
// Unset fields that are disabled
|
// Unset fields that are disabled
|
||||||
@ -1830,8 +1834,7 @@ class Contact extends CommonObject
|
|||||||
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1");
|
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1");
|
||||||
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2");
|
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2");
|
||||||
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3");
|
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3");
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label);
|
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1842,8 +1845,7 @@ class Contact extends CommonObject
|
|||||||
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto);
|
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto);
|
||||||
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto);
|
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto);
|
||||||
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto);
|
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto);
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto);
|
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1854,8 +1856,7 @@ class Contact extends CommonObject
|
|||||||
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1");
|
elseif ($statut == '1' || $statut == 'ST_TODO') return img_action($langs->trans("StatusProspect1"), 1, $picto) . ' ' . $langs->trans("StatusProspect1");
|
||||||
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2");
|
elseif ($statut == '2' || $statut == 'ST_PEND') return img_action($langs->trans("StatusProspect2"), 2, $picto) . ' ' . $langs->trans("StatusProspect2");
|
||||||
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3");
|
elseif ($statut == '3' || $statut == 'ST_DONE') return img_action($langs->trans("StatusProspect3"), 3, $picto) . ' ' . $langs->trans("StatusProspect3");
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label);
|
return img_action(($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label, 0, $picto) . ' ' . (($langs->trans("StatusProspect" . $statut) != "StatusProspect" . $statut) ? $langs->trans("StatusProspect" . $statut) : $label);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -179,13 +179,16 @@ $arrayfields = array(
|
|||||||
'p.no_email'=>array('label'=>"No_Email", 'position'=>41, 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled))),
|
'p.no_email'=>array('label'=>"No_Email", 'position'=>41, 'checked'=>0, 'enabled'=>(!empty($conf->mailing->enabled))),
|
||||||
'p.thirdparty'=>array('label'=>"ThirdParty", 'position'=>50, 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)),
|
'p.thirdparty'=>array('label'=>"ThirdParty", 'position'=>50, 'checked'=>1, 'enabled'=>empty($conf->global->SOCIETE_DISABLE_CONTACTS)),
|
||||||
'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200),
|
'p.priv'=>array('label'=>"ContactVisibility", 'checked'=>1, 'position'=>200),
|
||||||
'p.fk_prospectcontactlevel'=>array('label'=>"ProspectLevelShort", 'checked'=>1),
|
|
||||||
'p.fk_stcommcontact'=>array('label'=>"StatusProsp", 'checked'=>1),
|
|
||||||
'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500),
|
'p.datec'=>array('label'=>"DateCreationShort", 'checked'=>0, 'position'=>500),
|
||||||
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500),
|
||||||
'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
'p.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000),
|
||||||
'p.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100),
|
'p.import_key'=>array('label'=>"ImportId", 'checked'=>0, 'position'=>1100),
|
||||||
);
|
);
|
||||||
|
if (! empty($conf->global->THIRDPARTY_ENABLE_PROSPECTION_ON_ALTERNATIVE_ADRESSES)) {
|
||||||
|
$arrayfields['p.fk_prospectcontactlevel'] = array('label'=>"ProspectLevelShort", 'checked'=>1, 'position'=>210);
|
||||||
|
$arrayfields['p.fk_stcommcontact'] = array('label'=>"StatusProsp", 'checked'=>1, 'position'=>215);
|
||||||
|
}
|
||||||
|
|
||||||
if (!empty($conf->socialnetworks->enabled)) {
|
if (!empty($conf->socialnetworks->enabled)) {
|
||||||
foreach ($socialnetworks as $key => $value) {
|
foreach ($socialnetworks as $key => $value) {
|
||||||
if ($value['active']) {
|
if ($value['active']) {
|
||||||
@ -504,10 +507,14 @@ if ($search_email != '') $param .= '&search_email='.urlencode($search_email)
|
|||||||
if ($search_no_email != '') $param .= '&search_no_email='.urlencode($search_no_email);
|
if ($search_no_email != '') $param .= '&search_no_email='.urlencode($search_no_email);
|
||||||
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
if ($search_status != '') $param .= '&search_status='.urlencode($search_status);
|
||||||
if ($search_priv == '0' || $search_priv == '1') $param .= "&search_priv=".urlencode($search_priv);
|
if ($search_priv == '0' || $search_priv == '1') $param .= "&search_priv=".urlencode($search_priv);
|
||||||
if ($search_stcomm != '') $param.='&search_stcomm='.$search_stcomm;
|
if ($search_stcomm != '') $param.='&search_stcomm='.urlencode($search_stcomm);
|
||||||
if (is_array($search_level) && count($search_level)) foreach($search_level as $slevel) $param.='&search_level[]='.urlencode($slevel);
|
if (is_array($search_level) && count($search_level)) {
|
||||||
|
foreach($search_level as $slevel) {
|
||||||
|
$param.='&search_level[]='.urlencode($slevel);
|
||||||
|
}
|
||||||
|
}
|
||||||
if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key);
|
if ($search_import_key != '') $param .= '&search_import_key='.urlencode($search_import_key);
|
||||||
if ($optioncss != '') $param .= '&optioncss='.$optioncss;
|
if ($optioncss != '') $param .= '&optioncss='.urlencode($optioncss);
|
||||||
if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles);
|
if (count($search_roles) > 0) $param .= implode('&search_roles[]=', $search_roles);
|
||||||
|
|
||||||
// Add $param from extra fields
|
// Add $param from extra fields
|
||||||
|
|||||||
@ -24,7 +24,7 @@
|
|||||||
-- Prospect level for contacts
|
-- Prospect level for contacts
|
||||||
--
|
--
|
||||||
|
|
||||||
delete from llx_c_prospectcontactlevel;
|
--delete from llx_c_prospectcontactlevel;
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
||||||
|
|||||||
@ -305,37 +305,6 @@ ALTER TABLE llx_categorie ADD COLUMN fk_user_modif integer;
|
|||||||
|
|
||||||
ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commandefourndet FOREIGN KEY (fk_commandefourndet) REFERENCES llx_commande_fournisseurdet (rowid);
|
ALTER TABLE llx_commandedet ADD CONSTRAINT fk_commandedet_fk_commandefourndet FOREIGN KEY (fk_commandefourndet) REFERENCES llx_commande_fournisseurdet (rowid);
|
||||||
|
|
||||||
create table llx_c_prospectcontactlevel
|
|
||||||
(
|
|
||||||
code varchar(12) PRIMARY KEY,
|
|
||||||
label varchar(30),
|
|
||||||
sortorder smallint,
|
|
||||||
active smallint DEFAULT 1 NOT NULL,
|
|
||||||
module varchar(32) NULL
|
|
||||||
) ENGINE=innodb;
|
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
|
||||||
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4);
|
|
||||||
|
|
||||||
create table llx_c_stcommcontact
|
|
||||||
(
|
|
||||||
id integer PRIMARY KEY,
|
|
||||||
code varchar(12) NOT NULL,
|
|
||||||
libelle varchar(30),
|
|
||||||
picto varchar(128),
|
|
||||||
active tinyint default 1 NOT NULL
|
|
||||||
)ENGINE=innodb;
|
|
||||||
ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code);
|
|
||||||
insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact');
|
|
||||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted');
|
|
||||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact');
|
|
||||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress');
|
|
||||||
insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted');
|
|
||||||
|
|
||||||
ALTER TABLE llx_socpeople ADD COLUMN fk_prospectcontactlevel varchar(12) AFTER priv;
|
|
||||||
ALTER TABLE llx_socpeople ADD COLUMN fk_stcommcontact integer DEFAULT 0 NOT NULL AFTER fk_prospectcontactlevel;
|
|
||||||
|
|
||||||
-- VMYSQL4.3 ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN fk_facture INTEGER NULL;
|
-- VMYSQL4.3 ALTER TABLE llx_prelevement_facture_demande MODIFY COLUMN fk_facture INTEGER NULL;
|
||||||
-- VPGSQL8.2 ALTER TABLE llx_prelevement_facture_demande ALTER COLUMN fk_facture DROP NOT NULL;
|
-- VPGSQL8.2 ALTER TABLE llx_prelevement_facture_demande ALTER COLUMN fk_facture DROP NOT NULL;
|
||||||
ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER NULL;
|
ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER NULL;
|
||||||
|
|||||||
@ -125,5 +125,38 @@ create table llx_recruitment_recruitmentjobposition_extrafields
|
|||||||
ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_fk_object(fk_object);
|
ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_fk_object(fk_object);
|
||||||
|
|
||||||
|
|
||||||
|
-- Add dictionary for prospect level and action commercial on contacts (Using this is not recommanded)
|
||||||
|
|
||||||
|
create table llx_c_prospectcontactlevel
|
||||||
|
(
|
||||||
|
code varchar(12) PRIMARY KEY,
|
||||||
|
label varchar(30),
|
||||||
|
sortorder smallint,
|
||||||
|
active smallint DEFAULT 1 NOT NULL,
|
||||||
|
module varchar(32) NULL
|
||||||
|
) ENGINE=innodb;
|
||||||
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_NONE', 'None', 1);
|
||||||
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_LOW', 'Low', 2);
|
||||||
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_MEDIUM', 'Medium', 3);
|
||||||
|
insert into llx_c_prospectcontactlevel (code,label,sortorder) values ('PL_HIGH', 'High', 4);
|
||||||
|
|
||||||
|
create table llx_c_stcommcontact
|
||||||
|
(
|
||||||
|
id integer PRIMARY KEY,
|
||||||
|
code varchar(12) NOT NULL,
|
||||||
|
libelle varchar(30),
|
||||||
|
picto varchar(128),
|
||||||
|
active tinyint default 1 NOT NULL
|
||||||
|
)ENGINE=innodb;
|
||||||
|
ALTER TABLE llx_c_stcommcontact ADD UNIQUE INDEX uk_c_stcommcontact(code);
|
||||||
|
|
||||||
|
insert into llx_c_stcommcontact (id,code,libelle) values (-1, 'ST_NO', 'Do not contact');
|
||||||
|
insert into llx_c_stcommcontact (id,code,libelle) values ( 0, 'ST_NEVER', 'Never contacted');
|
||||||
|
insert into llx_c_stcommcontact (id,code,libelle) values ( 1, 'ST_TODO', 'To contact');
|
||||||
|
insert into llx_c_stcommcontact (id,code,libelle) values ( 2, 'ST_PEND', 'Contact in progress');
|
||||||
|
insert into llx_c_stcommcontact (id,code,libelle) values ( 3, 'ST_DONE', 'Contacted');
|
||||||
|
|
||||||
|
ALTER TABLE llx_socpeople ADD COLUMN fk_prospectcontactlevel varchar(12) AFTER priv;
|
||||||
|
ALTER TABLE llx_socpeople ADD COLUMN fk_stcommcontact integer DEFAULT 0 NOT NULL AFTER fk_prospectcontactlevel;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user