Merge remote-tracking branch 'origin/3.7' into 3.8
Conflicts: htdocs/core/modules/modContrat.class.php htdocs/fichinter/card.php htdocs/install/upgrade2.php
This commit is contained in:
commit
b57c156b60
@ -203,7 +203,6 @@ else if ($action == 'set_FICHINTER_FREE_TEXT')
|
|||||||
else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
else if ($action == 'set_FICHINTER_DRAFT_WATERMARK')
|
||||||
{
|
{
|
||||||
$draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
|
$draft= GETPOST('FICHINTER_DRAFT_WATERMARK','alpha');
|
||||||
|
|
||||||
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
$res = dolibarr_set_const($db, "FICHINTER_DRAFT_WATERMARK",trim($draft),'chaine',0,'',$conf->entity);
|
||||||
|
|
||||||
if (! $res > 0) $error++;
|
if (! $res > 0) $error++;
|
||||||
@ -544,7 +543,7 @@ print '<input size="50" class="flat" type="text" name="FICHINTER_DRAFT_WATERMARK
|
|||||||
print '</td><td align="right">';
|
print '</td><td align="right">';
|
||||||
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
print '<input type="submit" class="button" value="'.$langs->trans("Modify").'">';
|
||||||
print "</td></tr>\n";
|
print "</td></tr>\n";
|
||||||
|
print '</form>';
|
||||||
// print products on fichinter
|
// print products on fichinter
|
||||||
$var=! $var;
|
$var=! $var;
|
||||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||||
|
|||||||
@ -622,7 +622,19 @@ class ActionComm extends CommonObject
|
|||||||
$this->error=$this->db->lasterror();
|
$this->error=$this->db->lasterror();
|
||||||
$error++;
|
$error++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error) {
|
||||||
|
$sql = "DELETE FROM ".MAIN_DB_PREFIX."actioncomm_resources";
|
||||||
|
$sql.= " WHERE fk_actioncomm=".$this->id;
|
||||||
|
|
||||||
|
dol_syslog(get_class($this)."::delete", LOG_DEBUG);
|
||||||
|
$res=$this->db->query($sql);
|
||||||
|
if ($res < 0) {
|
||||||
|
$this->error=$this->db->lasterror();
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Removed extrafields
|
// Removed extrafields
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
$result=$this->deleteExtraFields();
|
$result=$this->deleteExtraFields();
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class PropaleStats extends Stats
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param int $socid Id third party for filter
|
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||||
* @param int $userid Id user for filter (creation user)
|
* @param int $userid Id user for filter (creation user)
|
||||||
*/
|
*/
|
||||||
function __construct($db, $socid=0, $userid=0)
|
function __construct($db, $socid=0, $userid=0)
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class CommandeStats extends Stats
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param int $socid Id third party for filter
|
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||||
* @param string $mode Option ('customer', 'supplier')
|
* @param string $mode Option ('customer', 'supplier')
|
||||||
* @param int $userid Id user for filter (creation user)
|
* @param int $userid Id user for filter (creation user)
|
||||||
*/
|
*/
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class FactureStats extends Stats
|
|||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param int $socid Id third party for filter
|
* @param int $socid Id third party for filter. This value must be forced during the new to external user company if user is an external user.
|
||||||
* @param string $mode Option ('customer', 'supplier')
|
* @param string $mode Option ('customer', 'supplier')
|
||||||
* @param int $userid Id user for filter (creation user)
|
* @param int $userid Id user for filter (creation user)
|
||||||
*/
|
*/
|
||||||
@ -168,7 +168,7 @@ class FactureStats extends Stats
|
|||||||
|
|
||||||
$sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")";
|
$sql = "SELECT date_format(datef,'%m') as dm, AVG(f.".$this->field.")";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
|
$sql.= " WHERE f.datef BETWEEN '".$this->db->idate(dol_get_first_day($year))."' AND '".$this->db->idate(dol_get_last_day($year))."'";
|
||||||
$sql.= " AND ".$this->where;
|
$sql.= " AND ".$this->where;
|
||||||
$sql.= " GROUP BY dm";
|
$sql.= " GROUP BY dm";
|
||||||
@ -188,7 +188,7 @@ class FactureStats extends Stats
|
|||||||
|
|
||||||
$sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg";
|
$sql = "SELECT date_format(datef,'%Y') as year, COUNT(*) as nb, SUM(f.".$this->field.") as total, AVG(f.".$this->field.") as avg";
|
||||||
$sql.= " FROM ".$this->from;
|
$sql.= " FROM ".$this->from;
|
||||||
if (!$user->rights->societe->client->voir && !$user->societe_id) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
if (!$user->rights->societe->client->voir && !$this->socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc";
|
||||||
$sql.= " WHERE ".$this->where;
|
$sql.= " WHERE ".$this->where;
|
||||||
$sql.= " GROUP BY year";
|
$sql.= " GROUP BY year";
|
||||||
$sql.= $this->db->order('year','DESC');
|
$sql.= $this->db->order('year','DESC');
|
||||||
|
|||||||
@ -75,6 +75,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
$statssql[0].= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
$statssql[0].= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||||
$statssql[0].= " AND c.email != ''"; // Note that null != '' is false
|
$statssql[0].= " AND c.email != ''"; // Note that null != '' is false
|
||||||
$statssql[0].= " AND c.no_email = 0";
|
$statssql[0].= " AND c.no_email = 0";
|
||||||
|
$statssql[0].= " AND c.statut = 1";
|
||||||
|
|
||||||
return $statssql;
|
return $statssql;
|
||||||
}
|
}
|
||||||
@ -98,6 +99,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND c.no_email = 0";
|
$sql.= " AND c.no_email = 0";
|
||||||
|
$sql.= " AND c.statut = 1";
|
||||||
|
|
||||||
// La requete doit retourner un champ "nb" pour etre comprise
|
// La requete doit retourner un champ "nb" pour etre comprise
|
||||||
// par parent::getNbOfRecipients
|
// par parent::getNbOfRecipients
|
||||||
@ -204,6 +206,7 @@ class mailing_contacts1 extends MailingTargets
|
|||||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND c.email <> ''";
|
$sql.= " AND c.email <> ''";
|
||||||
$sql.= " AND c.no_email = 0";
|
$sql.= " AND c.no_email = 0";
|
||||||
|
$sql.= " AND c.statut = 1";
|
||||||
$sql.= " AND c.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
$sql.= " AND c.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||||
foreach($filtersarray as $key)
|
foreach($filtersarray as $key)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -86,6 +86,7 @@ class mailing_contacts2 extends MailingTargets
|
|||||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND sp.email <> ''"; // Note that null != '' is false
|
$sql.= " AND sp.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
//$sql.= " AND sp.poste != ''";
|
//$sql.= " AND sp.poste != ''";
|
||||||
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||||
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'";
|
if ($filtersarray[0]<>'all') $sql.= " AND sp.poste ='".$this->db->escape($filtersarray[0])."'";
|
||||||
@ -168,6 +169,7 @@ class mailing_contacts2 extends MailingTargets
|
|||||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
//$sql.= " AND sp.poste != ''";
|
//$sql.= " AND sp.poste != ''";
|
||||||
// La requete doit retourner un champ "nb" pour etre comprise
|
// La requete doit retourner un champ "nb" pour etre comprise
|
||||||
// par parent::getNbOfRecipients
|
// par parent::getNbOfRecipients
|
||||||
@ -191,6 +193,7 @@ class mailing_contacts2 extends MailingTargets
|
|||||||
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
$sql.= " AND sp.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
$sql.= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
|
$sql.= " AND (sp.poste IS NOT NULL AND sp.poste != '')";
|
||||||
$sql.= " GROUP BY sp.poste";
|
$sql.= " GROUP BY sp.poste";
|
||||||
$sql.= " ORDER BY sp.poste";
|
$sql.= " ORDER BY sp.poste";
|
||||||
|
|||||||
@ -85,6 +85,7 @@ class mailing_contacts3 extends MailingTargets
|
|||||||
if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs";
|
if ($filtersarray[0] <> 'all') $sql.= ", ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||||
$sql.= " WHERE sp.email <> ''"; // Note that null != '' is false
|
$sql.= " WHERE sp.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
$sql.= " AND sp.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||||
if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid";
|
if ($filtersarray[0] <> 'all') $sql.= " AND cs.fk_categorie = c.rowid";
|
||||||
@ -173,6 +174,7 @@ class mailing_contacts3 extends MailingTargets
|
|||||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND c.no_email = 0";
|
$sql.= " AND c.no_email = 0";
|
||||||
|
$sql.= " AND c.statut = 1";
|
||||||
/*
|
/*
|
||||||
$sql = "SELECT count(distinct(sp.email)) as nb";
|
$sql = "SELECT count(distinct(sp.email)) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
||||||
@ -208,6 +210,7 @@ class mailing_contacts3 extends MailingTargets
|
|||||||
$sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs";
|
$sql.= " ".MAIN_DB_PREFIX."categorie_societe as cs";
|
||||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND cs.fk_categorie = c.rowid";
|
$sql.= " AND cs.fk_categorie = c.rowid";
|
||||||
$sql.= " AND cs.fk_soc = sp.fk_soc";
|
$sql.= " AND cs.fk_soc = sp.fk_soc";
|
||||||
|
|||||||
@ -85,6 +85,7 @@ class mailing_contacts4 extends MailingTargets
|
|||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = sp.fk_soc";
|
||||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||||
if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'";
|
if ($filtersarray[0] <> 'all') $sql.= " AND c.label = '".$this->db->escape($filtersarray[0])."'";
|
||||||
$sql.= " ORDER BY sp.lastname, sp.firstname";
|
$sql.= " ORDER BY sp.lastname, sp.firstname";
|
||||||
@ -173,6 +174,7 @@ class mailing_contacts4 extends MailingTargets
|
|||||||
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
$sql.= " WHERE c.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
$sql.= " AND c.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND c.no_email = 0";
|
$sql.= " AND c.no_email = 0";
|
||||||
|
$sql.= " AND c.statut = 1";
|
||||||
/*
|
/*
|
||||||
$sql = "SELECT count(distinct(sp.email)) as nb";
|
$sql = "SELECT count(distinct(sp.email)) as nb";
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
$sql.= " FROM ".MAIN_DB_PREFIX."socpeople as sp,";
|
||||||
@ -208,6 +210,7 @@ class mailing_contacts4 extends MailingTargets
|
|||||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."categorie as c ON cs.fk_categorie = c.rowid";
|
||||||
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
$sql.= " WHERE sp.email != ''"; // Note that null != '' is false
|
||||||
$sql.= " AND sp.no_email = 0";
|
$sql.= " AND sp.no_email = 0";
|
||||||
|
$sql.= " AND sp.statut = 1";
|
||||||
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
$sql.= " AND sp.entity IN (".getEntity('societe', 1).")";
|
||||||
$sql.= " GROUP BY c.label";
|
$sql.= " GROUP BY c.label";
|
||||||
$sql.= " ORDER BY c.label";
|
$sql.= " ORDER BY c.label";
|
||||||
|
|||||||
@ -3830,7 +3830,6 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
|||||||
if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
|
if ($moduletoreload == 'MAIN_MODULE_SERVICE') // Permission has changed into 2.7
|
||||||
{
|
{
|
||||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Service module");
|
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Service module");
|
||||||
|
|
||||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
|
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modService.class.php';
|
||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modService($db);
|
$mod=new modService($db);
|
||||||
@ -3841,7 +3840,6 @@ function migrate_reload_modules($db,$langs,$conf,$listofmodule=array())
|
|||||||
if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
|
if ($moduletoreload == 'MAIN_MODULE_COMMANDE') // Permission has changed into 2.9
|
||||||
{
|
{
|
||||||
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Commande module");
|
dolibarr_install_syslog("upgrade2::migrate_reload_modules Reactivate Commande module");
|
||||||
|
|
||||||
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
|
$res=@include_once DOL_DOCUMENT_ROOT.'/core/modules/modCommande.class.php';
|
||||||
if ($res) {
|
if ($res) {
|
||||||
$mod=new modCommande($db);
|
$mod=new modCommande($db);
|
||||||
|
|||||||
@ -1226,6 +1226,7 @@ ContractsNumberingModules=Contracts numbering modules
|
|||||||
TemplatePDFContracts=Contracts documents models
|
TemplatePDFContracts=Contracts documents models
|
||||||
FreeLegalTextOnContracts=Free text on contracts
|
FreeLegalTextOnContracts=Free text on contracts
|
||||||
WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty)
|
WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty)
|
||||||
|
ContractsAndServices=List of contracts and services
|
||||||
##### Members #####
|
##### Members #####
|
||||||
MembersSetup=Members module setup
|
MembersSetup=Members module setup
|
||||||
MemberMainOptions=Main options
|
MemberMainOptions=Main options
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user