commit
6390f558e8
@ -1,7 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -23,12 +24,8 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.formadmin.class.php';
|
||||
require_once '../lib/datapolicies.lib.php';
|
||||
|
||||
//require_once "../class/myclass.class.php";
|
||||
// Translations
|
||||
$langs->load('admin');
|
||||
$langs->load('companies');
|
||||
$langs->load('members');
|
||||
$langs->load('datapolicies@datapolicies');
|
||||
$langs->loadLangs(array('admin', 'companies', 'members', 'datapolicies'));
|
||||
|
||||
|
||||
// Parameters
|
||||
@ -121,32 +118,32 @@ $linkr = 'TXTLINKDATAPOLICIESREFUSE_' . $l;
|
||||
$content = 'DATAPOLICIESCONTENT_' . $l;
|
||||
$acc = 'DATAPOLICIESACCEPT_' . $l;
|
||||
$ref = 'DATAPOLICIESREFUSE_' . $l;
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans('DATAPOLICIESSUBJECTMAIL') . '</td><td>';
|
||||
print '<input type="text" size="100" name="' . $subject . '" value="' . $conf->global->$subject . '" />';
|
||||
print '</td><tr>';
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans('DATAPOLICIESCONTENTMAIL').'</td><td>';
|
||||
print $langs->trans('DATAPOLICIESSUBSITUTION');echo'__LINKACCEPT__,__LINKREFUSED__,__FIRSTNAME__,__NAME__,__CIVILITY__';
|
||||
$doleditor = new DolEditor($content, $conf->global->$content, '', 250, 'Full', '', false, true, 1, 200, 70);
|
||||
$doleditor->Create();
|
||||
print '</td><tr>';
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans('TXTLINKDATAPOLICIESACCEPT') . '</td><td>';
|
||||
print '<input type="text" size="200" name="' . $linka . '" value="' . $conf->global->$linka . '" />';
|
||||
print '</td><tr>';
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans('TXTLINKDATAPOLICIESREFUSE') . '</td><td>';
|
||||
print '<input type="text" size="200" name="' . $linkr . '" value="' . $conf->global->$linkr . '" />';
|
||||
print '</td><tr>';
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
|
||||
print $langs->trans('DATAPOLICIESACCEPT').'</td><td>';
|
||||
|
||||
$doleditor = new DolEditor($acc, $conf->global->$acc, '', 250, 'Full', '', false, true, 1, 200, 70);
|
||||
$doleditor->Create();
|
||||
print '</td><tr>';
|
||||
print '<tr ' . $bc[$var] . '><td class="fieldrequired">';
|
||||
print '<tr class"oddeven"><td class="fieldrequired">';
|
||||
print $langs->trans('DATAPOLICIESREFUSE').'</td><td>';
|
||||
|
||||
print $langs->trans('');
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -54,7 +55,7 @@ class ActionsDatapolicies
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
@ -64,10 +65,10 @@ class ActionsDatapolicies
|
||||
/**
|
||||
* Execute action
|
||||
*
|
||||
* @param array $parameters Array of parameters
|
||||
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||
* @param string $action 'add', 'update', 'view'
|
||||
* @return int <0 if KO,
|
||||
* @param array $parameters Array of parameters
|
||||
* @param CommonObject $object The object to process (an invoice if you are in invoice module, a propale in propale's module, etc...)
|
||||
* @param string $action 'add', 'update', 'view'
|
||||
* @return int <0 if KO,
|
||||
* =0 if OK but we want to process standard actions too,
|
||||
* >0 if OK and we want to replace standard actions.
|
||||
*/
|
||||
@ -97,8 +98,8 @@ class ActionsDatapolicies
|
||||
$object->fetch(GETPOST('socid'));
|
||||
}
|
||||
|
||||
// FIXME Removed had coded id, use codes
|
||||
if ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'anonymiser' && ($object->forme_juridique_code == 11 || $object->forme_juridique_code == 12 || $object->forme_juridique_code == 13 || $object->forme_juridique_code == 15 || $object->forme_juridique_code == 17 || $object->forme_juridique_code == 18 || $object->forme_juridique_code == 19 || $object->forme_juridique_code == 35 || $object->forme_juridique_code == 60 || $object->forme_juridique_code == 200 || $object->forme_juridique_code == 311 || $object->forme_juridique_code == 312 || $object->forme_juridique_code == 316 || $object->forme_juridique_code == 401 || $object->forme_juridique_code == 600 || $object->forme_juridique_code == 700 || $object->forme_juridique_code == 1005 || $object->typent_id == 8)) {
|
||||
// FIXME Removed hard coded id, use codes
|
||||
if ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'anonymiser' && (in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8)) {
|
||||
// on verifie si l'objet est utilisé
|
||||
if ($object->isObjectUsed(GETPOST('socid'))) {
|
||||
$object->name = $langs->trans('ANONYME');
|
||||
@ -202,19 +203,19 @@ class ActionsDatapolicies
|
||||
} elseif ($parameters['currentcontext'] == 'contactcard' && $action == 'send_datapolicies') {
|
||||
$object->fetch(GETPOST('id'));
|
||||
|
||||
dol_include_once('/contact/class/contact.class.php');
|
||||
dol_include_once('/datapolicies/class/datapolicies.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT . '/contact/class/contact.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
|
||||
DataPolicies::sendMailDataPoliciesContact($object);
|
||||
}
|
||||
elseif ($parameters['currentcontext'] == 'membercard' && $action == 'send_datapolicies') {
|
||||
$object->fetch(GETPOST('id'));
|
||||
dol_include_once('/adherents/class/adherent.class.php');
|
||||
dol_include_once('/datapolicies/class/datapolicies.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
|
||||
DataPolicies::sendMailDataPoliciesAdherent($object);
|
||||
} elseif ($parameters['currentcontext'] == 'thirdpartycard' && $action == 'send_datapolicies') {
|
||||
$object->fetch(GETPOST('socid'));
|
||||
dol_include_once('/societe/class/societe.class.php');
|
||||
dol_include_once('/datapolicies/class/datapolicies.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT . '/societe/class/societe.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
|
||||
DataPolicies::sendMailDataPoliciesCompany($object);
|
||||
}
|
||||
|
||||
@ -245,11 +246,12 @@ class ActionsDatapolicies
|
||||
$error = 0; // Error counter
|
||||
|
||||
/* print_r($parameters); print_r($object); echo "action: " . $action; */
|
||||
if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) { // do something only for the context 'somecontext1' or 'somecontext2'
|
||||
foreach ($parameters['toselect'] as $objectid) {
|
||||
// Do action on each object id
|
||||
}
|
||||
}
|
||||
//if (in_array($parameters['currentcontext'], array('somecontext1', 'somecontext2'))) {
|
||||
// // do something only for the context 'somecontext1' or 'somecontext2'
|
||||
// foreach ($parameters['toselect'] as $objectid) {
|
||||
// // Do action on each object id
|
||||
// }
|
||||
//}
|
||||
|
||||
if (!$error) {
|
||||
$this->results = array('myreturn' => 999);
|
||||
@ -292,7 +294,7 @@ class ActionsDatapolicies
|
||||
/**
|
||||
* Execute action
|
||||
*
|
||||
* @param array $parameters Array of parameters
|
||||
* @param array $parameters Array of parameters
|
||||
* @param Object $object Object output on PDF
|
||||
* @param string $action 'add', 'update', 'view'
|
||||
* @return int <0 if KO,
|
||||
@ -387,14 +389,14 @@ class ActionsDatapolicies
|
||||
} );
|
||||
</script>';
|
||||
echo $dialog;
|
||||
if ($parameters['currentcontext'] == 'thirdpartycard' && $object->forme_juridique_code == 11 || $object->forme_juridique_code == 12 || $object->forme_juridique_code == 13 || $object->forme_juridique_code == 15 || $object->forme_juridique_code == 17 || $object->forme_juridique_code == 18 || $object->forme_juridique_code == 19 || $object->forme_juridique_code == 35 || $object->forme_juridique_code == 60 || $object->forme_juridique_code == 200 || $object->forme_juridique_code == 311 || $object->forme_juridique_code == 312 || $object->forme_juridique_code == 316 || $object->forme_juridique_code == 401 || $object->forme_juridique_code == 600 || $object->forme_juridique_code == 700 || $object->forme_juridique_code == 1005 || $object->typent_id == 8) {
|
||||
if ($parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
|
||||
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
|
||||
} elseif ($parameters['currentcontext'] == 'membercard') {
|
||||
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
|
||||
} elseif ($parameters['currentcontext'] == 'contactcard') {
|
||||
echo '<div class="inline-block divButAction"><a target="_blank" id="rpgpdbtn" class="butAction" href="' . $_SERVER["PHP_SELF"] . "?id=" . $object->id . '&action=datapolicies_portabilite" title="' . $langs->trans('DATAPOLICIES_PORTABILITE_TITLE') . '">' . $langs->trans("DATAPOLICIES_PORTABILITE") . '</a></div>';
|
||||
}
|
||||
if (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'thirdpartycard' && $object->forme_juridique_code == 11 || $object->forme_juridique_code == 12 || $object->forme_juridique_code == 13 || $object->forme_juridique_code == 15 || $object->forme_juridique_code == 17 || $object->forme_juridique_code == 18 || $object->forme_juridique_code == 19 || $object->forme_juridique_code == 35 || $object->forme_juridique_code == 60 || $object->forme_juridique_code == 200 || $object->forme_juridique_code == 311 || $object->forme_juridique_code == 312 || $object->forme_juridique_code == 316 || $object->forme_juridique_code == 401 || $object->forme_juridique_code == 600 || $object->forme_juridique_code == 700 || $object->forme_juridique_code == 1005 || $object->typent_id == 8) {
|
||||
if (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'thirdpartycard' && in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $object->typent_id == 8) {
|
||||
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?socid=" . $object->id . '&action=send_datapolicies" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
|
||||
} elseif (!empty($object->mail) && empty($object->array_options['options_datapolicies_send']) && $parameters['currentcontext'] == 'membercard') {
|
||||
echo '<div class="inline-block divButAction"><a class="butAction" href="' . $_SERVER["PHP_SELF"] . "?rowid=" . $object->id . '&action=send_datapolicies" title="' . $langs->trans('DATAPOLICIES_SEND') . '">' . $langs->trans("DATAPOLICIES_SEND") . '</a></div>';
|
||||
@ -435,7 +437,7 @@ class ActionsDatapolicies
|
||||
$societe = new Societe($this->db);
|
||||
$societe->fetch(GETPOST('socid'));
|
||||
// On vérifie si il est utilisé
|
||||
if (($societe->forme_juridique_code == 11 || $societe->forme_juridique_code == 12 || $societe->forme_juridique_code == 13 || $societe->forme_juridique_code == 15 || $societe->forme_juridique_code == 17 || $societe->forme_juridique_code == 18 || $societe->forme_juridique_code == 19 || $societe->forme_juridique_code == 35 || $societe->forme_juridique_code == 60 || $societe->forme_juridique_code == 200 || $societe->forme_juridique_code == 311 || $societe->forme_juridique_code == 312 || $societe->forme_juridique_code == 316 || $societe->forme_juridique_code == 401 || $societe->forme_juridique_code == 600 || $societe->forme_juridique_code == 700 || $societe->forme_juridique_code == 1005 || $societe->typent_id == 8) && $societe->isObjectUsed(GETPOST('socid'))) {
|
||||
if ((in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) || $societe->typent_id == 8) && $societe->isObjectUsed(GETPOST('socid'))) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
|
||||
$form = new Form($this->db);
|
||||
@ -448,7 +450,7 @@ class ActionsDatapolicies
|
||||
$societe = new Societe($this->db);
|
||||
$societe->fetch(GETPOST('socid'));
|
||||
|
||||
if ($societe->forme_juridique_code != 11 && $societe->forme_juridique_code != 12 && $societe->forme_juridique_code != 13 && $societe->forme_juridique_code != 15 && $societe->forme_juridique_code != 17 && $societe->forme_juridique_code != 18 && $societe->forme_juridique_code != 19 && $societe->forme_juridique_code != 35 && $societe->forme_juridique_code != 60 && $societe->forme_juridique_code != 200 && $societe->forme_juridique_code != 311 && $societe->forme_juridique_code != 312 && $societe->forme_juridique_code != 316 && $societe->forme_juridique_code != 401 && $societe->forme_juridique_code != 600 && $societe->forme_juridique_code != 700 && $societe->forme_juridique_code != 1005 && $societe->typent_id != 8) {
|
||||
if (!in_array($object->forme_juridique_code, array(11, 12, 13, 15, 17, 18, 19, 35, 60, 200, 311, 312, 316, 401, 600, 700, 1005)) && $societe->typent_id != 8) {
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/html.form.class.php';
|
||||
$jsscript .= '<script>';
|
||||
|
||||
@ -243,8 +243,8 @@ Class DataPolicies extends Contact
|
||||
|
||||
|
||||
$substitutionarray = array(
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$societe->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
);
|
||||
$subject = make_substitutions($subject, $substitutionarray);
|
||||
$message = make_substitutions($message, $substitutionarray);
|
||||
@ -252,12 +252,13 @@ Class DataPolicies extends Contact
|
||||
$actiontypecode = 'AC_EMAIL';
|
||||
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
||||
if ($message) {
|
||||
if ($sendtocc)
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||
$actionmsg = dol_concatdesc($actionmsg, $message);
|
||||
}
|
||||
if ($sendtocc) {
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||
}
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
||||
}
|
||||
|
||||
// Send mail
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/CMailFile.class.php';
|
||||
@ -307,8 +308,8 @@ Class DataPolicies extends Contact
|
||||
|
||||
|
||||
$substitutionarray = array(
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
'__LINKACCEPT__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=1&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linka.'</a>',
|
||||
'__LINKREFUSED__' => '<a href="'.dol_buildpath('/datapolicies/public/index.php?action=2&c='.$adherent->id.'&l='.$l.'&key='.$code,3).'" target="_blank">'.$linkr.'</a>',
|
||||
);
|
||||
$subject = make_substitutions($subject, $substitutionarray);
|
||||
$message = make_substitutions($message, $substitutionarray);
|
||||
@ -316,11 +317,12 @@ Class DataPolicies extends Contact
|
||||
$actiontypecode = 'AC_EMAIL';
|
||||
$actionmsg = $langs->transnoentities('MailSentBy') . ' ' . $from . ' ' . $langs->transnoentities('To') . ' ' . $sendto;
|
||||
if ($message) {
|
||||
if ($sendtocc)
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||
$actionmsg = dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||
$actionmsg = dol_concatdesc($actionmsg, $message);
|
||||
if ($sendtocc) {
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('Bcc') . ": " . $sendtocc);
|
||||
}
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('MailTopic') . ": " . $subject);
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $langs->transnoentities('TextUsedInTheMessageBody') . ":");
|
||||
$actionmsg .= dol_concatdesc($actionmsg, $message);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2018 SuperAdmin
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -42,7 +43,7 @@ class DataPoliciesCron
|
||||
'DATAPOLICIES_TIERS_CLIENT' => array(
|
||||
'sql' => "
|
||||
SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s
|
||||
WHERE (s.fk_forme_juridique = 19 OR s.fk_forme_juridique = 11 OR s.fk_forme_juridique = 12 OR s.fk_forme_juridique = 13 OR s.fk_forme_juridique = 15 OR s.fk_forme_juridique = 17 OR s.fk_forme_juridique = 18 OR s.fk_forme_juridique = 35 OR s.fk_forme_juridique = 60 OR s.fk_forme_juridique = 312 OR s.fk_forme_juridique = 316 OR s.fk_forme_juridique = 401 OR s.fk_forme_juridique = 600 OR s.fk_forme_juridique = 700 OR s.fk_forme_juridique = 1005 OR s.fk_typent = 8)
|
||||
WHERE (s.fk_forme_juridique IN (11, 12, 13, 15, 17, 18, 19, 35, 60, 312, 316, 401, 600, 700, 1005) OR s.fk_typent = 8)
|
||||
AND s.entity = %d
|
||||
AND s.client = 1
|
||||
AND s.fournisseur = 0
|
||||
@ -77,7 +78,7 @@ class DataPoliciesCron
|
||||
'DATAPOLICIES_TIERS_PROSPECT' => array(
|
||||
'sql' => "
|
||||
SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s
|
||||
WHERE (s.fk_forme_juridique = 19 OR s.fk_forme_juridique = 11 OR s.fk_forme_juridique = 12 OR s.fk_forme_juridique = 13 OR s.fk_forme_juridique = 15 OR s.fk_forme_juridique = 17 OR s.fk_forme_juridique = 18 OR s.fk_forme_juridique = 35 OR s.fk_forme_juridique = 60 OR s.fk_forme_juridique = 312 OR s.fk_forme_juridique = 316 OR s.fk_forme_juridique = 401 OR s.fk_forme_juridique = 600 OR s.fk_forme_juridique = 700 OR s.fk_forme_juridique = 1005 OR s.fk_typent = 8)
|
||||
WHERE (s.fk_forme_juridique IN (11, 12, 13, 15, 17, 18, 19, 35, 60, 312, 316, 401, 600, 700, 1005) OR s.fk_typent = 8)
|
||||
AND s.entity = %d
|
||||
AND s.client = 2
|
||||
AND s.fournisseur = 0
|
||||
@ -112,7 +113,7 @@ class DataPoliciesCron
|
||||
'DATAPOLICIES_TIERS_PROSPECT_CLIENT' => array(
|
||||
'sql' => "
|
||||
SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s
|
||||
WHERE (s.fk_forme_juridique = 19 OR s.fk_forme_juridique = 11 OR s.fk_forme_juridique = 12 OR s.fk_forme_juridique = 13 OR s.fk_forme_juridique = 15 OR s.fk_forme_juridique = 17 OR s.fk_forme_juridique = 18 OR s.fk_forme_juridique = 35 OR s.fk_forme_juridique = 60 OR s.fk_forme_juridique = 312 OR s.fk_forme_juridique = 316 OR s.fk_forme_juridique = 401 OR s.fk_forme_juridique = 600 OR s.fk_forme_juridique = 700 OR s.fk_forme_juridique = 1005 OR s.fk_typent = 8)
|
||||
WHERE (s.fk_forme_juridique IN (11, 12, 13, 15, 17, 18, 19, 35, 60, 312, 316, 401, 600, 700, 1005) OR s.fk_typent = 8)
|
||||
AND s.entity = %d
|
||||
AND s.client = 3
|
||||
AND s.fournisseur = 0
|
||||
@ -147,7 +148,7 @@ class DataPoliciesCron
|
||||
'DATAPOLICIES_TIERS_NIPROSPECT_NICLIENT' => array(
|
||||
'sql' => "
|
||||
SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s
|
||||
WHERE (s.fk_forme_juridique = 19 OR s.fk_forme_juridique = 11 OR s.fk_forme_juridique = 12 OR s.fk_forme_juridique = 13 OR s.fk_forme_juridique = 15 OR s.fk_forme_juridique = 17 OR s.fk_forme_juridique = 18 OR s.fk_forme_juridique = 35 OR s.fk_forme_juridique = 60 OR s.fk_forme_juridique = 312 OR s.fk_forme_juridique = 316 OR s.fk_forme_juridique = 401 OR s.fk_forme_juridique = 600 OR s.fk_forme_juridique = 700 OR s.fk_forme_juridique = 1005 OR s.fk_typent = 8)
|
||||
WHERE (s.fk_forme_juridique IN (11, 12, 13, 15, 17, 18, 19, 35, 60, 312, 316, 401, 600, 700, 1005) OR s.fk_typent = 8)
|
||||
AND s.entity = %d
|
||||
AND s.client = 0
|
||||
AND s.fournisseur = 0
|
||||
@ -182,7 +183,7 @@ class DataPoliciesCron
|
||||
'DATAPOLICIES_TIERS_FOURNISSEUR' => array(
|
||||
'sql' => "
|
||||
SELECT s.rowid FROM ".MAIN_DB_PREFIX."societe as s
|
||||
WHERE (s.fk_forme_juridique = 19 OR s.fk_forme_juridique = 11 OR s.fk_forme_juridique = 12 OR s.fk_forme_juridique = 13 OR s.fk_forme_juridique = 15 OR s.fk_forme_juridique = 17 OR s.fk_forme_juridique = 18 OR s.fk_forme_juridique = 35 OR s.fk_forme_juridique = 60 OR s.fk_forme_juridique = 312 OR s.fk_forme_juridique = 316 OR s.fk_forme_juridique = 401 OR s.fk_forme_juridique = 600 OR s.fk_forme_juridique = 700 OR s.fk_forme_juridique = 1005 OR s.fk_typent = 8)
|
||||
WHERE (s.fk_forme_juridique IN (11, 12, 13, 15, 17, 18, 19, 35, 60, 312, 316, 401, 600, 700, 1005) OR s.fk_typent = 8)
|
||||
AND s.entity = %d
|
||||
AND s.fournisseur = 1
|
||||
AND s.tms < DATE_SUB(NOW(), INTERVAL %d MONTH)
|
||||
@ -511,7 +512,7 @@ class DataPoliciesCron
|
||||
|
||||
$langs->load('datapolicies@datapolicies');
|
||||
|
||||
dol_include_once('/datapolicies/class/datapolicies.class.php');
|
||||
require_once DOL_DOCUMENT_ROOT . '/datapolicies/class/datapolicies.class.php';
|
||||
|
||||
$contacts = new DataPolicies($db);
|
||||
$contacts->getAllContactNotInformed();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user