'.$langs->trans("MAIN_MAIL_FORCE_SENDTO").' '.getDolGlobalString('MAIN_MAIL_FORCE_SENDTO');
+ if (!empty(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
+ if (!isValidEmail(getDolGlobalString('MAIN_MAIL_FORCE_SENDTO'))) {
print img_warning($langs->trans("ErrorBadEMail"));
} else {
print img_warning($langs->trans("RecipientEmailsWillBeReplacedWithThisValue"));
diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php
index 701156303bb..e11ac077cc6 100644
--- a/htdocs/admin/order_extrafields.php
+++ b/htdocs/admin/order_extrafields.php
@@ -93,12 +93,7 @@ if ($action != 'create' && $action != 'edit') {
}
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -106,11 +101,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php
index 6869d7897b3..c89ff3e3655 100644
--- a/htdocs/admin/orderdet_extrafields.php
+++ b/htdocs/admin/orderdet_extrafields.php
@@ -94,12 +94,7 @@ if ($action != 'create' && $action != 'edit') {
}
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -107,11 +102,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php
index 9dea1bf8fd7..ab7d18b1331 100644
--- a/htdocs/admin/reception_extrafields.php
+++ b/htdocs/admin/reception_extrafields.php
@@ -99,12 +99,7 @@ if ($action != 'create' && $action != 'edit') {
}
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -112,11 +107,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php
index ff13b5f4573..c4967f75313 100644
--- a/htdocs/admin/resource_extrafields.php
+++ b/htdocs/admin/resource_extrafields.php
@@ -92,13 +92,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -106,11 +100,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php
index 59e0e857161..4121073dec2 100644
--- a/htdocs/admin/supplierinvoice_extrafields.php
+++ b/htdocs/admin/supplierinvoice_extrafields.php
@@ -93,13 +93,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -107,11 +101,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php
index 61a14a34844..0156eed5072 100644
--- a/htdocs/admin/supplierinvoicedet_extrafields.php
+++ b/htdocs/admin/supplierinvoicedet_extrafields.php
@@ -95,13 +95,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -109,11 +103,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php
index 5e0cfb38d4c..5a49c8f5bfd 100644
--- a/htdocs/admin/supplierorder_extrafields.php
+++ b/htdocs/admin/supplierorder_extrafields.php
@@ -93,13 +93,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -107,11 +101,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php
index 25689c7b9f5..07f223d59c8 100644
--- a/htdocs/admin/supplierorderdet_extrafields.php
+++ b/htdocs/admin/supplierorderdet_extrafields.php
@@ -94,13 +94,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -108,11 +102,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php
index 4a50beaa32e..0a4a851dae2 100644
--- a/htdocs/admin/ticket_extrafields.php
+++ b/htdocs/admin/ticket_extrafields.php
@@ -84,12 +84,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-/* ************************************************************************** */
-/* */
-/* Creation d'un champ optionnel */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -97,11 +92,7 @@ if ($action == 'create') {
include DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition d'un champ optionnel */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php
index 6d2799e0228..165361f7f57 100644
--- a/htdocs/asset/admin/assets_type_extrafields.php
+++ b/htdocs/asset/admin/assets_type_extrafields.php
@@ -82,13 +82,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -96,11 +90,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php
index e5db1465fb6..ce8adad8e34 100644
--- a/htdocs/asset/document.php
+++ b/htdocs/asset/document.php
@@ -82,8 +82,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
*/
$title = $langs->trans('Assets')." - ".$langs->trans('Documents');
-$helpurl = '';
-llxHeader('', $title, $helpurl);
+
+$help_url = '';
+
+llxHeader('', $title, $help_url);
$form = new Form($db);
diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php
index f6d34454ad4..7a8f4c20ce2 100644
--- a/htdocs/asset/info.php
+++ b/htdocs/asset/info.php
@@ -57,8 +57,10 @@ $object->fetch($id);
$form = new Form($db);
$title = $langs->trans('Asset')." - ".$langs->trans('Info');
-$helpurl = "";
-llxHeader('', $title, $helpurl);
+
+$help_url = "";
+
+llxHeader('', $title, $help_url);
$object->info($id);
diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php
index 9d7e848b6d3..6103b963e21 100644
--- a/htdocs/asset/type.php
+++ b/htdocs/asset/type.php
@@ -196,8 +196,9 @@ if ($action == 'confirm_delete' && $user->rights->asset->write) {
$form = new Form($db);
-$helpurl = '';
-llxHeader('', $langs->trans("AssetsTypeSetup"), $helpurl);
+$help_url = '';
+
+llxHeader('', $langs->trans("AssetsTypeSetup"), $help_url);
// List of asset type
diff --git a/htdocs/categories/admin/categorie_extrafields.php b/htdocs/categories/admin/categorie_extrafields.php
index 0d691995c29..02cd6e2a784 100644
--- a/htdocs/categories/admin/categorie_extrafields.php
+++ b/htdocs/categories/admin/categorie_extrafields.php
@@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -100,11 +94,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/categories/card.php b/htdocs/categories/card.php
index 9f275033b01..734f2e89506 100644
--- a/htdocs/categories/card.php
+++ b/htdocs/categories/card.php
@@ -208,8 +208,9 @@ if (($action == 'add' || $action == 'confirmed') && $user->rights->categorie->cr
$form = new Form($db);
$formother = new FormOther($db);
-$helpurl = 'EN:Module_Categories|FR:Module_Catégories';
-llxHeader("", $langs->trans("Categories"), $helpurl);
+$help_url = 'EN:Module_Categories|FR:Module_Catégories|DE:Modul_Kategorien';
+
+llxHeader("", $langs->trans("Categories"), $help_url);
if ($user->rights->categorie->creer) {
// Create or add
diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php
index dedb368202d..817c750a571 100644
--- a/htdocs/categories/viewcat.php
+++ b/htdocs/categories/viewcat.php
@@ -207,8 +207,10 @@ $formother = new FormOther($db);
$arrayofjs = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js');
$arrayofcss = array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css');
-$helpurl = '';
-llxHeader("", $langs->trans("Categories"), $helpurl, '', 0, 0, $arrayofjs, $arrayofcss);
+
+$help_url = '';
+
+llxHeader("", $langs->trans("Categories"), $help_url, '', 0, 0, $arrayofjs, $arrayofcss);
$title = Categorie::$MAP_TYPE_TITLE_AREA[$type];
diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php
index e314d0b3e66..bfa62eba7fc 100644
--- a/htdocs/comm/admin/propal_extrafields.php
+++ b/htdocs/comm/admin/propal_extrafields.php
@@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -100,11 +94,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php
index 4cbe35b31c5..834722f2afd 100644
--- a/htdocs/comm/admin/propaldet_extrafields.php
+++ b/htdocs/comm/admin/propaldet_extrafields.php
@@ -94,13 +94,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -108,11 +102,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php
index ccc834835a4..bf74035d553 100644
--- a/htdocs/compta/bank/card.php
+++ b/htdocs/compta/bank/card.php
@@ -305,8 +305,10 @@ if (!empty($conf->accounting->enabled)) {
$countrynotdefined = $langs->trans("ErrorSetACountryFirst").' ('.$langs->trans("SeeAbove").')';
$title = $langs->trans("FinancialAccount")." - ".$langs->trans("Card");
-$helpurl = "EN:Module_Banks_and_Cash";
-llxHeader("", $title, $helpurl);
+
+$help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses";
+
+llxHeader("", $title, $help_url);
// Creation
diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php
index 35102281ae9..6f0ffed4153 100644
--- a/htdocs/compta/bank/document.php
+++ b/htdocs/compta/bank/document.php
@@ -92,8 +92,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
*/
$title = $langs->trans("FinancialAccount").' - '.$langs->trans("Documents");
-$helpurl = "";
-llxHeader('', $title, $helpurl);
+
+$help_url = "EN:Module_Banks_and_Cash|FR:Module_Banques_et_Caisses";
+
+llxHeader("", $title, $help_url);
$form = new Form($db);
diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
index 82520c02fac..05aa47737be 100644
--- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
+++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php
@@ -91,7 +91,7 @@ if ($action != 'create' && $action != 'edit') {
/*
*
- * Creation d'un champ optionnel
+ * Creation of an optional field
*
*/
@@ -104,7 +104,7 @@ if ($action == 'create') {
/*
*
- * Edition d'un champ optionnel
+ * Edition of an optional field
*
*/
if ($action == 'edit' && !empty($attrname)) {
diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php
index 5264ee5472c..6ebdfae6277 100644
--- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php
+++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php
@@ -91,7 +91,7 @@ if ($action != 'create' && $action != 'edit') {
/*
*
- * Creation d'un champ optionnel
+ * Creation of an optional field
*
*/
@@ -104,7 +104,7 @@ if ($action == 'create') {
/*
*
- * Edition d'un champ optionnel
+ * Edition of an optional field
*
*/
if ($action == 'edit' && !empty($attrname)) {
diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php
index cd1905f528f..925885e4e7a 100644
--- a/htdocs/compta/facture/card.php
+++ b/htdocs/compta/facture/card.php
@@ -2815,9 +2815,10 @@ if (!empty($conf->projet->enabled)) {
$now = dol_now();
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Card');
-$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
-llxHeader('', $title, $helpurl);
+$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
+
+llxHeader('', $title, $help_url);
// Mode creation
diff --git a/htdocs/compta/facture/document.php b/htdocs/compta/facture/document.php
index 4c0544e3810..f4937679504 100644
--- a/htdocs/compta/facture/document.php
+++ b/htdocs/compta/facture/document.php
@@ -91,8 +91,10 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
*/
$title = $langs->trans('InvoiceCustomer')." - ".$langs->trans('Documents');
-$helpurl = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
-llxHeader('', $title, $helpurl);
+
+$help_url = "EN:Customers_Invoices|FR:Factures_Clients|ES:Facturas_a_clientes";
+
+llxHeader('', $title, $help_url);
$form = new Form($db);
diff --git a/htdocs/contact/perso.php b/htdocs/contact/perso.php
index 5c7356fae00..8d2969a1370 100644
--- a/htdocs/contact/perso.php
+++ b/htdocs/contact/perso.php
@@ -2,7 +2,7 @@
/* Copyright (C) 2004 Rodolphe Quiedeville
* Copyright (C) 2004-2011 Laurent Destailleur
* Copyright (C) 2005-2012 Regis Houssin
- * Copyright (C) 2018-2020 Frédéric France
+ * Copyright (C) 2018-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
@@ -119,7 +119,7 @@ if (!empty($conf->global->MAIN_HTML_TITLE) && preg_match('/contactnameonly/', $c
$title = $object->lastname;
}
$help_url = 'EN:Module_Third_Parties|FR:Module_Tiers|ES:Empresas';
-llxHeader('', $title, $helpurl);
+llxHeader('', $title, $help_url);
$form = new Form($db);
diff --git a/htdocs/contrat/admin/contract_extrafields.php b/htdocs/contrat/admin/contract_extrafields.php
index dc361a1f0b6..b725ef6f3f4 100644
--- a/htdocs/contrat/admin/contract_extrafields.php
+++ b/htdocs/contrat/admin/contract_extrafields.php
@@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -102,11 +96,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print '
';
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/contrat/admin/contractdet_extrafields.php b/htdocs/contrat/admin/contractdet_extrafields.php
index 6e83f0a4c1b..70d3193c12f 100644
--- a/htdocs/contrat/admin/contractdet_extrafields.php
+++ b/htdocs/contrat/admin/contractdet_extrafields.php
@@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation d'un champ optionnel
- /* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -102,11 +96,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition d'un champ optionnel */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/core/ajax/ajaxdirtree.php b/htdocs/core/ajax/ajaxdirtree.php
index 1977cfac6e4..9a0a11f04d4 100644
--- a/htdocs/core/ajax/ajaxdirtree.php
+++ b/htdocs/core/ajax/ajaxdirtree.php
@@ -58,8 +58,8 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call
if ($selecteddir != '/') {
$selecteddir = preg_replace('/\/$/', '', $selecteddir); // We removed last '/' except if it is '/'
}
-} else // For no ajax call
-{
+} else {
+ // For no ajax call
//if (GETPOST('preopened')) { $_GET['dir'] = $_POST['dir'] = GETPOST('preopened'); }
$openeddir = GETPOST('openeddir');
@@ -76,6 +76,9 @@ if (!isset($mode) || $mode != 'noajax') { // For ajax call
}
}
+$websitekey = GETPOST('websitekey', 'alpha');
+$pageid = GETPOST('pageid', 'int');
+
// Load translation files required by the page
$langs->load("ecm");
diff --git a/htdocs/core/boxes/box_members_last_modified.php b/htdocs/core/boxes/box_members_last_modified.php
index 9ec1bf70558..1315ac9895b 100644
--- a/htdocs/core/boxes/box_members_last_modified.php
+++ b/htdocs/core/boxes/box_members_last_modified.php
@@ -19,7 +19,7 @@
*/
/**
- * \file htdocs/core/boxes/box_last_modified_members.php
+ * \file htdocs/core/boxes/box_members_last_modified.php
* \ingroup adherent
* \brief Module to show box of members
*/
@@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
/**
* Class to manage the box to show last modofied members
*/
-class box_last_modified_members extends ModeleBoxes
+class box_members_last_modified extends ModeleBoxes
{
- public $boxcode = "box_last_modified_members";
+ public $boxcode = "box_members_last_modified";
public $boximg = "object_user";
public $boxlabel = "BoxLastModifiedMembers";
public $depends = array("adherent");
diff --git a/htdocs/core/boxes/box_members_last_subscriptions.php b/htdocs/core/boxes/box_members_last_subscriptions.php
index 0b2cb02d920..6da20bf28d0 100644
--- a/htdocs/core/boxes/box_members_last_subscriptions.php
+++ b/htdocs/core/boxes/box_members_last_subscriptions.php
@@ -19,7 +19,7 @@
*/
/**
- * \file htdocs/core/boxes/box_last_members_subscriptions.php
+ * \file htdocs/core/boxes/box_members_last_subscriptions.php
* \ingroup adherent
* \brief Module to show box of members
*/
@@ -30,9 +30,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
/**
* Class to manage the box to show last modofied members
*/
-class box_last_members_subscriptions extends ModeleBoxes
+class box_members_last_subscriptions extends ModeleBoxes
{
- public $boxcode = "box_last_members_subscriptions";
+ public $boxcode = "box_members_last_subscriptions";
public $boximg = "object_user";
public $boxlabel = "BoxLastMembersSubscriptions";
public $depends = array("adherent");
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index ca703979a7d..2ca0bf6b439 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -1597,7 +1597,7 @@ class ExtraFields
if (!empty($extrafieldsobjectkey)) {
$label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
$type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
- $size = $this->attributes[$extrafieldsobjectkey]['size'][$key];
+ $size = (int) $this->attributes[$extrafieldsobjectkey]['size'][$key];
$default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
$computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
$unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
@@ -1666,7 +1666,7 @@ class ExtraFields
$value = price($value, 0, $langs, 0, 0, -1);
}
} elseif ($type == 'select') {
- $valstr = $param['options'][$value];
+ $valstr = (!empty($param['options'][$value]) ? $param['options'][$value] : '');
if (($pos = strpos($valstr, "|")) !== false) {
$valstr = substr($valstr, 0, $pos);
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index 8b0b482f33f..b18ed68eaa2 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -6684,7 +6684,7 @@ class Form
if (!dol_eval($val['enabled'], 1, 1)) {
continue;
}
- if ($val['showoncombobox']) {
+ if (!empty($val['showoncombobox'])) {
$tmpfieldstoshow .= ($tmpfieldstoshow ? ',' : '').'t.'.$key;
}
}
@@ -6817,7 +6817,7 @@ class Form
if (!$forcecombo) {
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
- $out .= ajax_combobox($htmlname, null, $conf->global->$confkeyforautocompletemode);
+ $out .= ajax_combobox($htmlname, null, (!empty($conf->global->$confkeyforautocompletemode) ? $conf->global->$confkeyforautocompletemode : 0));
}
} else {
dol_print_error($this->db);
diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php
index 4a0114b5244..498078b6b15 100644
--- a/htdocs/core/class/html.formfile.class.php
+++ b/htdocs/core/class/html.formfile.class.php
@@ -1778,7 +1778,7 @@ class FormFile
// Share link
print '';
- if ($file['share']) {
+ if (!empty($file['share'])) {
// Define $urlwithroot
$urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root));
$urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index e3a218711dd..5151a0a39dc 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -41,6 +41,29 @@
include_once DOL_DOCUMENT_ROOT.'/core/lib/json.lib.php';
+/**
+ * Return dolibarr global constant string value
+ * @param string $key key to return value, return '' if not set
+ * @return string
+ */
+function getDolGlobalString($key)
+{
+ global $conf;
+ // return $conf->global->$key ?? '';
+ return (string) (empty($conf->global->$key) ? '' : $conf->global->$key);
+}
+
+/**
+ * Return dolibarr global constant int value
+ * @param string $key key to return value, return 0 if not set
+ * @return int
+ */
+function getDolGlobalInt($key)
+{
+ global $conf;
+ // return $conf->global->$key ?? 0;
+ return (int) (empty($conf->global->$key) ? 0 : $conf->global->$key);
+}
/**
* Return a DoliDB instance (database handler).
diff --git a/htdocs/core/modules/delivery/mod_delivery_saphir.php b/htdocs/core/modules/delivery/mod_delivery_saphir.php
index ef3e7f7b7c0..af1900803c8 100644
--- a/htdocs/core/modules/delivery/mod_delivery_saphir.php
+++ b/htdocs/core/modules/delivery/mod_delivery_saphir.php
@@ -19,7 +19,7 @@
*/
/**
- * \file htdocs/core/modules/delivery/mod_livraison_saphir.php
+ * \file htdocs/core/modules/delivery/mod_delivery_saphir.php
* \ingroup expedition
* \brief Fichier contenant la classe du modele de numerotation de reference de livraison Saphir
*/
diff --git a/htdocs/core/modules/modAdherent.class.php b/htdocs/core/modules/modAdherent.class.php
index 74c67d217d6..57ec76e319d 100644
--- a/htdocs/core/modules/modAdherent.class.php
+++ b/htdocs/core/modules/modAdherent.class.php
@@ -194,10 +194,10 @@ class modAdherent extends DolibarrModules
$this->boxes = array(
0 => array('file'=>'box_members.php', 'enabledbydefaulton'=>'Home'),
2 => array('file'=>'box_birthdays_members.php', 'enabledbydefaulton'=>'Home'),
- 3 => array('file'=>'box_members_last_modified', 'enabledbydefaulton'=>'membersindex'),
- 4 => array('file'=>'box_members_last_subscriptions', 'enabledbydefaulton'=>'membersindex'),
- 5 => array('file'=>'box_members_subscriptions_by_year', 'enabledbydefaulton'=>'membersindex'),
- 6 => array('file'=>'box_members_by_type', 'enabledbydefaulton'=>'membersindex'),
+ 3 => array('file'=>'box_members_last_modified.php', 'enabledbydefaulton'=>'membersindex'),
+ 4 => array('file'=>'box_members_last_subscriptions.php', 'enabledbydefaulton'=>'membersindex'),
+ 5 => array('file'=>'box_members_subscriptions_by_year.php', 'enabledbydefaulton'=>'membersindex'),
+ 6 => array('file'=>'box_members_by_type.php', 'enabledbydefaulton'=>'membersindex'),
);
// Permissions
diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
index 5ea0e4821d6..4c56b0223cd 100644
--- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
@@ -35,7 +35,7 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table
}
$value = $datenotinstring;
} else {
- $value = $obj->$tmpkey;
+ $value = (!empty($obj->$tmpkey) ? $obj->$tmpkey : '');
}
// If field is a computed field, we make computation to get value
if ($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key]) {
diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php
index 77329eb06a4..72f888f256a 100644
--- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php
@@ -37,17 +37,17 @@ if (!empty($extrafieldsobjectkey)) { // $extrafieldsobject is the $object->table
if (in_array($typeofextrafield, array('int', 'double'))) {
$searchclass = 'searchnum';
}
- print ' ';
+ print ' ';
} elseif (in_array($typeofextrafield, array('datetime', 'timestamp'))) {
$morecss = '';
- echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
+ echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
} else {
// for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid')
$morecss = '';
if (in_array($typeofextrafield, array('link', 'sellist', 'text', 'html'))) {
$morecss = 'maxwidth200';
}
- echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
+ echo $extrafields->showInputField($key, (empty($search_array_options[$search_options_pattern.$tmpkey]) ? '' : $search_array_options[$search_options_pattern.$tmpkey]), '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1);
}
print ' ';
}
diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php
index de165c8c752..6ff7bba2390 100644
--- a/htdocs/core/tpl/filemanager.tpl.php
+++ b/htdocs/core/tpl/filemanager.tpl.php
@@ -71,7 +71,8 @@ print '";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php
index 1cbdeb4cf0a..439cad6c532 100644
--- a/htdocs/fichinter/admin/fichinterdet_extrafields.php
+++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php
@@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation d'un champ optionnel
- /* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -102,11 +96,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition d'un champ optionnel */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql
index acd9f0532b5..d85a0b0b52e 100644
--- a/htdocs/install/mysql/data/llx_20_c_departements.sql
+++ b/htdocs/install/mysql/data/llx_20_c_departements.sql
@@ -36,6 +36,57 @@
insert into llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) values ( 0, '0', '0',0,'-','-');
+-- Algeria Provinces (id country=13)
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL01', '', 0, '', 'Wilaya d''Adrar', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL02', '', 0, '', 'Wilaya de Chlef', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL03', '', 0, '', 'Wilaya de Laghouat', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL04', '', 0, '', 'Wilaya d''Oum El Bouaghi', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL05', '', 0, '', 'Wilaya de Batna', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL06', '', 0, '', 'Wilaya de Béjaïa', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL07', '', 0, '', 'Wilaya de Biskra', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL08', '', 0, '', 'Wilaya de Béchar', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL09', '', 0, '', 'Wilaya de Blida', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL10', '', 0, '', 'Wilaya de Bouira', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL11', '', 0, '', 'Wilaya de Tamanrasset', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL12', '', 0, '', 'Wilaya de Tébessa', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL13', '', 0, '', 'Wilaya de Tlemcen', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL14', '', 0, '', 'Wilaya de Tiaret', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL15', '', 0, '', 'Wilaya de Tizi Ouzou', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL16', '', 0, '', 'Wilaya d''Alger', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL17', '', 0, '', 'Wilaya de Djelfa', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL18', '', 0, '', 'Wilaya de Jijel', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL19', '', 0, '', 'Wilaya de Sétif ', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL20', '', 0, '', 'Wilaya de Saïda', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL21', '', 0, '', 'Wilaya de Skikda', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL22', '', 0, '', 'Wilaya de Sidi Bel Abbès', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL23', '', 0, '', 'Wilaya d''Annaba', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL24', '', 0, '', 'Wilaya de Guelma', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL25', '', 0, '', 'Wilaya de Constantine', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL26', '', 0, '', 'Wilaya de Médéa', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL27', '', 0, '', 'Wilaya de Mostaganem', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL28', '', 0, '', 'Wilaya de M''Sila', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL29', '', 0, '', 'Wilaya de Mascara', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL30', '', 0, '', 'Wilaya d''Ouargla', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL31', '', 0, '', 'Wilaya d''Oran', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL32', '', 0, '', 'Wilaya d''El Bayadh', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL33', '', 0, '', 'Wilaya d''Illizi', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL34', '', 0, '', 'Wilaya de Bordj Bou Arreridj', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL35', '', 0, '', 'Wilaya de Boumerdès', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL36', '', 0, '', 'Wilaya d''El Tarf', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL37', '', 0, '', 'Wilaya de Tindouf', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL38', '', 0, '', 'Wilaya de Tissemsilt', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL39', '', 0, '', 'Wilaya d''El Oued', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL40', '', 0, '', 'Wilaya de Khenchela', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL41', '', 0, '', 'Wilaya de Souk Ahras', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL42', '', 0, '', 'Wilaya de Tipaza', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL43', '', 0, '', 'Wilaya de Mila', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL44', '', 0, '', 'Wilaya d''Aïn Defla', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL45', '', 0, '', 'Wilaya de Naâma', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL46', '', 0, '', 'Wilaya d''Aïn Témouchent', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL47', '', 0, '', 'Wilaya de Ghardaia', 1);
+INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom, active) VALUES(1301, 'AL48', '', 0, '', 'Wilaya de Relizane', 1);
+
+
-- Andorra Parròquies (id country=34)
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-002', 'AD100', NULL, NULL, 'Canillo');
INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES (34000, 'AD-003', 'AD200', NULL, NULL, 'Encamp');
@@ -46,7 +97,7 @@ 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 (34000, 'AD-008', 'AD700', NULL, NULL, 'Escaldes-Engordany');
--- Austria States (Bundesländer) (id country=41)
+-- Austria States / Österreich Bundesländer (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);
@@ -288,55 +339,6 @@ insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VI',320,NULL,NULL,NULL,'VICENZA');
insert into llx_c_departements (code_departement,fk_region,cheflieu,tncc,ncc,nom) values ('VT',307,NULL,NULL,NULL,'VITERBO');
--- Provinces Algeria (id country=13)
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL01', 1301, '', 0, '', 'Wilaya d''Adrar', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL02', 1301, '', 0, '', 'Wilaya de Chlef', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL03', 1301, '', 0, '', 'Wilaya de Laghouat', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL04', 1301, '', 0, '', 'Wilaya d''Oum El Bouaghi', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL05', 1301, '', 0, '', 'Wilaya de Batna', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL06', 1301, '', 0, '', 'Wilaya de Béjaïa', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL07', 1301, '', 0, '', 'Wilaya de Biskra', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL08', 1301, '', 0, '', 'Wilaya de Béchar', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL09', 1301, '', 0, '', 'Wilaya de Blida', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL10', 1301, '', 0, '', 'Wilaya de Bouira', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL11', 1301, '', 0, '', 'Wilaya de Tamanrasset', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL12', 1301, '', 0, '', 'Wilaya de Tébessa', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL13', 1301, '', 0, '', 'Wilaya de Tlemcen', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL14', 1301, '', 0, '', 'Wilaya de Tiaret', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL15', 1301, '', 0, '', 'Wilaya de Tizi Ouzou', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL16', 1301, '', 0, '', 'Wilaya d''Alger', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL17', 1301, '', 0, '', 'Wilaya de Djelfa', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL18', 1301, '', 0, '', 'Wilaya de Jijel', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL19', 1301, '', 0, '', 'Wilaya de Sétif ', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL20', 1301, '', 0, '', 'Wilaya de Saïda', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL21', 1301, '', 0, '', 'Wilaya de Skikda', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL22', 1301, '', 0, '', 'Wilaya de Sidi Bel Abbès', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL23', 1301, '', 0, '', 'Wilaya d''Annaba', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL24', 1301, '', 0, '', 'Wilaya de Guelma', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL25', 1301, '', 0, '', 'Wilaya de Constantine', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL26', 1301, '', 0, '', 'Wilaya de Médéa', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL27', 1301, '', 0, '', 'Wilaya de Mostaganem', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL28', 1301, '', 0, '', 'Wilaya de M''Sila', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL29', 1301, '', 0, '', 'Wilaya de Mascara', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL30', 1301, '', 0, '', 'Wilaya d''Ouargla', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL31', 1301, '', 0, '', 'Wilaya d''Oran', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL32', 1301, '', 0, '', 'Wilaya d''El Bayadh', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL33', 1301, '', 0, '', 'Wilaya d''Illizi', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL34', 1301, '', 0, '', 'Wilaya de Bordj Bou Arreridj', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL35', 1301, '', 0, '', 'Wilaya de Boumerdès', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL36', 1301, '', 0, '', 'Wilaya d''El Tarf', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL37', 1301, '', 0, '', 'Wilaya de Tindouf', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL38', 1301, '', 0, '', 'Wilaya de Tissemsilt', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL39', 1301, '', 0, '', 'Wilaya d''El Oued', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL40', 1301, '', 0, '', 'Wilaya de Khenchela', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL41', 1301, '', 0, '', 'Wilaya de Souk Ahras', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL42', 1301, '', 0, '', 'Wilaya de Tipaza', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL43', 1301, '', 0, '', 'Wilaya de Mila', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL44', 1301, '', 0, '', 'Wilaya d''Aïn Defla', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL45', 1301, '', 0, '', 'Wilaya de Naâma', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL46', 1301, '', 0, '', 'Wilaya d''Aïn Témouchent', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL47', 1301, '', 0, '', 'Wilaya de Ghardaia', 1);
-INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('AL48', 1301, '', 0, '', 'Wilaya de Relizane', 1);
-- Provinces Maroc - Moroco (id country=12)
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('MA', 1209, '', 0, '', 'Province de Benslimane', 1);
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 cfc03e7bb5d..cb6e6d6ef4c 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
@@ -77,6 +77,11 @@ ALTER TABLE llx_facture MODIFY COLUMN date_valid DATETIME NULL DEFAULT NULL;
-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_dolibarr_state_board.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_dolibarr_state_board.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_modified.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_modified.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_last_subscriptions.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_last_subscriptions.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_subscriptions_by_year.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_subscriptions_by_year.php' AND entity = 1);
+-- VMYSQL4.1 INSERT INTO llx_boxes_def (file, entity) SELECT 'box_members_by_type.php', 1 FROM DUAL WHERE NOT EXISTS (SELECT * FROM llx_boxes_def WHERE file = 'box_members_by_type.php' AND entity = 1);
+
ALTER TABLE llx_website ADD COLUMN lastaccess datetime NULL;
ALTER TABLE llx_website ADD COLUMN pageviews_month BIGINT UNSIGNED DEFAULT 0;
diff --git a/htdocs/product/admin/product_extrafields.php b/htdocs/product/admin/product_extrafields.php
index 0962d1ddf44..aea75f78aa8 100644
--- a/htdocs/product/admin/product_extrafields.php
+++ b/htdocs/product/admin/product_extrafields.php
@@ -99,12 +99,7 @@ if ($action != 'create' && $action != 'edit') {
}
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -112,11 +107,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/product/admin/product_lot_extrafields.php b/htdocs/product/admin/product_lot_extrafields.php
index 91e19ee1fa7..fc14b4c142c 100644
--- a/htdocs/product/admin/product_lot_extrafields.php
+++ b/htdocs/product/admin/product_lot_extrafields.php
@@ -91,13 +91,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -105,11 +99,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/product/admin/product_supplier_extrafields.php b/htdocs/product/admin/product_supplier_extrafields.php
index 8c3a10a4b74..daafa2f668d 100644
--- a/htdocs/product/admin/product_supplier_extrafields.php
+++ b/htdocs/product/admin/product_supplier_extrafields.php
@@ -99,13 +99,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -113,11 +107,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/product/admin/stock_extrafields.php b/htdocs/product/admin/stock_extrafields.php
index 3f860564b48..e72c9f1b1bf 100644
--- a/htdocs/product/admin/stock_extrafields.php
+++ b/htdocs/product/admin/stock_extrafields.php
@@ -86,13 +86,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -100,11 +94,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 4d8f07ab9a5..32d36d2d6f6 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -59,6 +59,7 @@ $toselect = GETPOST('toselect', 'array');
$sall = trim((GETPOST('search_all', 'alphanohtml') != '') ?GETPOST('search_all', 'alphanohtml') : GETPOST('sall', 'alphanohtml'));
$search_ref = GETPOST("search_ref", 'alpha');
+$search_ref_supplier = GETPOST("search_ref_supplier", 'alpha');
$search_barcode = GETPOST("search_barcode", 'alpha');
$search_label = GETPOST("search_label", 'alpha');
$search_type = GETPOST("search_type", 'int');
@@ -298,6 +299,7 @@ if (empty($reshook)) {
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All tests are required to be compatible with all browsers
$sall = "";
$search_ref = "";
+ $search_ref_supplier = "";
$search_label = "";
$search_barcode = "";
$searchCategoryProductOperator = 0;
@@ -566,6 +568,7 @@ if ($resql) {
}
}
+ $paramsCat = '';
foreach ($searchCategoryProductList as $searchCategoryProduct) {
$paramsCat .= "&search_category_product_list[]=".urlencode($searchCategoryProduct);
}
diff --git a/htdocs/projet/admin/project_extrafields.php b/htdocs/projet/admin/project_extrafields.php
index e011b1a02c3..c4a4caa47fb 100644
--- a/htdocs/projet/admin/project_extrafields.php
+++ b/htdocs/projet/admin/project_extrafields.php
@@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/projet/admin/project_task_extrafields.php b/htdocs/projet/admin/project_task_extrafields.php
index 5222706d7d0..da79010076a 100644
--- a/htdocs/projet/admin/project_task_extrafields.php
+++ b/htdocs/projet/admin/project_task_extrafields.php
@@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/recruitment/admin/candidature_extrafields.php b/htdocs/recruitment/admin/candidature_extrafields.php
index 984d92ce913..1f0ac538d0b 100644
--- a/htdocs/recruitment/admin/candidature_extrafields.php
+++ b/htdocs/recruitment/admin/candidature_extrafields.php
@@ -16,7 +16,7 @@
*/
/**
- * \file htdocs/recruitement/admin/candidature_extrafields.php
+ * \file htdocs/recruitment/admin/candidature_extrafields.php
* \ingroup recruitment
* \brief Page to setup extra fields of Candidature
*/
diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php
index 7df03c0c543..3b17322d5eb 100644
--- a/htdocs/recruitment/admin/jobposition_extrafields.php
+++ b/htdocs/recruitment/admin/jobposition_extrafields.php
@@ -16,7 +16,7 @@
*/
/**
- * \file htdocs/recruitement/admin/jobposition_extrafields.php
+ * \file htdocs/recruitment/admin/jobposition_extrafields.php
* \ingroup recruitment
* \brief Page to setup extra fields of Candidature
*/
diff --git a/htdocs/salaries/admin/salaries_extrafields.php b/htdocs/salaries/admin/salaries_extrafields.php
index 59074e582d2..38303518ac4 100644
--- a/htdocs/salaries/admin/salaries_extrafields.php
+++ b/htdocs/salaries/admin/salaries_extrafields.php
@@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print '
';
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/societe/admin/contact_extrafields.php b/htdocs/societe/admin/contact_extrafields.php
index 3841a7c66ea..6607efa554d 100644
--- a/htdocs/societe/admin/contact_extrafields.php
+++ b/htdocs/societe/admin/contact_extrafields.php
@@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/societe/admin/societe_extrafields.php b/htdocs/societe/admin/societe_extrafields.php
index d1ffffd6b87..a785b95c892 100644
--- a/htdocs/societe/admin/societe_extrafields.php
+++ b/htdocs/societe/admin/societe_extrafields.php
@@ -87,13 +87,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation d'un champ optionnel
- /* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -101,11 +95,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition d'un champ optionnel */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print '
';
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php
index 47d714e08db..c141290d9e9 100644
--- a/htdocs/societe/class/societe.class.php
+++ b/htdocs/societe/class/societe.class.php
@@ -15,7 +15,7 @@
* Copyright (C) 2017 Rui Strecht
* Copyright (C) 2018 Philippe Grand
* Copyright (C) 2019-2020 Josep Lluís Amador
- * Copyright (C) 2019 Frédéric France
+ * Copyright (C) 2019-2021 Frédéric France
* Copyright (C) 2020 Open-Dsi
*
* This program is free software; you can redistribute it and/or modify
@@ -4247,7 +4247,7 @@ class Societe extends CommonObject
$table = 'supplier_proposal';
}
- $sql = "SELECT rowid, total_ht, total as total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f";
+ $sql = "SELECT rowid, total_ht, total_ttc, fk_statut as status FROM ".MAIN_DB_PREFIX.$table." as f";
$sql .= " WHERE fk_soc = ".$this->id;
if ($mode == 'supplier') {
$sql .= " AND entity IN (".getEntity('supplier_proposal').")";
diff --git a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php
index 035be6ff86d..66bcf2c61e4 100644
--- a/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php
+++ b/htdocs/supplier_proposal/admin/supplier_proposal_extrafields.php
@@ -82,13 +82,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print " ";
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -96,11 +90,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php
index f4b63f25cd7..5a061101fab 100644
--- a/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php
+++ b/htdocs/supplier_proposal/admin/supplier_proposaldet_extrafields.php
@@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation d'un champ optionnel */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -102,11 +96,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition d'un champ optionnel */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/user/admin/group_extrafields.php b/htdocs/user/admin/group_extrafields.php
index 627af1c3b9d..b258f991a47 100644
--- a/htdocs/user/admin/group_extrafields.php
+++ b/htdocs/user/admin/group_extrafields.php
@@ -89,13 +89,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -103,11 +97,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Edition of an optional field */
-/* */
-/* ************************************************************************** */
+// Edition of an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));
diff --git a/htdocs/user/admin/user_extrafields.php b/htdocs/user/admin/user_extrafields.php
index 25141ed4fcd..7e22a1c7122 100644
--- a/htdocs/user/admin/user_extrafields.php
+++ b/htdocs/user/admin/user_extrafields.php
@@ -88,13 +88,7 @@ if ($action != 'create' && $action != 'edit') {
print "";
}
-
-/* ************************************************************************** */
-/* */
-/* Creation of an optional field */
-/* */
-/* ************************************************************************** */
-
+// Creation of an optional field
if ($action == 'create') {
print '
';
print load_fiche_titre($langs->trans('NewAttribute'));
@@ -102,11 +96,7 @@ if ($action == 'create') {
require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
}
-/* ************************************************************************** */
-/* */
-/* Editing an optional field */
-/* */
-/* ************************************************************************** */
+// Editing an optional field
if ($action == 'edit' && !empty($attrname)) {
print " ";
print load_fiche_titre($langs->trans("FieldEdition", $attrname));