diff --git a/htdocs/accountancy/customer/list.php b/htdocs/accountancy/customer/list.php
index a5506fc6ebb..de160fe2b93 100644
--- a/htdocs/accountancy/customer/list.php
+++ b/htdocs/accountancy/customer/list.php
@@ -87,6 +87,13 @@ if (!$sortorder) {
}
}
+// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
+$hookmanager->initHooks(array('accountancycustomerlist'));
+
+$formaccounting = new FormAccounting($db);
+
+$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
+
// Security check
if (empty($conf->accounting->enabled)) {
accessforbidden();
@@ -98,13 +105,6 @@ if (empty($user->rights->accounting->mouvements->lire)) {
accessforbidden();
}
-// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
-$hookmanager->initHooks(array('accountancycustomerlist'));
-
-$formaccounting = new FormAccounting($db);
-
-$chartaccountcode = dol_getIdFromCode($db, $conf->global->CHARTOFACCOUNTS, 'accounting_system', 'rowid', 'pcg_version');
-
/*
* Actions
@@ -168,7 +168,7 @@ if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
$monCompte = GETPOST('codeventil'.$monId);
if ($monCompte <= 0) {
- $msg .= '
';
print_liste_field_titre("LineId", $_SERVER["PHP_SELF"], "l.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Invoice", $_SERVER["PHP_SELF"], "f.ref", "", $param, '', $sortfield, $sortorder);
- //print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
+ print_liste_field_titre("InvoiceLabel", $_SERVER["PHP_SELF"], "f.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Date", $_SERVER["PHP_SELF"], "f.datef, f.ref, l.rowid", "", $param, '', $sortfield, $sortorder, 'center ');
print_liste_field_titre("ProductRef", $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder);
//print_liste_field_titre("ProductLabel", $_SERVER["PHP_SELF"], "p.label", "", $param, '', $sortfield, $sortorder);
diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php
index 24ee3afe218..1dcd17ea074 100644
--- a/htdocs/accountancy/supplier/list.php
+++ b/htdocs/accountancy/supplier/list.php
@@ -53,8 +53,8 @@ $mesCasesCochees = GETPOST('toselect', 'array');
// Search Getpost
$search_societe = GETPOST('search_societe', 'alpha');
$search_lineid = GETPOST('search_lineid', 'int');
-$search_invoice = GETPOST('search_invoice', 'alpha');
$search_ref = GETPOST('search_ref', 'alpha');
+$search_invoice = GETPOST('search_invoice', 'alpha');
$search_label = GETPOST('search_label', 'alpha');
$search_desc = GETPOST('search_desc', 'alpha');
$search_amount = GETPOST('search_amount', 'alpha');
@@ -156,7 +156,7 @@ if (empty($reshook)) {
}
-if ($massaction == 'ventil') {
+if ($massaction == 'ventil' && $user->rights->accounting->bind->write) {
$msg = '';
//print '' . $langs->trans("Processing") . '...
';
@@ -183,7 +183,7 @@ if ($massaction == 'ventil') {
$accountventilated = new AccountingAccount($db);
$accountventilated->fetch($monCompte, '', 1);
- dol_syslog('accountancy/supplier/list.php:: sql='.$sql, LOG_DEBUG);
+ dol_syslog('accountancy/supplier/list.php sql='.$sql, LOG_DEBUG);
if ($db->query($sql)) {
$msg .= ''.$langs->trans("Lineofinvoice").' '.$monId.' - '.$langs->trans("VentilatedinAccount").' : '.length_accountg($accountventilated->account_number).'
';
$ok++;
@@ -249,6 +249,7 @@ if (!empty($conf->global->MAIN_COMPANY_PERENTITY_SHARED)) {
}
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as co ON co.rowid = s.fk_pays ";
$sql .= " INNER JOIN ".MAIN_DB_PREFIX."facture_fourn_det as l ON f.rowid = l.fk_facture_fourn";
+$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = l.fk_product";
if (!empty($conf->global->MAIN_PRODUCT_PERENTITY_SHARED)) {
$sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product_perentity as pa ON pa.fk_product = p.rowid AND pa.entity = " . ((int) $conf->entity);
}
@@ -274,12 +275,12 @@ if ($search_lineid) {
if (strlen(trim($search_invoice))) {
$sql .= natural_search("f.ref", $search_invoice);
}
-if (strlen(trim($search_label))) {
- $sql .= natural_search("f.libelle", $search_label);
-}
if (strlen(trim($search_ref))) {
$sql .= natural_search("p.ref", $search_ref);
}
+if (strlen(trim($search_label))) {
+ $sql .= natural_search("f.libelle", $search_label);
+}
if (strlen(trim($search_desc))) {
$sql .= natural_search("l.description", $search_desc);
}
@@ -344,9 +345,14 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST)) {
$sql .= $db->plimit($limit + 1, $offset);
-dol_syslog('accountancy/supplier/list.php');
-$result = $db->query($sql);
+dol_syslog('accountancy/supplier/list.php', LOG_DEBUG);
+// MAX_JOIN_SIZE can be very low (ex: 300000) on some limited configurations (ex: https://www.online.net/fr/hosting/online-perso)
+// This big SELECT command may exceed the MAX_JOIN_SIZE limit => Therefore we use SQL_BIG_SELECTS=1 to disable the MAX_JOIN_SIZE security
+if ($db->type == 'mysqli') {
+ $db->query("SET SQL_BIG_SELECTS=1");
+}
+$result = $db->query($sql);
if ($result) {
$num_lines = $db->num_rows($result);
$i = 0;
@@ -447,8 +453,8 @@ if ($result) {
print '';
print ' | ';
print ' | ';
- print ' | ';
- print ' | ';
+ print ' | ';
+ print ' | ';
print ' | ';
print '';
print $form->select_country($search_country, 'search_country', '', 0, 'maxwidth125', 'code2', 1, 0, 1);
@@ -528,7 +534,7 @@ if ($result) {
$facturefourn_static->ref = $objp->ref;
$facturefourn_static->id = $objp->facid;
- $facturefourn_static->type = $objp->type;
+ $facturefourn_static->type = $objp->ftype;
$facturefourn_static->label = $objp->invoice_label;
$code_buy_p_notset = '';
diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php
index 6c2812d4d27..33e4fabe2aa 100644
--- a/htdocs/comm/action/index.php
+++ b/htdocs/comm/action/index.php
@@ -354,15 +354,13 @@ if ($action == 'show_day') {
$next_year = $next['year'];
$next_month = $next['month'];
$next_day = $next['day'];
-
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $prev_day, $prev_year, 'tzuserrel');
$lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'tzuserrel');
}
//print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day;
//print 'xx'.$next_year.'-'.$next_month.'-'.$next_day;
-//print dol_print_date($firstdaytoshow,'day');
-//print dol_print_date($lastdaytoshow,'day');
+//print dol_print_date($firstdaytoshow,'dayhour').' '.dol_print_date($lastdaytoshow,'dayhour');
/*$title = $langs->trans("DoneAndToDoActions");
if ($status == 'done') $title = $langs->trans("DoneActions");
@@ -779,6 +777,7 @@ if ($resql) {
$event->datep = $db->jdate($obj->datep); // datep and datef are GMT date. Example: 1970-01-01 01:00:00, jdate will return 0 if TZ of PHP server is Europe/Berlin
$event->datef = $db->jdate($obj->datep2);
+ //$event->datep_formated_gmt = dol_print_date($event->datep, 'dayhour', 'gmt');
//var_dump($obj->datep);
//var_dump($event->datep);
@@ -837,14 +836,15 @@ if ($resql) {
$annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
$mois = dol_print_date($daycursor, '%m', 'tzuserrel');
$jour = dol_print_date($daycursor, '%d', 'tzuserrel');
- //var_dump(dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt'));
+ //var_dump(dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt')); // Hour at greenwich
//var_dump($annee.'-'.$mois.'-'.$jour);
// Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0;
$daykey = dol_mktime(0, 0, 0, $mois, $jour, $annee, 'gmt');
do {
- //if ($event->id==408) print 'daykey='.$daykey.' '.$event->datep.' '.$event->datef.' ';
+ //if ($event->id==408)
+ //print 'daykey='.$daykey.' '.dol_print_date($daykey, 'dayhour', 'gmt').' '.$event->datep.' '.$event->datef.' ';
$eventarray[$daykey][] = $event;
$j++;
@@ -863,6 +863,7 @@ if ($resql) {
} else {
dol_print_error($db);
}
+//var_dump($eventarray);
// BIRTHDATES CALENDAR
// Complete $eventarray with birthdates
@@ -946,7 +947,7 @@ $sql .= " AND (x.statut = '2' OR x.statut = '3')"; // Show only public leaves (2
if ($action == 'show_day') {
// Request only leaves for the current selected day
- $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date wihout time
+ $sql .= " AND '".$db->escape($year)."-".$db->escape($month)."-".$db->escape($day)."' BETWEEN x.date_debut AND x.date_fin"; // date_debut and date_fin are date without time
} elseif ($action == 'show_week') {
// TODO: Add filter to reduce database request
} elseif ($action == 'show_month') {
@@ -1641,6 +1642,8 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
$dateint = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
+ //print 'show_day_events day='.$day.' month='.$month.' year='.$year.' dateint='.$dateint;
+
print "\n";
$curtime = dol_mktime(0, 0, 0, $month, $day, $year);
@@ -1693,10 +1696,12 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
include_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
$tmpholiday = new Holiday($db);
- foreach ($eventarray as $daykey => $notused) {
- $annee = dol_print_date($daykey, '%Y');
- $mois = dol_print_date($daykey, '%m');
- $jour = dol_print_date($daykey, '%d');
+ foreach ($eventarray as $daykey => $notused) { // daykey is the 'YYYYMMDD' to show according to user
+ $annee = dol_print_date($daykey, '%Y', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
+ $mois = dol_print_date($daykey, '%m', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
+ $jour = dol_print_date($daykey, '%d', 'gmt'); // We use gmt because we want the value represented by string 'YYYYMMDD'
+
+ //print 'event daykey='.$daykey.' dol_print_date(daykey)='.dol_print_date($daykey, 'dayhour', 'gmt').' jour='.$jour.' mois='.$mois.' annee='.$annee." \n";
if ($day == $jour && $month == $mois && $year == $annee) {
foreach ($eventarray[$daykey] as $index => $event) {
diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index 9ac22d30e1f..c161551d3e3 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -185,9 +185,9 @@ if ($action == 'create') {
print '';
print '| '.$langs->trans("Ref").' | '.$chid.' | ';
+ print '| '.$langs->trans("Label").' | '.$charge->label." | \n";
print '| '.$langs->trans("Type")." | ".$charge->type_label." | \n";
print '| '.$langs->trans("Period")." | ".dol_print_date($charge->periode, 'day')." | \n";
- print '| '.$langs->trans("Label").' | '.$charge->label." | \n";
/*print '| '.$langs->trans("DateDue")." | ".dol_print_date($charge->date_ech,'day')." | \n";
print '| '.$langs->trans("Amount")." | ".price($charge->amount,0,$outputlangs,1,-1,-1,$conf->currency).' | ';*/
@@ -218,6 +218,7 @@ if ($action == 'create') {
print '';
print '| '.$langs->trans('AccountToDebit').' | ';
print '';
+ print img_picto('', 'bank_account', 'class="pictofixedwidth"');
$form->select_comptes(GETPOSTISSET("accountid") ? GETPOST("accountid", 'int') : $charge->accountid, "accountid", 0, '', 2); // Show opend bank account list
print ' | ';
diff --git a/htdocs/core/lib/usergroups.lib.php b/htdocs/core/lib/usergroups.lib.php
index 3188a9b39e2..93469e9e3c7 100644
--- a/htdocs/core/lib/usergroups.lib.php
+++ b/htdocs/core/lib/usergroups.lib.php
@@ -409,9 +409,9 @@ function showSkins($fuser, $edit = 0, $foruserprofile = false)
print ' ';
print ' ';
if ($subdir == $selected_theme) {
- print ' '.$subdir.'';
+ print '';
} else {
- print ' '.$subdir;
+ print '';
}
print '';
diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php
index 104e0e7efd2..1efb8fce26b 100644
--- a/htdocs/fourn/facture/paiement.php
+++ b/htdocs/fourn/facture/paiement.php
@@ -483,6 +483,7 @@ if ($action == 'create' || $action == 'confirm_paiement' || $action == 'add_paie
print '';
if (!empty($conf->banque->enabled)) {
print '| '.$langs->trans('Account').' | ';
+ print img_picto('', 'bank_account', 'class="pictofixedwidth"');
$form->select_comptes(empty($accountid) ? $obj->fk_account : $accountid, 'accountid', 0, '', 2);
print ' | ';
} else {
diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql
index 0c6e5bd9be8..8825becdc77 100644
--- a/htdocs/install/mysql/data/llx_10_c_regions.sql
+++ b/htdocs/install/mysql/data/llx_10_c_regions.sql
@@ -65,12 +65,19 @@
-- France
-- Germany -> for Departmements
-- Greece
+-- Honduras -> for Departmements
+-- India -> for Departmements
+-- Indonesia -> for Departmements
-- Italy
+-- Mexique -> for Departmements
-- Netherlands -> for Departmements
+-- Panama -> for Departmements
+-- Romania -> for Departmements
-- San Salvador
-- Spain
-- Switzerland/Suisse -> for Departmements/Cantons
-- United Kingdom
+-- USA -> for Departmements
@@ -200,6 +207,18 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (10
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (102, 10213, NULL, NULL, 'Δυτική Μακεδονία');
+-- Honduras Regions (id country=114)
+insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 114, 11401, '', 0, 'Honduras');
+
+
+-- India Regions (id country=117)
+insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 117, 11701, '', 0, 'India');
+
+
+-- Indonesia Regions (id country=118)
+insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 118, 11801, '', 0, 'Indonesia');
+
+
-- Italy Regions (id country=3)
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 301, NULL, 1, 'Abruzzo');
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 302, NULL, 1, 'Basilicata');
@@ -223,10 +242,22 @@ insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3
insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 3, 320, NULL, 1, 'Veneto');
+-- Mexique Regions (id country=154)
+insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 154, 15401, '', 0, 'Mexique');
+
+
-- Netherlands Regions (id country=17)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 17, 1701, '', 0,'Provincies van Nederland ');
+-- Panama Regions (id country=178)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 178, 17801, '', 0, 'Panama');
+
+
+-- Romania Regions (id country=188)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 188, 18801, '', 0, 'Romania');
+
+
-- San Salvador Regions (id country=86)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (86, 8601, NULL, NULL, 'Central');
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values (86, 8602, NULL, NULL, 'Oriental');
@@ -267,6 +298,11 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 7, 704, '', 0, 'Northern Ireland');
+-- USA Region (id country=11)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom) values ( 11, 1101, '', 0, 'United-States');
+
+
+
-- Regions Tunisia (id country=10)
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1001, '',0,'Ariana');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1002, '',0,'Béja');
@@ -294,22 +330,6 @@ insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,102
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values (10,1024, '',0,'Zaghouan');
--- Region USA (id country=11)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 11, 1101, '', 0, 'United-States', 1);
-
-
--- Regions Honduras (id country=114)
-insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 114, 11401, '', 0, 'Honduras', 1);
-
-
--- Regions India (id country=117)
-insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 117, 11701, '', 0, 'India', 1);
-
-
--- Regions Indonesia (id country=118)
-insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 118, 11801, '', 0, 'Indonesia', 1);
-
-
-- Regions Maroc - Moroco (id country=12)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1201, '', 0, 'Tanger-Tétouan', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 12, 1202, '', 0, 'Gharb-Chrarda-Beni Hssen', 1);
@@ -347,11 +367,6 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15211, '', 0, 'Les îles Agaléga', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 152, 15212, '', 0, 'Les écueils des Cargados Carajos', 1);
--- Regions Mexique (id country=154)
-insert into llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 154, 15401, '', 0, 'Mexique', 1);
-
--- Regions Romania (id country=188)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 188, 18801, '', 0, 'Romania', 1);
-- Regions Venezuela (id country=232)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 232, 23201, '', 0, 'Los Andes', 1);
@@ -392,8 +407,7 @@ INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) va
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18125, '', 0, 'Tumbes', 1);
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 181, 18126, '', 0, 'Ucayali', 1);
--- Regions Panama (id country=178)
-INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 178, 17801, '', 0, 'Panama', 1);
+
-- Regions United Arab Emirates (rowid country=227)
INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 227, 22701, '', 0, 'United Arab Emirates', 1);
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index b48831bbd39..c00b0e009f3 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -50,6 +50,7 @@
-- France
-- Germany
-- Honduras
+-- Hungary
-- (Italy)
-- Luxembourg
-- Netherlands
@@ -506,6 +507,29 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (11401, 'DC', '', 0, 'DC', 'Distrito Central');
+-- Hungary Provinces (rowid country=18)
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (180100, 'HU-BU', 'HU101', NULL, NULL, 'Budapest');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (180100, 'HU-PE', 'HU102', NULL, NULL, 'Pest');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-FE', 'HU211', NULL, NULL, 'Fejér');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-KE', 'HU212', NULL, NULL, 'Komárom-Esztergom');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182100, 'HU-VE', 'HU213', NULL, NULL, 'Veszprém');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-GS', 'HU221', NULL, NULL, 'Győr-Moson-Sopron');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-VA', 'HU222', NULL, NULL, 'Vas');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182200, 'HU-ZA', 'HU223', NULL, NULL, 'Zala');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-BA', 'HU231', NULL, NULL, 'Baranya');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-SO', 'HU232', NULL, NULL, 'Somogy');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (182300, 'HU-TO', 'HU233', NULL, NULL, 'Tolna');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-BZ', 'HU311', NULL, NULL, 'Borsod-Abaúj-Zemplén');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-HE', 'HU312', NULL, NULL, 'Heves');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183100, 'HU-NO', 'HU313', NULL, NULL, 'Nógrád');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-HB', 'HU321', NULL, NULL, 'Hajdú-Bihar');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-JN', 'HU322', NULL, NULL, 'Jász-Nagykun-Szolnok');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183200, 'HU-SZ', 'HU323', NULL, NULL, 'Szabolcs-Szatmár-Bereg');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-BK', 'HU331', NULL, NULL, 'Bács-Kiskun');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-BE', 'HU332', NULL, NULL, 'Békés');
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (183300, 'HU-CS', 'HU333', NULL, NULL, 'Csongrád');
+
+
-- Provinces Italy (id=3)
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AG',315,NULL,NULL,NULL,'AGRIGENTO');
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('AL',312,NULL,NULL,NULL,'ALESSANDRIA');
@@ -1622,27 +1646,6 @@ INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-6', 22701, '', 0, '', 'Sharjah', 1);
INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES ('AE-7', 22701, '', 0, '', 'Umm al-Quwain', 1);
--- Provinces Hungary (rowid country=18)
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BK', 183300, 'HU331', NULL, NULL, 'Bács-Kiskun');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BA', 182300, 'HU231', NULL, NULL, 'Baranya');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BE', 183300, 'HU332', NULL, NULL, 'Békés');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BZ', 183100, 'HU311', NULL, NULL, 'Borsod-Abaúj-Zemplén');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-BU', 180100, 'HU101', NULL, NULL, 'Budapest');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-CS', 183300, 'HU333', NULL, NULL, 'Csongrád');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-FE', 182100, 'HU211', NULL, NULL, 'Fejér');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-GS', 182200, 'HU221', NULL, NULL, 'Győr-Moson-Sopron');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-HB', 183200, 'HU321', NULL, NULL, 'Hajdú-Bihar');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-HE', 183100, 'HU312', NULL, NULL, 'Heves');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-JN', 183200, 'HU322', NULL, NULL, 'Jász-Nagykun-Szolnok');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-KE', 182100, 'HU212', NULL, NULL, 'Komárom-Esztergom');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-NO', 183100, 'HU313', NULL, NULL, 'Nógrád');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-PE', 180100, 'HU102', NULL, NULL, 'Pest');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-SO', 182300, 'HU232', NULL, NULL, 'Somogy');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-SZ', 183200, 'HU323', NULL, NULL, 'Szabolcs-Szatmár-Bereg');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-TO', 182300, 'HU233', NULL, NULL, 'Tolna');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-VA', 182200, 'HU222', NULL, NULL, 'Vas');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-VE', 182100, 'HU213', NULL, NULL, 'Veszprém');
-INSERT INTO llx_c_departements (code_departement, fk_region, cheflieu, tncc, ncc, nom) VALUES ('HU-ZA', 182200, 'HU223', NULL, NULL, 'Zala');
-- Provinces (postal districts) Portugal (rowid country=25)
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('15001', 'PT-AV', NULL, NULL, 'AVEIRO', 'Aveiro');
diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php
index 61879dbeb87..a4c54275041 100644
--- a/htdocs/main.inc.php
+++ b/htdocs/main.inc.php
@@ -2096,9 +2096,17 @@ function top_menu_user($hideloginname = 0, $urllogout = '')
'.$userDropDownImage.'
'.$profilName.' ';
- if ($user->datepreviouslogin) {
- $btnUser .= ' '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser').' ';
+ if ($user->datelastlogin) {
+ $title = $langs->trans("ConnectedSince").' : '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser');
+ if ($user->datepreviouslogin) {
+ $title .= ' '.$langs->trans("PreviousConnexion").' : '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser');
+ }
}
+ $btnUser .= ' '.dol_print_date($user->datelastlogin, "dayhour", 'tzuser').' ';
+ if ($user->datepreviouslogin) {
+ $btnUser .= ' '.dol_print_date($user->datepreviouslogin, "dayhour", 'tzuser').' ';
+ }
+
//$btnUser .= ' '.$langs->trans("Version").' '.$appli.'';
$btnUser .= '
diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php
index 4cf7bc0de34..e15d98e909b 100644
--- a/htdocs/theme/eldy/global.inc.php
+++ b/htdocs/theme/eldy/global.inc.php
@@ -116,6 +116,7 @@ body {
margin-right: 0;
margin-left: 0;
font-weight: 400;
+ background-color: var(--colorbackbody);
trans("DIRECTION").";\n"; ?>
}
@@ -1696,6 +1697,11 @@ td.showDragHandle {
z-index: 1001;
}
+global->THEME_DARKMODEENABLED)) { ?>
+.side-nav-vert {
+ border-bottom: 1px solid #888;
+}
+
.side-nav {
/*display: block;
@@ -2071,7 +2077,7 @@ span.widthpictotitle.pictotitle {
opacity: 0.4;
}
.pictofixedwidth {
- text-align: left;
+ text-align: ;
width: 20px;
padding-right: 0;
}
@@ -2810,7 +2816,7 @@ a.help:link, a.help:visited, a.help:hover, a.help:active, span.help { text-align
.helppresentcircle {
color: var(--colorbackhmenu1);
filter: invert(0.8);
- margin-left: -7px;
+ margin-: -7px;
display: inline-block;
margin-top: -10px;
font-size: x-small;
@@ -5709,7 +5715,7 @@ input.select2-input {
-webkit-box-shadow: none !important;
box-shadow: none !important;
border-radius: 0 !important;
- color: black;
+ /* color: black; */
}
.select2-container-active .select2-choice, .select2-container-active .select2-choices
{
diff --git a/htdocs/website/index.php b/htdocs/website/index.php
index 60e4b514e01..93a2aebc346 100644
--- a/htdocs/website/index.php
+++ b/htdocs/website/index.php
@@ -943,10 +943,45 @@ if ($action == 'addcontainer' && $usercanedit) {
}
}
} else {
+ $newaliasnames = '';
+ if (!$error && GETPOST('WEBSITE_ALIASALT', 'alpha')) {
+ $arrayofaliastotest = explode(',', str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alpha')));
+ $websitepagetemp = new WebsitePage($db);
+ foreach ($arrayofaliastotest as $aliastotest) {
+ $aliastotest = trim(preg_replace('/\.php$/i', '', $aliastotest));
+
+ // Disallow alias name pageX (already used to save the page with id)
+ if (preg_match('/^page\d+/i', $aliastotest)) {
+ $error++;
+ $langs->load("errors");
+ setEventMessages("Alias name 'pageX' is not allowed", null, 'errors');
+ $action = 'createcontainer';
+ break;
+ } else {
+ $result = $websitepagetemp->fetch(0, $object->id, $aliastotest);
+ if ($result < 0) {
+ $error++;
+ $langs->load("errors");
+ setEventMessages($websitepagetemp->error, $websitepagetemp->errors, 'errors');
+ $action = 'createcontainer';
+ break;
+ }
+ if ($result > 0) {
+ $error++;
+ $langs->load("errors");
+ setEventMessages($langs->trans("ErrorAPageWithThisNameOrAliasAlreadyExists", $websitepagetemp->pageurl), null, 'errors');
+ $action = 'createcontainer';
+ break;
+ }
+ $newaliasnames .= ($newaliasnames ? ', ' : '').$aliastotest;
+ }
+ }
+ }
+
$objectpage->title = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml'));
$objectpage->type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'aZ09');
$objectpage->pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha');
- $objectpage->aliasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml'));
+ $objectpage->aliasalt = $newaliasnames;
$objectpage->description = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml'));
$objectpage->lang = GETPOST('WEBSITE_LANG', 'aZ09');
$objectpage->otherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma');
@@ -1632,15 +1667,20 @@ if ($action == 'updatemeta' && $usercanedit) {
$action = 'editmeta';
}
}
+
+ $newaliasnames = '';
if (!$error && GETPOST('WEBSITE_ALIASALT', 'alpha')) {
- $arrayofaliastotest = explode(',', GETPOST('WEBSITE_ALIASALT', 'alpha'));
+ $arrayofaliastotest = explode(',', str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alpha')));
+
$websitepagetemp = new WebsitePage($db);
foreach ($arrayofaliastotest as $aliastotest) {
+ $aliastotest = trim(preg_replace('/\.php$/i', '', $aliastotest));
+
// Disallow alias name pageX (already used to save the page with id)
if (preg_match('/^page\d+/i', $aliastotest)) {
$error++;
$langs->load("errors");
- setEventMessages("Alias 'pageX' is not allowed", null, 'errors');
+ setEventMessages("Alias name 'pageX' is not allowed", null, 'errors');
$action = 'editmeta';
break;
} else {
@@ -1659,6 +1699,7 @@ if ($action == 'updatemeta' && $usercanedit) {
$action = 'editmeta';
break;
}
+ $newaliasnames .= ($newaliasnames ? ', ' : '').$aliastotest;
}
}
}
@@ -1669,7 +1710,7 @@ if ($action == 'updatemeta' && $usercanedit) {
$objectpage->title = str_replace(array('<', '>'), '', GETPOST('WEBSITE_TITLE', 'alphanohtml'));
$objectpage->type_container = GETPOST('WEBSITE_TYPE_CONTAINER', 'aZ09');
$objectpage->pageurl = GETPOST('WEBSITE_PAGENAME', 'alpha');
- $objectpage->aliasalt = str_replace(array('<', '>'), '', GETPOST('WEBSITE_ALIASALT', 'alphanohtml'));
+ $objectpage->aliasalt = $newaliasnames;
$objectpage->lang = GETPOST('WEBSITE_LANG', 'aZ09');
$objectpage->otherlang = GETPOST('WEBSITE_OTHERLANG', 'aZ09comma');
$objectpage->description = str_replace(array('<', '>'), '', GETPOST('WEBSITE_DESCRIPTION', 'alphanohtml'));
|