Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
a24cbf5585
@ -63,7 +63,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
* array of SQL request that returns two field:
|
* array of SQL request that returns two field:
|
||||||
* One called "label", One called "nb".
|
* One called "label", One called "nb".
|
||||||
*
|
*
|
||||||
* @return string[] Array with SQL requests
|
* @return array Array with SQL requests
|
||||||
*/
|
*/
|
||||||
function getSqlArrayForStats()
|
function getSqlArrayForStats()
|
||||||
{
|
{
|
||||||
@ -108,7 +108,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
*/
|
*/
|
||||||
function formFilter()
|
function formFilter()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $conf, $langs;
|
||||||
$langs->load("members");
|
$langs->load("members");
|
||||||
|
|
||||||
$form=new Form($this->db);
|
$form=new Form($this->db);
|
||||||
@ -121,6 +121,36 @@ class mailing_fraise extends MailingTargets
|
|||||||
$s.='<option value="1a">'.$langs->trans("MemberStatusActiveShort").' ('.$langs->trans("MemberStatusPaidShort").')</option>';
|
$s.='<option value="1a">'.$langs->trans("MemberStatusActiveShort").' ('.$langs->trans("MemberStatusPaidShort").')</option>';
|
||||||
$s.='<option value="1b">'.$langs->trans("MemberStatusActiveShort").' ('.$langs->trans("MemberStatusActiveLateShort").')</option>';
|
$s.='<option value="1b">'.$langs->trans("MemberStatusActiveShort").' ('.$langs->trans("MemberStatusActiveLateShort").')</option>';
|
||||||
$s.='<option value="0">'.$langs->trans("MemberStatusResiliatedShort").'</option>';
|
$s.='<option value="0">'.$langs->trans("MemberStatusResiliatedShort").'</option>';
|
||||||
|
$s.='</select> ';
|
||||||
|
$s.=$langs->trans("Type").': ';
|
||||||
|
$s.='<select name="filter" class="flat">';
|
||||||
|
$sql = "SELECT rowid, libelle, statut";
|
||||||
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent_type";
|
||||||
|
$sql.= " WHERE entity = ".$conf->entity;
|
||||||
|
$sql.= " ORDER BY rowid";
|
||||||
|
$resql = $this->db->query($sql);
|
||||||
|
if ($resql)
|
||||||
|
{
|
||||||
|
$num = $this->db->num_rows($resql);
|
||||||
|
|
||||||
|
$s.='<option value="0"> </option>';
|
||||||
|
if (! $num) $s.='<option value="0" disabled="disabled">'.$langs->trans("NoCategoriesDefined").'</option>';
|
||||||
|
|
||||||
|
$i = 0;
|
||||||
|
while ($i < $num)
|
||||||
|
{
|
||||||
|
$obj = $this->db->fetch_object($resql);
|
||||||
|
|
||||||
|
$s.='<option value="'.$obj->rowid.'">'.dol_trunc($obj->libelle,38,'middle');
|
||||||
|
$s.='</option>';
|
||||||
|
$i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
dol_print_error($this->db);
|
||||||
|
}
|
||||||
|
|
||||||
$s.='</select>';
|
$s.='</select>';
|
||||||
$s.='<br>';
|
$s.='<br>';
|
||||||
$s.=$langs->trans("DateEndSubscription").': ';
|
$s.=$langs->trans("DateEndSubscription").': ';
|
||||||
@ -172,7 +202,7 @@ class mailing_fraise extends MailingTargets
|
|||||||
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
|
$sql = "SELECT a.rowid as id, a.email as email, null as fk_contact, ";
|
||||||
$sql.= " a.lastname, a.firstname,";
|
$sql.= " a.lastname, a.firstname,";
|
||||||
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
|
$sql.= " a.datefin, a.civility as civility_id, a.login, a.societe"; // Other fields
|
||||||
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a";
|
$sql.= " FROM ".MAIN_DB_PREFIX."adherent as a, ".MAIN_DB_PREFIX."adherent_type as ta";
|
||||||
$sql.= " WHERE a.email <> ''"; // Note that null != '' is false
|
$sql.= " WHERE a.email <> ''"; // Note that null != '' is false
|
||||||
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
$sql.= " AND a.email NOT IN (SELECT email FROM ".MAIN_DB_PREFIX."mailing_cibles WHERE fk_mailing=".$mailing_id.")";
|
||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '-1') $sql.= " AND a.statut=-1";
|
||||||
@ -181,6 +211,8 @@ class mailing_fraise extends MailingTargets
|
|||||||
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
if (isset($_POST["filter"]) && $_POST["filter"] == '0') $sql.= " AND a.statut=0";
|
||||||
if ($dateendsubscriptionafter > 0) $sql.=" AND datefin > '".$this->db->idate($dateendsubscriptionafter)."'";
|
if ($dateendsubscriptionafter > 0) $sql.=" AND datefin > '".$this->db->idate($dateendsubscriptionafter)."'";
|
||||||
if ($dateendsubscriptionbefore > 0) $sql.=" AND datefin < '".$this->db->idate($dateendsubscriptionbefore)."'";
|
if ($dateendsubscriptionbefore > 0) $sql.=" AND datefin < '".$this->db->idate($dateendsubscriptionbefore)."'";
|
||||||
|
$sql.= " AND a.fk_adherent_type = ta.rowid";
|
||||||
|
if ($_POST['filter']) $sql.= " AND ta.rowid='".$_POST['filter']."'";
|
||||||
$sql.= " ORDER BY a.email";
|
$sql.= " ORDER BY a.email";
|
||||||
//print $sql;
|
//print $sql;
|
||||||
|
|
||||||
@ -233,4 +265,3 @@ class mailing_fraise extends MailingTargets
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -6,6 +6,7 @@
|
|||||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||||
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
* Copyright (C) 2014-2015 Ferran Marcet <fmarcet@2byte.es>
|
||||||
* Copyright (C) 201 Charlie Benke <charlies@patas-monkey.com>
|
* Copyright (C) 201 Charlie Benke <charlies@patas-monkey.com>
|
||||||
|
* Copyright (C) 2015 Abbes Bahfir <bafbes@gmail.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -466,7 +467,7 @@ if (empty($reshook))
|
|||||||
// Add line
|
// Add line
|
||||||
else if ($action == "addline" && $user->rights->ficheinter->creer)
|
else if ($action == "addline" && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
if (!GETPOST('np_desc'))
|
if (!GETPOST('np_desc') && empty($conf->global->FICHINTER_EMPTY_LINE_DESC) )
|
||||||
{
|
{
|
||||||
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'</div>';
|
$mesg='<div class="error">'.$langs->trans("ErrorFieldRequired",$langs->transnoentitiesnoconv("Description")).'</div>';
|
||||||
$error++;
|
$error++;
|
||||||
@ -1566,12 +1567,14 @@ else if ($id > 0 || ! empty($ref))
|
|||||||
|
|
||||||
$var=true;
|
$var=true;
|
||||||
|
|
||||||
print '<tr '.$bcnd[$var].">\n";
|
print '<tr '.$bcnd[$var] . ">\n";
|
||||||
print '<td>';
|
print '<td>';
|
||||||
// editeur wysiwyg
|
// editeur wysiwyg
|
||||||
require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
if (empty($conf->global->FICHINTER_EMPTY_LINE_DESC)) {
|
||||||
$doleditor=new DolEditor('np_desc',GETPOST('np_desc','alpha'),'',100,'dolibarr_details','',false,true,$conf->global->FCKEDITOR_ENABLE_DETAILS,ROWS_2,70);
|
require_once DOL_DOCUMENT_ROOT . '/core/class/doleditor.class.php';
|
||||||
|
$doleditor = new DolEditor('np_desc', GETPOST('np_desc', 'alpha'), '', 100, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_DETAILS, ROWS_2, 70);
|
||||||
$doleditor->Create();
|
$doleditor->Create();
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Date intervention
|
// Date intervention
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user