Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2021-01-19 10:43:31 +01:00
commit 7ad7ad9bb8
6 changed files with 49 additions and 23 deletions

View File

@ -1,3 +1,7 @@
Barcode EAN 13
FR
==
Signification des chiffres. Signification des chiffres.
- 2 chiffres pour le code pays ou code systeme - 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 : 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 <20> 13 UCC (Etats-Unis et Canada) 00 <20> 13 UCC (Etats-Unis et Canada)
20 <20> 29 Codification interne en magasin 20 <20> 29 Codification interne en magasin
30 <20> 37 GENCOD-EAN France 30 <20> 37 GENCOD-EAN France
@ -104,4 +126,4 @@ Voici la liste des codes pays ou systeme :
978 - 979 Livres (ISBN) 978 - 979 Livres (ISBN)
980 Refus de remboursement 980 Refus de remboursement
981 - 982 Coupons (monnaie courante) 981 - 982 Coupons (monnaie courante)
99 Coupons 99 Coupons

View File

@ -1,5 +1,6 @@
* Page with license compatibility * 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 * FAQ on GPL license
https://www.fsf.org/licensing/licenses/gpl-faq.html https://www.fsf.org/licensing/licenses/gpl-faq.html

View File

@ -5,13 +5,13 @@ server {
root /path/to/your/htdocs; root /path/to/your/htdocs;
# Optionnal # Optional
error_log /path/to/your/log/directory/nginx.error.log; error_log /path/to/your/log/directory/nginx.error.log;
access_log /path/to/your/log/directory/nginx.access.log; access_log /path/to/your/log/directory/nginx.access.log;
index index.php index.html index.htm; index index.php index.html index.htm;
# Optionnal # Optional
server_name your-fqdn.tld; server_name your-fqdn.tld;
location / { location / {
@ -23,6 +23,6 @@ server {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 600; fastcgi_read_timeout 600;
include fastcgi_params; 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
} }
} }

View File

@ -6004,8 +6004,14 @@ abstract class CommonObject
} elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) { } elseif (preg_match('/^(integer|link):(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[2].':'.$reg[3] => 'N'); $param['options'] = array($reg[2].':'.$reg[3] => 'N');
$type = 'link'; $type = 'link';
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { } elseif (preg_match('/^(sellist):(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); $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'; $type = 'sellist';
} elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) { } elseif (preg_match('/varchar\((\d+)\)/', $val['type'], $reg)) {
$param['options'] = array(); $param['options'] = array();
@ -6172,24 +6178,20 @@ abstract class CommonObject
$keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid'); $keyList = (empty($InfoFieldList[2]) ? 'rowid' : $InfoFieldList[2].' as rowid');
if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
{ if (strpos($InfoFieldList[4], 'extra.') !== false) {
if (strpos($InfoFieldList[4], 'extra.') !== false)
{
$keyList = 'main.'.$InfoFieldList[2].' as rowid'; $keyList = 'main.'.$InfoFieldList[2].' as rowid';
} else { } else {
$keyList = $InfoFieldList[2].' as rowid'; $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]); list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
$keyList .= ', '.$parentField; $keyList .= ', '.$parentField;
} }
$fields_label = explode('|', $InfoFieldList[1]); $fields_label = explode('|', $InfoFieldList[1]);
if (is_array($fields_label)) if (is_array($fields_label)) {
{
$keyList .= ', '; $keyList .= ', ';
$keyList .= implode(', ', $fields_label); $keyList .= implode(', ', $fields_label);
} }
@ -6584,13 +6586,18 @@ abstract class CommonObject
$param['options'] = array(); $param['options'] = array();
if (!empty($val['arrayofkeyval']) && is_array($val['arrayofkeyval'])) $param['options'] = $val['arrayofkeyval']; 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'; $type = 'link';
$param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]); $param['options'] = array($reg[1].':'.$reg[2]=>$reg[1].':'.$reg[2]);
} elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) { } elseif (preg_match('/^sellist:(.*):(.*):(.*):(.*)/i', $val['type'], $reg)) {
$param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N'); $param['options'] = array($reg[1].':'.$reg[2].':'.$reg[3].':'.$reg[4] => 'N');
$type = 'sellist'; $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']; $langfile = $val['langfile'];
@ -6681,8 +6688,7 @@ abstract class CommonObject
$selectkey = "rowid"; $selectkey = "rowid";
$keyList = 'rowid'; $keyList = 'rowid';
if (count($InfoFieldList) >= 3) if (count($InfoFieldList) > 4 && !empty($InfoFieldList[4])) {
{
$selectkey = $InfoFieldList[2]; $selectkey = $InfoFieldList[2];
$keyList = $InfoFieldList[2].' as rowid'; $keyList = $InfoFieldList[2].' as rowid';
} }

View File

@ -280,13 +280,10 @@ class ProductFournisseur extends Product
} }
// Multicurrency // Multicurrency
$multicurrency_buyprice = null;
$multicurrency_unitBuyPrice = null; $multicurrency_unitBuyPrice = null;
$fk_multicurrency = null; $fk_multicurrency = null;
if (!empty($conf->multicurrency->enabled)) { if (!empty($conf->multicurrency->enabled)) {
if (empty($multicurrency_tx)) $multicurrency_tx = 1; if (empty($multicurrency_tx)) $multicurrency_tx = 1;
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0; if (empty($multicurrency_buyprice)) $multicurrency_buyprice = 0;
if ($multicurrency_price_base_type == 'TTC') if ($multicurrency_price_base_type == 'TTC')
{ {

View File

@ -70,7 +70,7 @@ class MyObject extends CommonObject
/** /**
* 'type' if the field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password') * 'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
* Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)" * Note: Filter can be a string like "(t.ref:like:'SO-%') or (t.date_creation:<:'20160101') or (t.nature:is:NULL)"
* 'label' the translation key. * 'label' the translation key.
* 'picto' is code of a picto to show before value in forms * 'picto' is code of a picto to show before value in forms