diff --git a/dev/resources/iso-normes/barcode_EAN13.txt b/dev/resources/iso-normes/barcode_EAN13.txt index 69194625126..f4496327ee4 100644 --- a/dev/resources/iso-normes/barcode_EAN13.txt +++ b/dev/resources/iso-normes/barcode_EAN13.txt @@ -1,3 +1,7 @@ +Barcode EAN 13 + +FR +== Signification des chiffres. - 2 chiffres pour le code pays ou code systeme @@ -9,6 +13,24 @@ Cette regle subit de nombreuses entorses pour ameliorer l'usage des chiffres dis Voici la liste des codes pays ou systeme : + +EN +== +Meaning of the numbers. + +- 2 digits for the country code or system code +- 5 digits for the company identifier +- 5 digits for item identifier +- 1 digit for checksum + +This rule has been twisted many times to improve the use of the available numbers. +Here is the list of country codes or system: + + + +List +==== + 00 � 13 UCC (Etats-Unis et Canada) 20 � 29 Codification interne en magasin 30 � 37 GENCOD-EAN France @@ -104,4 +126,4 @@ Voici la liste des codes pays ou systeme : 978 - 979 Livres (ISBN) 980 Refus de remboursement 981 - 982 Coupons (monnaie courante) -99 Coupons \ No newline at end of file +99 Coupons diff --git a/dev/resources/licence/Links on GPL.txt b/dev/resources/licence/Links on GPL.txt index 0fb3b63c851..d8a5f790458 100644 --- a/dev/resources/licence/Links on GPL.txt +++ b/dev/resources/licence/Links on GPL.txt @@ -1,5 +1,6 @@ * Page with license compatibility -https://www.gnu.org/licenses/quick-guide-gplv3.fr.html +[EN] https://www.gnu.org/licenses/quick-guide-gplv3.en.html +[FR] https://www.gnu.org/licenses/quick-guide-gplv3.fr.html * FAQ on GPL license https://www.fsf.org/licensing/licenses/gpl-faq.html diff --git a/dev/setup/nginx/dolibarr b/dev/setup/nginx/dolibarr index 82b8d2dc7bf..ffda5fae609 100644 --- a/dev/setup/nginx/dolibarr +++ b/dev/setup/nginx/dolibarr @@ -5,13 +5,13 @@ server { root /path/to/your/htdocs; - # Optionnal + # Optional error_log /path/to/your/log/directory/nginx.error.log; access_log /path/to/your/log/directory/nginx.access.log; index index.php index.html index.htm; - # Optionnal + # Optional server_name your-fqdn.tld; location / { @@ -23,6 +23,6 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_read_timeout 600; include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; + fastcgi_pass unix:/var/run/php5-fpm.sock; // /var/run/php/php7.0-fpm.sock } } diff --git a/htdocs/core/boxes/box_dolibarr_state_board.php b/htdocs/core/boxes/box_dolibarr_state_board.php index a8e00eef5eb..833f1c4478f 100644 --- a/htdocs/core/boxes/box_dolibarr_state_board.php +++ b/htdocs/core/boxes/box_dolibarr_state_board.php @@ -2,7 +2,7 @@ /* Copyright (C) 2003-2007 Rodolphe Quiedeville * Copyright (C) 2004-2010 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin - * Copyright (C) 2015 Frederic France + * Copyright (C) 2015-2021 Frederic 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 @@ -34,7 +34,7 @@ include_once DOL_DOCUMENT_ROOT . '/core/class/hookmanager.class.php'; class box_dolibarr_state_board extends ModeleBoxes { public $boxcode = "dolibarrstatebox"; - public $boximg = "box_user"; + public $boximg = "generic"; public $boxlabel = "BoxDolibarrStateBoard"; public $depends = array("user"); @@ -62,7 +62,9 @@ class box_dolibarr_state_board extends ModeleBoxes $this->db = $db; // disable box for such cases - if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) $this->enabled = 0; // disabled by this option + if (!empty($conf->global->SOCIETE_DISABLE_CUSTOMERS)) { + $this->enabled = 0; // disabled by this option + } $this->hidden = !($user->rights->societe->lire && empty($user->socid)); } @@ -81,8 +83,7 @@ class box_dolibarr_state_board extends ModeleBoxes $this->max = $max; $this->info_box_head = array('text' => $langs->trans("DolibarrStateBoard")); - if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) - { + if (empty($user->socid) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTATS)) { $hookmanager = new HookManager($this->db); $hookmanager->initHooks(array('index')); $boxstatItems = array(); @@ -242,18 +243,15 @@ class box_dolibarr_state_board extends ModeleBoxes ); $boardloaded = array(); - foreach ($keys as $val) - { - if ($conditions[$val]) - { + foreach ($keys as $val) { + if ($conditions[$val]) { $boxstatItem = ''; $class = $classes[$val]; // Search in cache if load_state_board is already realized $classkeyforcache = $class; if ($classkeyforcache == 'ProductService') $classkeyforcache = 'Product'; // ProductService use same load_state_board than Product - if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache])) - { + if (!isset($boardloaded[$classkeyforcache]) || !is_object($boardloaded[$classkeyforcache])) { include_once $includes[$val]; // Loading a class cost around 1Mb $board = new $class($this->db); @@ -277,12 +275,10 @@ class box_dolibarr_state_board extends ModeleBoxes } } - if (!empty($boxstatFromHook) || !empty($boxstatItems)) - { + if (!empty($boxstatFromHook) || !empty($boxstatItems)) { $boxstat .= $boxstatFromHook; - if (is_array($boxstatItems) && count($boxstatItems) > 0) - { + if (is_array($boxstatItems) && count($boxstatItems) > 0) { $boxstat .= implode('', $boxstatItems); } @@ -302,12 +298,6 @@ class box_dolibarr_state_board extends ModeleBoxes 'td' => '', 'textnoformat' => $boxstat ); - } else { - $this->info_box_contents[0][0] = array( - 'td' => 'class="nohover center"', - 'maxlength' => 500, - 'text' => ($this->db->error() . ' sql=' . $sql) - ); } } else { $this->info_box_contents[0][0] = array( diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 6d4d5a1444a..3c24df1084c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -6004,8 +6004,14 @@ abstract class CommonObject } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { $param['options'] = array($reg[2].':'.$reg[3] => 'N'); $type = 'link'; - } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { - $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + } elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4].':'.$reg[5] => 'N'); + $type = 'sellist'; + } elseif (preg_match('/^(sellist):(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3].':'.$reg[4] => 'N'); + $type = 'sellist'; + } elseif (preg_match('/^(sellist):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[2].':'.$reg[3] => 'N'); $type = 'sellist'; } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { $param['options'] = array(); @@ -6172,24 +6178,20 @@ abstract class CommonObject $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); - if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) - { - if (strpos($InfoFieldList[4], 'extra.') !== false) - { + if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { + if (strpos($InfoFieldList[4], 'extra.') !== false) { $keyList = 'main.'.$InfoFieldList[2].' as rowid'; } else { $keyList = $InfoFieldList[2].' as rowid'; } } - if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) - { + if (count($InfoFieldList) > 3 && !empty($InfoFieldList[3])) { list($parentName, $parentField) = explode('|', $InfoFieldList[3]); $keyList .= ', '.$parentField; } $fields_label = explode('|', $InfoFieldList[1]); - if (is_array($fields_label)) - { + if (is_array($fields_label)) { $keyList .= ', '; $keyList .= implode(', ', $fields_label); } @@ -6584,13 +6586,18 @@ abstract class CommonObject $param['options'] = array(); if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) $param['options'] = $val['arrayofkeyval']; - if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) - { + if (preg_match('/^integer:(.*):(.*)/i', $val['type'], $reg)) { $type = 'link'; $param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]); } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); $type = 'sellist'; + } elseif (preg_match('/^sellist:(.*):(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3] => 'N'); + $type = 'sellist'; + } elseif (preg_match('/^sellist:(.*):(.*)/i', $val['type'], $reg)) { + $param['options'] = array($reg[1].':'.$reg[2] => 'N'); + $type = 'sellist'; } $langfile = $val['langfile']; @@ -6681,8 +6688,7 @@ abstract class CommonObject $selectkey = "rowid"; $keyList = 'rowid'; - if (count($InfoFieldList) >= 3) - { + if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) { $selectkey = $InfoFieldList[2]; $keyList = $InfoFieldList[2].' as rowid'; } diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 51aaa132c0e..6987bc3e27a 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6798,8 +6798,8 @@ class Form // Add code for jquery to use multiselect if (!empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) || defined('REQUIRE_JQUERY_MULTISELECT')) { - $out .= "\n".' -