diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index 973c1b9c961..3b567c794d5 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -692,7 +692,7 @@ if (GETPOST('actionadd') || GETPOST('actionmodify'))
$resql = $db->query($sql);
if (! $resql)
{
- setEventMessage($db->error(), 'errors');
+ setEventMessages($db->error(), null, 'errors');
}
}
//$_GET["id"]=GETPOST('id', 'int'); // Force affichage dictionnaire en cours d'edition
diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php
index 204ac36ea03..4ba759a66fa 100644
--- a/htdocs/admin/tools/listevents.php
+++ b/htdocs/admin/tools/listevents.php
@@ -111,7 +111,7 @@ if ($action == 'confirm_purge' && $confirm == 'yes' && $user->admin)
if (! $resql)
{
$error++;
- setEventMessage($db->lasterror(), 'errors');
+ setEventMessages($db->lasterror(), null, 'errors');
}
// Add event purge
diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php
index 0c5915fd326..af29f244d01 100644
--- a/htdocs/admin/tools/purge.php
+++ b/htdocs/admin/tools/purge.php
@@ -105,7 +105,7 @@ if ($action=='purge' && ! preg_match('/^confirm/i',$choice) && ($choice != 'allf
if ($count) $mesg=$langs->trans("PurgeNDirectoriesDeleted", $count);
else $mesg=$langs->trans("PurgeNothingToDelete");
- setEventMessage($mesg);
+ setEventMessages($mesg, null, 'mesgs');
}
diff --git a/htdocs/categories/admin/categorie.php b/htdocs/categories/admin/categorie.php
index 37ed08703f8..12b4d3ced81 100644
--- a/htdocs/categories/admin/categorie.php
+++ b/htdocs/categories/admin/categorie.php
@@ -47,7 +47,7 @@ if (preg_match('/set_(.*)/',$action,$reg))
}
else
{
- setEventMessage($db->lasterror(),'errors');
+ setEventMessages($db->lasterror(), null, 'errors');
}
}
@@ -61,7 +61,7 @@ if (preg_match('/del_(.*)/',$action,$reg))
}
else
{
- setEventMessage($db->lasterror(),'errors');
+ setEventMessages($db->lasterror(), null, 'errors');
}
}
diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 63efabe4861..86a49f9f232 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -402,7 +402,7 @@ if (empty($reshook))
$langs->load("errors");
$error ++;
- setEventMessage($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), 'errors');
+ setEventMessages($langs->trans('ErrorProdIdIsMandatory', $langs->transcountry('ProfId' . $i, $object->thirdparty->country_code)), null, 'errors');
}
}
@@ -418,7 +418,7 @@ if (empty($reshook))
{
if (! $idwarehouse || $idwarehouse == - 1) {
$error ++;
- setEventMessage($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), 'errors');
+ setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors');
$action = '';
}
}
@@ -448,7 +448,7 @@ if (empty($reshook))
}
else
{
- if (count($object->errors)) setEventMessage($object->errors, 'errors');
+ if (count($object->errors)) setEventMessages(null, $object->errors, 'errors');
else setEventMessages($object->error, $object->errors, 'errors');
}
}
@@ -1054,7 +1054,7 @@ if (empty($reshook))
if ($discountid > 0) {
$result = $object->insert_discount($discountid); // This include link_to_invoice
} else {
- setEventMessage($discount->error, 'errors');
+ setEventMessages($discount->error, $discount->errors, 'errors');
$error ++;
break;
}
diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php
index 22220db6832..e49b52b8a90 100644
--- a/htdocs/contact/card.php
+++ b/htdocs/contact/card.php
@@ -143,7 +143,7 @@ if (empty($reshook))
$object->fetch($id);
if ($object->setstatus(0)<0)
{
- setEventMessage($object->error,'errors');
+ setEventMessages($object->error, $object->errors, 'errors');
}
else
{
@@ -158,7 +158,7 @@ if (empty($reshook))
$object->fetch($id);
if ($object->setstatus(1)<0)
{
- setEventMessage($object->error,'errors');
+ setEventMessages($object->error, $object->errors, 'errors');
}
else
{
@@ -397,8 +397,7 @@ if (empty($reshook))
}
else
{
- setEventMessage($object->error,'errors');
- setEventMessage($object->errors,'errors');
+ setEventMessages($object->error, $object->errors, 'errors');
$action = 'edit';
}
}
diff --git a/htdocs/contact/ldap.php b/htdocs/contact/ldap.php
index 2ec187eafc6..a626c57b6af 100644
--- a/htdocs/contact/ldap.php
+++ b/htdocs/contact/ldap.php
@@ -65,12 +65,12 @@ if ($action == 'dolibarr2ldap')
if ($result >= 0)
{
- setEventMessage($langs->trans("ContactSynchronized"));
+ setEventMessages($langs->trans("ContactSynchronized"), null, 'mesgs');
$db->commit();
}
else
{
- setEventMessage($ldap->error, 'errors');
+ setEventMessages($ldap->error, $ldap->errors, 'errors');
$db->rollback();
}
}
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 5685a2fbb92..e9251da148e 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -738,6 +738,15 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
$displaytab=0;
$nbintab=0;
$popuptab=0;
+ for ($i = 0 ; $i <= $maxkey ; $i++)
+ {
+ if ((is_numeric($active) && $i == $active) || (! empty($links[$i][2]) && ! is_numeric($active) && $active == $links[$i][2]))
+ {
+ // si l'active est présent dans la box
+ if ($i >= $limittoshow)
+ $limittoshow--;
+ }
+ }
for ($i = 0 ; $i <= $maxkey ; $i++)
{
@@ -745,13 +754,11 @@ function dol_get_fiche_head($links=array(), $active='', $title='', $notab=0, $pi
{
$isactive=true;
$bactive=true;
- if ($i <=$limittoshow)
- $limittoshow++;
}
else
$isactive=false;
- if ($i <= $limittoshow || $isactive)
+ if ($i < $limittoshow || $isactive)
{
$out.='
';
if (isset($links[$i][2]) && $links[$i][2] == 'image')
diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql
index c201cdbbec4..e736f7d993d 100644
--- a/htdocs/install/mysql/data/llx_10_c_regions.sql
+++ b/htdocs/install/mysql/data/llx_10_c_regions.sql
@@ -65,6 +65,9 @@ insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 9
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 93,'13055',0,'Provence-Alpes-Côte d''Azur');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 1, 94,'2A004',0,'Corse');
+-- Regions Austria (id country=41)
+INSERT INTO llx_c_regions (fk_pays, code_region, cheflieu, tncc, nom, active) values ( 41, 4101, '', 0, 'Österreich', 1);
+
-- Regions Belgium (id country=2)
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 2, 201, '',1,'Flandre');
insert into llx_c_regions (fk_pays,code_region,cheflieu,tncc,nom) values ( 2, 202, '',2,'Wallonie');
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index e8d8c9f6ae1..765f96f1da7 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -139,6 +139,16 @@ insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,no
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'94','94028',2,'VAL-DE-MARNE','Val-de-Marne');
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (11,'95','95500',2,'VAL-D OISE','Val-d Oise');
+-- Provinces Austria (id country=41)
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'B','BURGENLAND','Burgenland',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'K','KAERNTEN','Kärnten',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'N','NIEDEROESTERREICH','Niederösterreich',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'O','OBEROESTERREICH','Oberösterreich',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'S','SALZBURG','Salzburg',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'ST','STEIERMARK','Steiermark',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'T','TIROL','Tirol',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'V','VORARLBERG','Vorarlberg',1);
+INSERT INTO llx_c_departements (fk_region, code_departement, ncc, nom, active) VALUES (4101,'W','WIEN','Wien',1);
-- Provinces Belgium (id country=2)
insert into llx_c_departements (fk_region, code_departement,cheflieu,tncc,ncc,nom) values (201,'01','',1,'ANVERS','Anvers');
diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
index 750ca7de930..52d488d3706 100644
--- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql
+++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql
@@ -54,6 +54,23 @@ INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, '
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, '2312', 'Sociedad Anónima con Participación Estatal Mayoritaria', 1);
INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (23, '2313', 'Sociedad en Comandita por Acciones (arts. 315 a 324, LSC)', 1);
+-- Austria
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4100', 'GmbH - Gesellschaft mit beschränkter Haftung', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4101', 'GesmbH - Gesellschaft mit beschränkter Haftung', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4102', 'AG - Aktiengesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4103', 'EWIV - Europäische wirtschaftliche Interessenvereinigung', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4104', 'KEG - Kommanditerwerbsgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4105', 'OEG - Offene Erwerbsgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4106', 'OHG - Offene Handelsgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4107', 'AG & Co KG - Kommanditgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4108', 'GmbH & Co KG - Kommanditgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4109', 'KG - Kommanditgesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4110', 'OG - Offene Gesellschaft', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4111', 'GbR - Gesellschaft nach bürgerlichem Recht', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4112', 'GesbR - Gesellschaft nach bürgerlichem Recht', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4113', 'GesnbR - Gesellschaft nach bürgerlichem Recht', 1);
+INSERT INTO llx_c_forme_juridique (fk_pays, code, libelle, active) VALUES (41, '4114', 'e.U. - eingetragener Einzelunternehmer', 1);
+
-- France: Extrait de http://www.insee.fr/fr/nom_def_met/nomenclatures/cj/cjniveau2.htm
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'11','Artisan Commerçant (EI)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'12','Commerçant (EI)');