diff --git a/htdocs/accountancy/bookkeeping/listbysubaccount.php b/htdocs/accountancy/bookkeeping/listbysubaccount.php
index 129e695de3c..43d4acf343f 100644
--- a/htdocs/accountancy/bookkeeping/listbysubaccount.php
+++ b/htdocs/accountancy/bookkeeping/listbysubaccount.php
@@ -682,7 +682,7 @@ while ($i < min($num, $limit)) {
print "
";
print '| ';
if ($line->subledger_account != "" && $line->subledger_account != '-1') {
- print $object->get_compte_desc($line->numero_compte).' : '.length_accounta($line->subledger_account);
+ print $line->subledger_label.' : '.length_accounta($line->subledger_account);
} else {
// Should not happen: subledger account must be null or a non empty value
print ''.$langs->trans("Unknown");
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 1a6d99261bd..5dc660adb9b 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -8,6 +8,7 @@
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2015 Raphaël Doursenaud
* Copyright (C) 2018 Nicolas ZABOURI
+ * Copyright (C) 2021 Frédéric France
*
* 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
@@ -246,6 +247,7 @@ if ($action == 'install') {
if ($action == 'set' && $user->admin) {
$resarray = activateModule($value);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
if (!empty($resarray['errors'])) {
setEventMessages('', $resarray['errors'], 'errors');
} else {
@@ -269,6 +271,7 @@ if ($action == 'set' && $user->admin) {
exit;
} elseif ($action == 'reset' && $user->admin && GETPOST('confirm') == 'yes') {
$result = unActivateModule($value);
+ dolibarr_set_const($db, "MAIN_IHM_PARAMS_REV", (int) $conf->global->MAIN_IHM_PARAMS_REV + 1, 'chaine', 0, '', $conf->entity);
if ($result) {
setEventMessages($result, null, 'errors');
}
diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 3cec6c19789..23c220d43df 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -569,90 +569,194 @@ class FormTicket
* @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 ( Do not use any of the other params)
* @return void
*/
- public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
+ public function selectGroupTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '', $use_multilevel = 0)
{
global $langs, $user;
- $ticketstat = new Ticket($this->db);
+ if ($use_multilevel == 0) {
+ $ticketstat = new Ticket($this->db);
- dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
+ dol_syslog(get_class($this)."::selectCategoryTickets ".$selected.", ".$htmlname.", ".$filtertype.", ".$format, LOG_DEBUG);
- $ticketstat->loadCacheCategoriesTickets();
+ $ticketstat->loadCacheCategoriesTickets();
- print '';
+ if ($user->admin && !$noadmininfo) {
+ print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ }
- print ajax_combobox('select'.$htmlname);
+ print ajax_combobox('select'.$htmlname);
+ } else {
+ $groupticket=GETPOST('groupticket', 'aZ09');
+ $groupticketchild=GETPOST('groupticket_child', 'aZ09');
+ $arraycodenotparent[] = "";
+ $stringtoprint = ''.$langs->trans("GroupOfTicket").' ';
+ $stringtoprint .= '';
+ $stringtoprint .= '';
+
+ $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ";
+ $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.public = 1";
+ $sql .= " AND ctc.active = 1";
+ $sql .= " AND ctc.fk_parent = 0";
+ $sql .= $this->db->order('ctc.pos', 'ASC');
+ $resql = $this->db->query($sql);
+ if ($resql) {
+ $num_rows = $this->db->num_rows($resql);
+ $i = 0;
+ while ($i < $num_rows) {
+ $obj = $this->db->fetch_object($resql);
+ if ($obj) {
+ $grouprowid = $obj->rowid;
+ $groupvalue = $obj->code;
+ $grouplabel = $obj->label;
+ $isparent = $obj->isparent;
+ $iselected = $groupticket == $obj->code ?'selected':'';
+ $stringtoprint .= '';
+ if ($isparent == 'NOTPARENT') {
+ $arraycodenotparent[] = $groupvalue;
+ }
+ }
+ $i++;
+ }
+ } else {
+ dol_print_error($this->db);
+ }
+ if ($num_rows == 1) {
+ return '';
+ }
+ $stringtoprint .= ' ';
+
+ $stringtoprint .= '';
+ $stringtoprint .= '';
+
+ $sql = "SELECT ctc.rowid, ctc.code, ctc.label, ctc.fk_parent, ctcjoin.code as codefather";
+ $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.public = 1";
+ $sql .= " AND ctc.active = 1";
+ $sql .= " AND ctc.fk_parent <> 0";
+ $sql .= $this->db->order('ctc.pos', 'ASC');
+ $resql = $this->db->query($sql);
+ if ($resql) {
+ $num_rows = $this->db->num_rows($resql);
+ $i = 0;
+ while ($i < $num_rows) {
+ $obj = $this->db->fetch_object($resql);
+ if ($obj) {
+ $grouprowid = $obj->rowid;
+ $groupvalue = $obj->code;
+ $grouplabel = $obj->label;
+ $fatherid = $obj->fk_parent;
+ $groupcodefather = $obj->codefather;
+ $iselected = $groupticketchild == $obj->code ?'selected':'';
+ $stringtoprint .= '';
+ $tabscript[] = 'if($("#groupticket")[0].value == "'.dol_escape_js($groupcodefather).'"){
+ $(".groupticket_'.dol_escape_htmltag($fatherid).'_child").show()
+ }else{
+ $(".groupticket_'.dol_escape_htmltag($fatherid).'_child").hide()
+ }';
+ }
+ $i++;
+ }
+ } else {
+ dol_print_error($this->db);
+ }
+ $stringtoprint .='';
+
+ $stringtoprint .='';
+ return $stringtoprint;
+ }
}
/**
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index d5ff9bc229f..44a712969c1 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -70,8 +70,6 @@ $socid = GETPOST('socid', 'int');
$projectid = GETPOST('projectid', 'int');
$cancel = GETPOST('cancel', 'alpha');
$lineid = GETPOST('lineid', 'int');
-
-$lineid = GETPOST('lineid', 'int');
$origin = GETPOST('origin', 'alpha');
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index a8a4cb63258..622c494d095 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1791,8 +1791,8 @@ if (!empty($conf->projet->enabled)) {
$now = dol_now();
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card');
-$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
-llxHeader('', $title, $helpurl);
+$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
+llxHeader('', $title, $help_url);
// Mode creation
if ($action == 'create') {
diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php
index f411d70af25..ed137fd5d86 100644
--- a/htdocs/fourn/product/list.php
+++ b/htdocs/fourn/product/list.php
@@ -121,7 +121,7 @@ $form = new Form($db);
$productstatic = new Product($db);
$companystatic = new Societe($db);
-$title = $langs->trans("ProductsAndServices");
+$title = $langs->trans('Supplier')." - ".$langs->trans('ProductsAndServices');
if ($fourn_id) {
$supplier = new Fournisseur($db);
diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql
index 677447f1af2..1e2e8b69c39 100644
--- a/htdocs/install/mysql/data/llx_00_c_country.sql
+++ b/htdocs/install/mysql/data/llx_00_c_country.sql
@@ -216,21 +216,21 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (18
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (184,'PL','POL','Pologne',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (185,'PR','PRI','Puerto Rico',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (186,'QA','QAT','Qatar',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Roumanie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Romania',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (189,'RW','RWA','Rwanda',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Sainte-Hélène',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint-Christophe-et-Niévès',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Sainte-Lucie',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint-Pierre-et-Miquelon',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Saint Helena',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint Kitts and Nevis',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Saint Lucia',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint Pierre and Miquelon',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint Vincent and the Grenadines',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (195,'WS','WSM','Samoa',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','Saint-Marin',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Sao Tomé-et-Principe',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','San Marino ',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Saint Thomas and Prince',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbia',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (199,'SC','SYC','Seychelles',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (200,'SL','SLE','Sierra Leone',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovaquie',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovénie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovakia',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovenia',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (203,'SB','SLB','Iles Salomon',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (204,'SO','SOM','Somalie',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (205,'ZA','ZAF','South Africa',1,0);
diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php
index 5b19288deff..820ad4d38bb 100644
--- a/htdocs/product/stock/productlot_document.php
+++ b/htdocs/product/stock/productlot_document.php
@@ -94,7 +94,9 @@ $usercanread = $user->rights->produit->lire;
$usercancreate = $user->rights->produit->creer;
$usercandelete = $user->rights->produit->supprimer;
-$upload_dir = $conf->productbatch->multidir_output[$conf->entity];
+if (empty($upload_dir)) {
+ $upload_dir = $conf->productbatch->multidir_output[$conf->entity];
+}
$permissiontoread = $usercanread;
$permissiontoadd = $usercancreate;
|