';
print ''.$obj->lang.' '."\n";
- print ''.$obj->transkey.' '."\n";
+ print '';
+ if ($action == 'edit' && $obj->rowid == GETPOST('rowid', 'int')) {
+ print ' ';
+ } else {
+ print $obj->transkey;
+ }
+ print ' '."\n";
// Value
print '';
diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php
index e6ae5c78ae5..de8c87bcd43 100644
--- a/htdocs/bom/class/bom.class.php
+++ b/htdocs/bom/class/bom.class.php
@@ -946,7 +946,7 @@ class BOM extends CommonObject
$this->lines = array();
$objectline = new BOMLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.$this->id));
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_bom = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php
index a06f1cd3e73..ac6bad50e41 100644
--- a/htdocs/core/class/html.formcompany.class.php
+++ b/htdocs/core/class/html.formcompany.class.php
@@ -781,7 +781,7 @@ class FormCompany extends Form
$out .= '';
if ($showempty) {
- $out .= ' ';
+ $out .= ' ';
}
foreach ($lesTypes as $key => $value) {
$out .= 'global->SOCIETE_DISABLE_PROSPECTS) && !empty($conf->global->SOCIETE_DISABLE_CUSTOMERS) && empty($conf->fournisseur->enabled)) {
return '' ;
@@ -1015,8 +1015,14 @@ class FormCompany extends Form
$out = '';
if ($typeinput == 'form') {
- if ($selected == '' || $selected == '-1') {
- $out .= ' ';
+ if ($allowempty || ($selected == '' || $selected == '-1')) {
+ $out .= '';
+ if (is_numeric($allowempty)) {
+ $out .= ' ';
+ } else {
+ $out .= $langs->trans($allowempty);
+ }
+ $out .= ' ';
}
if (empty($conf->global->SOCIETE_DISABLE_PROSPECTS)) {
$out .= ''.$langs->trans('Prospect').' ';
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index d486805cf46..4c4fd764e57 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -589,23 +589,29 @@ class FormTicket
/**
* Return html list of ticket anaytic codes
*
- * @param string $selected Id categorie pre-selectionnée
- * @param string $htmlname Name of select component
- * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users.
- * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
- * @param int $empty 1=peut etre vide, 0 sinon
- * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
- * @param int $maxlength Max length of label
- * @param string $morecss More CSS
- * @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
+ * @param string $selected Id categorie pre-selectionnée
+ * @param string $htmlname Name of select component
+ * @param string $filtertype To filter on some properties in llx_c_ticket_category ('public = 1'). This parameter must not come from input of users.
+ * @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
+ * @param int $empty 1=peut etre vide, 0 sinon
+ * @param int $noadmininfo 0=Add admin info, 1=Disable admin info
+ * @param int $maxlength Max length of label
+ * @param string $morecss More CSS
+ * @param int $use_multilevel If > 0 create a multilevel select which use $htmlname example: $use_multilevel = 1 permit to have 2 select boxes.
+ * @param Translate $outputlangs Output lnaguage
* @return void
*/
- public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0)
+ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0, $outputlangs = null)
{
- global $langs, $user;
+ global $conf, $langs, $user;
dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
+ if (empty($outputlangs)) {
+ $outputlangs = $langs;
+ }
+ $outputlangs->load("ticket");
+
$ticketstat = new Ticket($this->db);
$ticketstat->loadCacheCategoriesTickets();
@@ -629,6 +635,13 @@ class FormTicket
continue;
}
+ $label = ($arraycategories['label'] != '-' ? $arraycategories['label'] : '');
+ if ($outputlangs->trans("TicketCategoryShort".$arraycategories['code']) != ("TicketCategoryShort".$arraycategories['code'])) {
+ $label = $outputlangs->trans("TicketCategoryShort".$arraycategories['code']);
+ } elseif ($outputlangs->trans($arraycategories['code']) != $arraycategories['code']) {
+ $label = $outputlangs->trans($arraycategories['code']);
+ }
+
if ($format == 0) {
print '';
if ($format == 0) {
- $value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
+ $value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
}
if ($format == 1) {
@@ -665,7 +678,7 @@ class FormTicket
}
if ($format == 2) {
- $value = ($maxlength ? dol_trunc($arraycategories['label'], $maxlength) : $arraycategories['label']);
+ $value = ($maxlength ? dol_trunc($label, $maxlength) : $label);
}
if ($format == 3) {
@@ -691,15 +704,16 @@ class FormTicket
$stringtoprint .= '';
$stringtoprint .= ' ';
- $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ";
+ $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ";
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
- $sql .= " WHERE ctc.active > 0";
+ $sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
if ($filtertype == 'public=1') {
$sql .= " AND ctc.public = 1";
}
$sql .= " AND ctc.fk_parent = 0";
$sql .= $this->db->order('ctc.pos', 'ASC');
+
$resql = $this->db->query($sql);
if ($resql) {
$num_rows_level0 = $this->db->num_rows($resql);
@@ -707,23 +721,31 @@ class FormTicket
while ($i < $num_rows_level0) {
$obj = $this->db->fetch_object($resql);
if ($obj) {
+ $label = ($obj->label != '-' ? $obj->label : '');
+ if ($outputlangs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code)) {
+ $label = $outputlangs->trans("TicketCategoryShort".$obj->code);
+ } elseif ($outputlangs->trans($obj->code) != $obj->code) {
+ $label = $outputlangs->trans($obj->code);
+ }
+
$grouprowid = $obj->rowid;
$groupvalue = $obj->code;
- $grouplabel = $obj->label;
+ $grouplabel = $label;
+
$isparent = $obj->isparent;
$iselected = $groupticket == $obj->code ?'selected':'';
$stringtoprint .= ''.dol_escape_htmltag($grouplabel).' ';
if ($isparent == 'NOTPARENT') {
$arraycodenotparent[] = $groupvalue;
}
- $arrayidused[]=$grouprowid;
+ $arrayidused[] = $grouprowid;
}
$i++;
}
} else {
dol_print_error($this->db);
}
- if ($num_rows_level0 == 1) {
+ if (count($arrayidused) == 1) {
return ' ';
} else {
$stringtoprint .= ' ';
@@ -737,11 +759,11 @@ class FormTicket
$stringtoprint .= '';
$stringtoprint .= ' ';
- $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctcjoin.code as codefather, ";
+ $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctc.public, ctcjoin.code as codefather, ";
$sql .= $this->db->ifsql("ctc.rowid NOT IN (SELECT ctcfather.rowid FROM llx_c_ticket_category as ctcfather JOIN llx_c_ticket_category as ctcjoin ON ctcfather.rowid = ctcjoin.fk_parent)", "'NOTPARENT'", "'PARENT'")." as isparent";
$sql .= " FROM ".MAIN_DB_PREFIX."c_ticket_category as ctc";
$sql .= " JOIN ".MAIN_DB_PREFIX."c_ticket_category as ctcjoin ON ctc.fk_parent = ctcjoin.rowid";
- $sql .= " WHERE ctc.active = 1";
+ $sql .= " WHERE ctc.active > 0 AND ctc.entity = ".((int) $conf->entity);
if ($filtertype == 'public=1') {
$sql .= " AND ctc.public = 1";
}
@@ -755,6 +777,7 @@ class FormTicket
} else {
}
$sql .= $this->db->order('ctc.pos', 'ASC');
+
$resql = $this->db->query($sql);
if ($resql) {
$num_rows = $this->db->num_rows($resql);
@@ -763,9 +786,16 @@ class FormTicket
while ($i < $num_rows) {
$obj = $this->db->fetch_object($resql);
if ($obj) {
+ $label = ($obj->label != '-' ? $obj->label : '');
+ if ($outputlangs->trans("TicketCategoryShort".$obj->code) != ("TicketCategoryShort".$obj->code)) {
+ $label = $outputlangs->trans("TicketCategoryShort".$obj->code);
+ } elseif ($outputlangs->trans($obj->code) != $obj->code) {
+ $label = $outputlangs->trans($obj->code);
+ }
+
$grouprowid = $obj->rowid;
$groupvalue = $obj->code;
- $grouplabel = $obj->label;
+ $grouplabel = $label;
$isparent = $obj->isparent;
$fatherid = $obj->fk_parent;
$arrayidused[] = $grouprowid;
diff --git a/htdocs/core/js/lib_head.js.php b/htdocs/core/js/lib_head.js.php
index 0d5905b4351..68bb8236d72 100644
--- a/htdocs/core/js/lib_head.js.php
+++ b/htdocs/core/js/lib_head.js.php
@@ -1135,7 +1135,7 @@ function price2numjs(amount) {
var res = Math.round10(amount, - rounding);
// Other solution is
// var res = dolroundjs(amount, rounding)
- console.log("res="+res)
+ console.log("price2numjs text="+amount+" return="+res);
return res;
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 0eba9dde1b5..1400dc40458 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -31,16 +31,17 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
* Prepare array with list of tabs
*
* @param Project $project Object related to tabs
+ * @param string $moreparam More param on url
* @return array Array of tabs to show
*/
-function project_prepare_head(Project $project)
+function project_prepare_head(Project $project, $moreparam = '')
{
global $db, $langs, $conf, $user;
$h = 0;
$head = array();
- $head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.$project->id;
+ $head[$h][0] = DOL_URL_ROOT.'/projet/card.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
$head[$h][1] = $langs->trans("Project");
$head[$h][2] = 'project';
$h++;
@@ -56,7 +57,7 @@ function project_prepare_head(Project $project)
$nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external'));
dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result.
}
- $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.$project->id;
+ $head[$h][0] = DOL_URL_ROOT.'/projet/contact.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
$head[$h][1] = $langs->trans("ProjectContact");
if ($nbContacts > 0) {
$head[$h][1] .= ''.$nbContacts.' ';
@@ -80,7 +81,7 @@ function project_prepare_head(Project $project)
$nbTasks = count($taskstatic->getTasksArray(0, 0, $project->id, 0, 0));
dol_setcache($cachekey, $nbTasks, 120); // If setting cache fails, this is not a problem, so we do not test result.
}
- $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.$project->id;
+ $head[$h][0] = DOL_URL_ROOT.'/projet/tasks.php?id='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
$head[$h][1] = $langs->trans("Tasks");
if ($nbTasks > 0) {
$head[$h][1] .= ''.($nbTasks).' ';
@@ -113,7 +114,7 @@ function project_prepare_head(Project $project)
}
}
- $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.urlencode($project->id);
+ $head[$h][0] = DOL_URL_ROOT.'/projet/tasks/time.php?withproject=1&projectid='.((int) $project->id).($moreparam ? '&'.$moreparam : '');
$head[$h][1] = $langs->trans("TimeSpent");
if ($nbTimeSpent > 0) {
$head[$h][1] .= '... ';
diff --git a/htdocs/core/modules/modFckeditor.class.php b/htdocs/core/modules/modFckeditor.class.php
index 94912030a56..3dfd0f233e5 100644
--- a/htdocs/core/modules/modFckeditor.class.php
+++ b/htdocs/core/modules/modFckeditor.class.php
@@ -69,12 +69,12 @@ class modFckeditor extends DolibarrModules
// Constants
$this->const = array();
- $this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWIG for description and note (except products/services)");
- $this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC", "yesno", "1", "WYSIWIG for products/services description and note");
- $this->const[2] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
- $this->const[3] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
- $this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
- $this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWIG for products details lines for all entities");
+ $this->const[0] = array("FCKEDITOR_ENABLE_SOCIETE", "yesno", "1", "WYSIWIG for description and note (except products/services)");
+ $this->const[1] = array("FCKEDITOR_ENABLE_PRODUCTDESC", "yesno", "1", "WYSIWIG for products/services description and note");
+ $this->const[2] = array("FCKEDITOR_ENABLE_MAILING", "yesno", "1", "WYSIWIG for mass emailings");
+ $this->const[3] = array("FCKEDITOR_ENABLE_DETAILS", "yesno", "1", "WYSIWIG for products details lines for all entities");
+ $this->const[4] = array("FCKEDITOR_ENABLE_USERSIGN", "yesno", "1", "WYSIWIG for user signature");
+ $this->const[5] = array("FCKEDITOR_ENABLE_MAIL", "yesno", "1", "WYSIWIG for products details lines for all entities");
$this->const[6] = array("FCKEDITOR_SKIN", "string", "moono-lisa", "Skin by default for fckeditor");
// Boxes
diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php
index 143d8d5536c..2961dea7c96 100644
--- a/htdocs/core/tpl/card_presend.tpl.php
+++ b/htdocs/core/tpl/card_presend.tpl.php
@@ -184,7 +184,7 @@ if ($action == 'presend') {
$listeuser = array();
$fuserdest = new User($db);
- $result = $fuserdest->fetchAll('ASC', 't.lastname', 0, 0, array('customsql'=>'t.statut=1 AND t.employee=1 AND t.email IS NOT NULL AND t.email<>\'\''), 'AND', true);
+ $result = $fuserdest->fetchAll('ASC', 't.lastname', 0, 0, array('customsql'=>"t.statut=1 AND t.employee=1 AND t.email IS NOT NULL AND t.email <> ''"), 'AND', true);
if ($result > 0 && is_array($fuserdest->users) && count($fuserdest->users) > 0) {
foreach ($fuserdest->users as $uuserdest) {
$listeuser[$uuserdest->id] = $uuserdest->user_get_property($uuserdest->id, 'email');
diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php
index 2115047c779..1987a5300bd 100644
--- a/htdocs/eventorganization/class/conferenceorbooth.class.php
+++ b/htdocs/eventorganization/class/conferenceorbooth.class.php
@@ -246,7 +246,7 @@ class ConferenceOrBooth extends ActionComm
$result = parent::fetch($id, $ref, $ref_ext, $email_msgid);
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.urlencode($id).'&type=conf';
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.urlencode($id).'&type=conf';
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
@@ -749,7 +749,7 @@ class ConferenceOrBooth extends ActionComm
$this->lines = array();
$objectline = new ConferenceOrBoothLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorbooth = '.$this->id));
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorbooth = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index 1fdf0012cb8..f4a4933a899 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -103,7 +103,7 @@ class ConferenceOrBoothAttendee extends CommonObject
public $fields=array(
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>'1', 'position'=>1, 'notnull'=>1, 'visible'=>0, 'noteditable'=>'1', 'index'=>1, 'css'=>'left', 'comment'=>"Id"),
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>'1', 'position'=>10, 'notnull'=>1, 'visible'=>2, 'index'=>1, 'comment'=>"Reference of object"),
- 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status=1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'maxwidth500'),
+ 'fk_soc' => array('type'=>'integer:Societe:societe/class/societe.class.php:1:status = 1 AND entity IN (__SHARED_ENTITIES__)', 'label'=>'Attendee', 'enabled'=>'1', 'position'=>50, 'notnull'=>-1, 'visible'=>1, 'index'=>1, 'help'=>"LinkToThirparty", 'picto'=>'company', 'css'=>'maxwidth500'),
'fk_actioncomm' => array('type'=>'integer:ActionComm:comm/action/class/actioncomm.class.php:1', 'label'=>'ConferenceOrBooth', 'enabled'=>'1', 'position'=>53, 'notnull'=>0, 'visible'=>0, 'index'=>1, 'picto'=>'agenda'),
'fk_project' => array('type'=>'integer:Project:projet/class/project.class.php:1', 'label'=>'Project', 'enabled'=>'1', 'position'=>54, 'notnull'=>1, 'visible'=>0, 'index'=>1, 'picto'=>'project'),
'email' => array('type'=>'mail', 'label'=>'Email', 'enabled'=>'1', 'position'=>55, 'notnull'=>1, 'visible'=>1, 'index'=>1,),
@@ -197,8 +197,10 @@ class ConferenceOrBoothAttendee extends CommonObject
if (!empty($conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT)) {
$this->fields['fk_soc']['type'] .= ' AND rowid IN (SELECT DISTINCT c.fk_soc FROM '.MAIN_DB_PREFIX.'categorie_societe as c WHERE c.fk_categorie='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_CAT.')';
}
- if ($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE!=='') {
- $this->fields['fk_soc']['type'] .= ' AND client='.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
+ if (isset($conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE)
+ && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== ''
+ && $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE !== '-1') {
+ $this->fields['fk_soc']['type'] .= ' AND client = '.(int) $conf->global->EVENTORGANIZATION_FILTERATTENDEES_TYPE;
}
// Example to show how to set values of fields definition dynamically
@@ -390,7 +392,7 @@ class ConferenceOrBoothAttendee extends CommonObject
* @param string $sortfield Sort field
* @param int $limit limit
* @param int $offset Offset
- * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...)
+ * @param array $filter Filter array. Example array('field'=>'valueforlike', 'customurl'=>...). WARNING: customerurl must be a sanitized SQL string.
* @param string $filtermode Filter mode (AND or OR)
* @return array|int int <0 if KO, array of pages if OK
*/
@@ -416,9 +418,9 @@ class ConferenceOrBoothAttendee extends CommonObject
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
- $sqlwhere[] = $key.'='.$value;
+ $sqlwhere[] = $key.'='.((int) $value);
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
- $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
+ $sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (strpos($value, '%') === false) {
@@ -949,7 +951,7 @@ class ConferenceOrBoothAttendee extends CommonObject
$this->lines = array();
$objectline = new ConferenceOrBoothAttendeeLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.$this->id));
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_conferenceorboothattendee = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php
index 0265a9ddb93..891fdc1da6e 100644
--- a/htdocs/eventorganization/conferenceorbooth_list.php
+++ b/htdocs/eventorganization/conferenceorbooth_list.php
@@ -152,7 +152,7 @@ if (!$permissiontoread) accessforbidden();
* Actions
*/
-if (preg_match('/^set/', $action) && $projectid > 0) {
+if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
$project = new Project($db);
//If "set" fields keys is in projects fields
$project_attr=preg_replace('/^set/', '', $action);
@@ -447,7 +447,7 @@ if ($projectid > 0) {
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
//print '';
print ' ';
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$project->id.'&type=global';
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$project->id.'&type=global';
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$project->id, 'md5');
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
//print '';
diff --git a/htdocs/eventorganization/conferenceorboothattendee_card.php b/htdocs/eventorganization/conferenceorboothattendee_card.php
index b1ca2172899..f10c0b694cb 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_card.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_card.php
@@ -382,7 +382,7 @@ if (!empty($withproject)) {
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
//print '';
print '
';
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global';
$encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
//print '';
@@ -496,7 +496,15 @@ if (($id || $ref) && $action == 'edit') {
// Part to show record
if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) {
- $res = $object->fetch_optionals();
+ $object->fetch_optionals();
+
+ $moreparam = '';
+ if ($withproject) {
+ $moreparam .= '&withproject=1';
+ }
+ if ($fk_project) {
+ $moreparam .= '&fk_project='.((int) $fk_project);
+ }
$head = conferenceorboothattendeePrepareHead($object);
print dol_get_fiche_head($head, 'card', $langs->trans("ConferenceOrBoothAttendee"), -1, $object->picto);
@@ -538,13 +546,13 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
// Object card
// ------------------------------------------------------------
- $linkback = '
'.$langs->trans("BackToList").' ';
+ $linkback = '
'.$langs->trans("BackToList").' ';
$morehtmlref = '
';
$morehtmlref .= '
';
- dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
+ dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref, $moreparam);
print '
';
print '
';
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 2866e05de1a..6910973b8d3 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -36,6 +36,7 @@ if ($conf->categorie->enabled) {
require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
}
+global $dolibarr_main_url_root;
// for other modules
//dol_include_once('/othermodule/class/otherobject.class.php');
@@ -158,6 +159,24 @@ if (!$permissiontoread) accessforbidden();
* Actions
*/
+if (preg_match('/^set/', $action) && $projectid > 0 && !empty($user->rights->eventorganization->write)) {
+ $project = new Project($db);
+ //If "set" fields keys is in projects fields
+ $project_attr=preg_replace('/^set/', '', $action);
+ if (array_key_exists($project_attr, $project->fields)) {
+ $result = $project->fetch($projectid);
+ if ($result < 0) {
+ setEventMessages(null, $project->errors, 'errors');
+ } else {
+ $project->{$project_attr}=GETPOST($project_attr);
+ $result=$project->update($user);
+ if ($result < 0) {
+ setEventMessages(null, $project->errors, 'errors');
+ }
+ }
+ }
+}
+
if (GETPOST('cancel', 'alpha')) {
$action = 'list';
$massaction = '';
@@ -541,7 +560,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
//print '';
print '
';
$linksuggest = $dolibarr_main_url_root.'/public/project/index.php?id='.$projectstatic->id;
- $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
+ $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
$linksuggest .= '&securekey='.urlencode($encodedsecurekey);
//print '';
//print ' ';
@@ -557,8 +576,8 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
print $langs->trans("PublicAttendeeSubscriptionGlobalPage");
//print '';
print '
';
- $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_registration.php?id='.$projectstatic->id.'&type=global';
- $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 2);
+ $link_subscription = $dolibarr_main_url_root.'/public/eventorganization/attendee_register.php?id='.$projectstatic->id.'&type=global';
+ $encodedsecurekey = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$projectstatic->id, 'md5');
$link_subscription .= '&securekey='.urlencode($encodedsecurekey);
//print '';
//print ' ';
diff --git a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
index f49bd5e49a0..3951cc25df7 100644
--- a/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
+++ b/htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php
@@ -196,7 +196,7 @@ function conferenceorboothattendeePrepareHead($object)
$h = 0;
$head = array();
- $head[$h][0] = dol_buildpath("/eventorganization/conferenceorboothattendee_card.php", 1).'?id='.$object->id.'&conforboothid='.$object->fk_actioncomm;
+ $head[$h][0] = DOL_URL_ROOT."/eventorganization/conferenceorboothattendee_card.php?id=".((int) $object->id).($object->fk_actioncomm > 0 ? '&conforboothid='.((int) $object->fk_actioncomm) : '').($object->fk_project > 0 ? '&withproject=1&fk_project='.((int) $object->fk_project) : '');
$head[$h][1] = $langs->trans("Card");
$head[$h][2] = 'card';
$h++;
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index 830a582db03..a9372564280 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -1458,8 +1458,8 @@ class Expedition extends CommonObject
}
}
- // delete batch expedition line
- if (!$error && $conf->productbatch->enabled) {
+ // delete batch expedition line (we try deletion even if module not enabled in case of the module were enabled and disabled previously)
+ if (!$error) {
if (ExpeditionLineBatch::deletefromexp($this->db, $this->id) < 0) {
$error++; $this->errors[] = "Error ".$this->db->lasterror();
}
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index 6aecff5eac0..953f5eabb2f 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -631,6 +631,12 @@ if ($resql) {
print '
';
}
+ // End date
+ if (!empty($arrayfields['cp.date_valid']['checked'])) {
+ print '';
+ print ' ';
+ }
+
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_input.tpl.php';
// Fields from hook
@@ -691,6 +697,9 @@ if ($resql) {
if (!empty($arrayfields['cp.date_fin']['checked'])) {
print_liste_field_titre($arrayfields['cp.date_fin']['label'], $_SERVER["PHP_SELF"], "cp.date_fin", "", $param, '', $sortfield, $sortorder, 'center ');
}
+ if (!empty($arrayfields['cp.date_valid']['checked'])) {
+ print_liste_field_titre($arrayfields['cp.date_valid']['label'], $_SERVER["PHP_SELF"], "cp.date_valid", "", $param, '', $sortfield, $sortorder, 'center ');
+ }
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php';
// Hook fields
@@ -820,6 +829,18 @@ if ($resql) {
$totalarray['nbfield']++;
}
}
+ if (!empty($arrayfields['cp.date_valid']['checked'])) { // date_valid is both date_valid but also date_approval
+ print '';
+ print dol_print_date($db->jdate($obj->date_valid), 'day');
+ print ' ';
+ if (!$i) $totalarray['nbfield']++;
+ }
+ /*if (!empty($arrayfields['cp.date_approve']['checked'])) {
+ print '';
+ print dol_print_date($db->jdate($obj->date_approve), 'day');
+ print ' ';
+ if (!$i) $totalarray['nbfield']++;
+ }*/
// Extra fields
include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_print_fields.tpl.php';
diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql
index 4005506e887..bce46a70e49 100644
--- a/htdocs/install/mysql/data/llx_c_email_templates.sql
+++ b/htdocs/install/mysql/data/llx_c_email_templates.sql
@@ -29,18 +29,19 @@ INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private,
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__, \n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__ \n\n \n__(Sincerely)__ __USER_SIGNATURE__',null, 1);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__, \n\n__(ThisIsContentOfSubscriptionReminderEmail)__ \n __ONLINE_PAYMENT_TEXT_AND_URL__ \n \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__, \n\n__(YourMembershipWasCanceled)__ \n \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__, \n\n__(ThisIsContentOfYourCard)__ \n__(ID)__ : __ID__ \n__(Civiliyty)__ : __MEMBER_CIVILITY__ \n__(Firstname)__ : __MEMBER_FIRSTNAME__ \n__(Lastname)__ : __MEMBER_LASTNAME__ \n__(Fullname)__ : __MEMBER_FULLNAME__ \n__(Company)__ : __MEMBER_COMPANY__ \n__(Address)__ : __MEMBER_ADDRESS__ \n__(Zip)__ : __MEMBER_ZIP__ \n__(Town)__ : __MEMBER_TOWN__ \n__(Country)__ : __MEMBER_COUNTRY__ \n__(Email)__ : __MEMBER_EMAIL__ \n__(Birthday)__ : __MEMBER_BIRTH__ \n__(Photo)__ : __MEMBER_PHOTO__ \n__(Login)__ : __MEMBER_LOGIN__ \n__(Password)__ : __MEMBER_PASSWORD__ \n__(Phone)__ : __MEMBER_PHONE__ \n__(PhonePerso)__ : __MEMBER_PHONEPRO__ \n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__ \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__, \n\n__(ThisIsContentOfYourCard)__ \n__(ID)__ : __ID__ \n__(Civility)__ : __MEMBER_CIVILITY__ \n__(Firstname)__ : __MEMBER_FIRSTNAME__ \n__(Lastname)__ : __MEMBER_LASTNAME__ \n__(Fullname)__ : __MEMBER_FULLNAME__ \n__(Company)__ : __MEMBER_COMPANY__ \n__(Address)__ : __MEMBER_ADDRESS__ \n__(Zip)__ : __MEMBER_ZIP__ \n__(Town)__ : __MEMBER_TOWN__ \n__(Country)__ : __MEMBER_COUNTRY__ \n__(Email)__ : __MEMBER_EMAIL__ \n__(Birthday)__ : __MEMBER_BIRTH__ \n__(Photo)__ : __MEMBER_PHOTO__ \n__(Login)__ : __MEMBER_LOGIN__ \n__(Phone)__ : __MEMBER_PHONE__ \n__(PhonePerso)__ : __MEMBER_PHONEPRO__ \n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__ \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
-- Recruiting
INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0, 'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__, \n\n__(YourCandidatureAnswerMessage)__ __ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n \n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
-- Event organization
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__ __(Sincerely)__ __MYCOMPANY_NAME__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__, __(OrganizationEventConfRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__, __(OrganizationEventBoothRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfBoothWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfRegistrationWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__, __(OrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__, __(OrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-- Partnership
INSERT INTO llx_c_email_templates (entity, module, type_template, label, lang, position, topic, joinfiles, content) VALUES (0, 'partnership', 'partnership_send', '(SendingEmailOnPartnershipWillSoonBeCanceled)', '', 100, '[__[MAIN_INFO_SOCIETE_NOM]__] - __(YourPartnershipWillSoonBeCanceledTopic)__', 0, '\n __(Hello)__, \n__(YourPartnershipWillSoonBeCanceledContent)__
\n \n\n \n\n __(Sincerely)__ \n __[MAIN_INFO_SOCIETE_NOM]__ \n \n');
diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
index 89d0d2d0ce1..11358781e37 100644
--- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
+++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql
@@ -267,12 +267,14 @@ INSERT INTO llx_payment_vat (rowid, fk_tva, datec, datep, amount, fk_typepaiemen
ALTER TABLE llx_tva ALTER COLUMN paye SET DEFAULT 0;
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__ __ONLINE_PAYMENT_TEXT_AND_URL__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__ __(Sincerely)__ __MYCOMPANY_NAME__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__, __(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+-- Event organization
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__, __(OrganizationEventConfRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__, __(OrganizationEventBoothRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfBoothWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfRegistrationWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__, __(OrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__, __(OrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
ALTER TABLE llx_projet ADD COLUMN accept_conference_suggestions integer DEFAULT 0;
ALTER TABLE llx_projet ADD COLUMN accept_booth_suggestions integer DEFAULT 0;
diff --git a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
index fb37c2f94d2..4ee0542109f 100644
--- a/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
+++ b/htdocs/install/mysql/migration/14.0.0-15.0.0.sql
@@ -47,6 +47,15 @@ ALTER TABLE llx_payment_salary_extrafields RENAME TO llx_salary_extrafields;
ALTER TABLE llx_salary_extrafields ADD INDEX idx_salary_extrafields (fk_object);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskConf)', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__, __(OrganizationEventConfRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailAskBooth)', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__, __(OrganizationEventBoothRequestWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+-- TODO Add message for registration only to event __ONLINE_PAYMENT_TEXT_AND_URL__
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsBooth)', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailBoothPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfBoothWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationEmailSubsEvent)', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailRegistrationPayment)__', '__(Hello)__, __(OrganizationEventPaymentOfRegistrationWasReceived)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailAttendees)', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__, __(OrganizationEventBulkMailToAttendees)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'conferenceorbooth', '', 0, null, null, '(EventOrganizationMassEmailSpeakers)', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__, __(OrganizationEventBulkMailToSpeakers)__ __(Sincerely)__ __USER_SIGNATURE__', null, '1', null);
+
+
-- v15
ALTER TABLE llx_holiday ADD COLUMN date_approve DATETIME DEFAULT NULL;
diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php
index df8044c8fc9..81eada83620 100644
--- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php
+++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php
@@ -901,7 +901,7 @@ class KnowledgeRecord extends CommonObject
$this->lines = array();
$objectline = new KnowledgeRecordLine($this->db);
- $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_knowledgerecord = '.$this->id));
+ $result = $objectline->fetchAll('ASC', 'position', 0, 0, array('customsql'=>'fk_knowledgerecord = '.((int) $this->id)));
if (is_numeric($result)) {
$this->error = $this->error;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 96d1d0a9595..26edb7f0518 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1706,8 +1706,10 @@ FreeLegalTextOnDeliveryReceipts=Free text on delivery receipts
##### FCKeditor #####
AdvancedEditor=Advanced editor
ActivateFCKeditor=Activate advanced editor for:
-FCKeditorForCompany=WYSIWIG creation/edition of elements description and note (except products/services)
-FCKeditorForProduct=WYSIWIG creation/edition of products/services description and note
+FCKeditorForNotePublic=WYSIWIG creation/edition of the field public notes of elements
+FCKeditorForNotePrivate=WYSIWIG creation/edition of the field private notes of elements
+FCKeditorForCompany=WYSIWIG creation/edition of the field description of elements (except products/services)
+FCKeditorForProduct=WYSIWIG creation/edition of the field description of products/services
FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines for all entities (proposals, orders, invoices, etc...). Warning: Using this option for this case is seriously not recommended as it can create problems with special characters and page formatting when building PDF files.
FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing)
FCKeditorForUserSignature=WYSIWIG creation/edition of user signature
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 907c597bcf1..8f941d094c7 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -32,14 +32,9 @@ PaymentEvent=Payment of event
# Admin page
#
NewRegistration=Registration
-<<<<<<< HEAD
-EventOrganizationSetup = Event Organization setup
-Settings = Settings
-=======
EventOrganizationSetup=Event Organization setup
EventOrganization=Event organization
Settings=Settings
->>>>>>> branch '14.0' of git@github.com:Dolibarr/dolibarr.git
EventOrganizationSetupPage = Event Organization setup page
EVENTORGANIZATION_TASK_LABEL = Label of tasks to create automatically when project is validated
EVENTORGANIZATION_TASK_LABELTooltip = When you validate an organized event, some tasks can be automatically created in the project For example: Send Call for Conference Send Call for Booth Receive call for conferences Receive call for Booth Open subscriptions to events for attendees Send remind of event to speakers Send remind of event to Booth hoster Send remind of event to attendees
@@ -47,8 +42,8 @@ EVENTORGANIZATION_CATEG_THIRDPARTY_CONF = Category to add to third-parties autom
EVENTORGANIZATION_CATEG_THIRDPARTY_BOOTH = Category to add to third-parties automatically created when they suggests a booth
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_CONF = Template of email to send after receiving a suggestion of a conference.
EVENTORGANIZATION_TEMPLATE_EMAIL_ASK_BOOTH = Template of email to send after receiving a suggestion of a booth.
-EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a subscription to a booth has been paid.
-EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a subscription to an event has been paid.
+EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_BOOTH = Template of email to send after a registration to a booth has been paid.
+EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT = Template of email to send after a registration to an event has been paid.
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_SPEAKER = Template of email of massaction to attendes
EVENTORGANIZATION_TEMPLATE_EMAIL_BULK_ATTENDES = Template of email of massaction to speakers
EVENTORGANIZATION_FILTERATTENDEES_CAT = Filter thirdpartie's select list in attendees creation card/form with category
@@ -62,7 +57,7 @@ ManageOrganizeEvent = Manage the organization of an event
ConferenceOrBooth = Conference Or Booth
ConferenceOrBoothTab = Conference Or Booth
AmountPaid = Amount paid
-DateOfRegistration = Date of subscription
+DateOfRegistration = Date of registration
ConferenceOrBoothAttendee = Conference Or Booth Attendee
#
@@ -72,8 +67,8 @@ YourOrganizationEventConfRequestWasReceived = Your request for conference was re
YourOrganizationEventBoothRequestWasReceived = Your request for booth was received
EventOrganizationEmailAskConf = Request for conference
EventOrganizationEmailAskBooth = Request for booth
-EventOrganizationEmailSubsBooth = Subscription for booth
-EventOrganizationEmailSubsEvent = Subscription for an event
+EventOrganizationEmailBoothPayment = Payment of your booth
+EventOrganizationEmailRegistrationPayment = Registration for an event
EventOrganizationMassEmailAttendees = Communication to attendees
EventOrganizationMassEmailSpeakers = Communication to speakers
@@ -134,6 +129,14 @@ ConferenceIsNotConfirmed=Registration not available, conference is not confirmed
DateMustBeBeforeThan=%s must be before %s
DateMustBeAfterThan=%s must be after %s
+NewSubscription=Registration
+OrganizationEventConfRequestWasReceived=Your suggestion for a conference has been received
+OrganizationEventBoothRequestWasReceived=Your request for a booth has been received
+OrganizationEventPaymentOfBoothWasReceived=Your payment for your booth has been recorded
+OrganizationEventPaymentOfRegistrationWasReceived=Your payment for your event registration has been recorded
+OrganizationEventBulkMailToAttendees=This is a remind about your participation in the event as an attendee
+OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker
+
#
# Vote page
#
@@ -145,17 +148,10 @@ VoteOk = Your vote has been accepted.
AlreadyVoted = You have already voted for this event.
VoteError = An error has occurred during the vote, please try again.
-#
-# SubscriptionOk page
-#
-SubscriptionOk = Your subscription has been validated
-#
-# Subscription validation mail
-#
+SubscriptionOk = Your registration has been validated
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
-#
-# Payment page
-#
Attendee = Attendee
PaymentConferenceAttendee = Conference attendee payment
PaymentBoothLocation = Booth location payment
+
+RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email %s
diff --git a/htdocs/langs/en_US/margins.lang b/htdocs/langs/en_US/margins.lang
index ad5406409b4..a91b139ec7b 100644
--- a/htdocs/langs/en_US/margins.lang
+++ b/htdocs/langs/en_US/margins.lang
@@ -22,7 +22,7 @@ ProductService=Product or Service
AllProducts=All products and services
ChooseProduct/Service=Choose product or service
ForceBuyingPriceIfNull=Force buying/cost price to selling price if not defined
-ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0 on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100% if no default value can be found).
+ForceBuyingPriceIfNullDetails=If buying/cost price not provided when we add a new line, and this option is "ON", the margin will be 0%% on the new line (buying/cost price = selling price). If this option is "OFF" (recommended), margin will be equal to the value suggested by default (and may be 100%% if no default value can be found).
MARGIN_METHODE_FOR_DISCOUNT=Margin method for global discounts
UseDiscountAsProduct=As a product
UseDiscountAsService=As a service
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 6243e98fdc9..c688e59af4d 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
TicketSeverityShortHIGH=High
TicketSeverityShortBLOCKING=Critical, Blocking
+TicketCategoryShortOTHER=Other
+
ErrorBadEmailAddress=Field '%s' incorrect
MenuTicketMyAssign=My tickets
MenuTicketMyAssignNonClosed=My open tickets
diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang
index b166e963caf..f8000073c8d 100644
--- a/htdocs/langs/fr_FR/ticket.lang
+++ b/htdocs/langs/fr_FR/ticket.lang
@@ -45,6 +45,8 @@ TicketSeverityShortNORMAL=Normal
TicketSeverityShortHIGH=Élevé
TicketSeverityShortBLOCKING=Critique, bloquant
+TicketCategoryShortOTHER=Autre
+
ErrorBadEmailAddress=Champ '%s' incorrect
MenuTicketMyAssign=Mes tickets
MenuTicketMyAssignNonClosed=Mes tickets ouverts
diff --git a/htdocs/margin/admin/margin.php b/htdocs/margin/admin/margin.php
index 2c224678f60..939b084fe41 100644
--- a/htdocs/margin/admin/margin.php
+++ b/htdocs/margin/admin/margin.php
@@ -208,7 +208,7 @@ $methods = array(
print '