diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php
index 7e59ad4647f..fa965aade5b 100644
--- a/htdocs/asset/list.php
+++ b/htdocs/asset/list.php
@@ -317,7 +317,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
- print '
'.$langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall).'
';
+ print ''.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'
';
}
$moreforfilter = '';
diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php
index dc6e4aff17b..bc45d022e4d 100644
--- a/htdocs/comm/propal/list.php
+++ b/htdocs/comm/propal/list.php
@@ -491,7 +491,7 @@ if ($resql)
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
- print ''.$langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall).'
';
+ print ''.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'
';
}
$i = 0;
diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php
index 558d8186a86..0e851c78cff 100644
--- a/htdocs/commande/list.php
+++ b/htdocs/commande/list.php
@@ -529,7 +529,7 @@ if ($resql)
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
- print ''.$langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall).'
';
+ print ''.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'
';
}
$moreforfilter='';
diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php
index 19ffec25aca..5a8d1326e48 100644
--- a/htdocs/compta/bank/class/account.class.php
+++ b/htdocs/compta/bank/class/account.class.php
@@ -54,7 +54,7 @@ class Account extends CommonObject
/**
* @var int Use id instead of rowid
* @deprecated
- * @see id
+ * @see $id
*/
public $rowid;
@@ -1186,7 +1186,7 @@ class Account extends CommonObject
return -1;
}
- return $solde;
+ return price2num($solde, 'MU');
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php
index 0794634e3a3..79c26adfa47 100644
--- a/htdocs/compta/bank/list.php
+++ b/htdocs/compta/bank/list.php
@@ -255,7 +255,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
if ($sall)
{
foreach($fieldstosearchall as $key => $val) $fieldstosearchall[$key]=$langs->trans($val);
- print ''.$langs->trans("FilterOnInto", $all) . join(', ',$fieldstosearchall).'
';
+ print ''.$langs->trans("FilterOnInto", $sall) . join(', ',$fieldstosearchall).'
';
}
$moreforfilter='';
diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php
index c24059ecc05..dc4f1242894 100644
--- a/htdocs/core/class/commondocgenerator.class.php
+++ b/htdocs/core/class/commondocgenerator.class.php
@@ -243,10 +243,10 @@ abstract class CommonDocGenerator
/**
* Define array with couple subtitution key => subtitution value
*
- * @param Contact $object contact
+ * @param Contact $object contact
* @param Translate $outputlangs object for output
- * @param array_key $array_key Name of the key for return array
- * @return array of substitution key->code
+ * @param array $array_key Name of the key for return array
+ * @return array Array of substitution key->code
*/
function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
{
@@ -582,9 +582,9 @@ abstract class CommonDocGenerator
/**
* Define array with couple substitution key => substitution value
*
- * @param Expedition $object Main object to use as data source
+ * @param Expedition $object Main object to use as data source
* @param Translate $outputlangs Lang object to use for output
- * @param array_key $array_key Name of the key for return array
+ * @param array $array_key Name of the key for return array
* @return array Array of substitution
*/
function get_substitutionarray_shipment($object,$outputlangs,$array_key='object')
@@ -807,7 +807,7 @@ abstract class CommonDocGenerator
/**
* Rect pdf
*
- * @param PDF $pdf Object PDF
+ * @param TCPDF $pdf Object PDF
* @param float $x Abscissa of first point
* @param float $y Ordinate of first point
* @param float $l ??
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index 7860010d5f1..3f5b515e725 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -247,8 +247,8 @@ class ExtraFields
$typedb='varchar';
$lengthdb='255';
} elseif (($type=='select') || ($type=='sellist') || ($type=='radio') ||($type=='checkbox') ||($type=='chkbxlst')){
- $typedb='text';
- $lengthdb='';
+ $typedb='varchar';
+ $lengthdb='255';
} elseif ($type=='link') {
$typedb='int';
$lengthdb='11';
@@ -555,8 +555,8 @@ class ExtraFields
$typedb='varchar';
$lengthdb='255';
} elseif (($type=='select') || ($type=='sellist') || ($type=='radio') || ($type=='checkbox') || ($type=='chkbxlst')) {
- $typedb='text';
- $lengthdb='';
+ $typedb='varchar';
+ $lengthdb='255';
} elseif ($type == 'html') {
$typedb='text';
} elseif ($type=='link') {
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 04cc6705623..b2166453bbd 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -235,7 +235,7 @@ class FormProjets
}
else if ($obj->fk_statut == 2)
{
- if ($discard_close == 2) $disabled=1;
+ if ($discard_closed == 2) $disabled=1;
$labeltoshow.=' - '.$langs->trans("Closed");
}
else if ( empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY) && $socid > 0 && (! empty($obj->fk_soc) && $obj->fk_soc != $socid))
diff --git a/htdocs/core/lib/ajax.lib.php b/htdocs/core/lib/ajax.lib.php
index 8a39043a680..bb08018b7f6 100644
--- a/htdocs/core/lib/ajax.lib.php
+++ b/htdocs/core/lib/ajax.lib.php
@@ -546,7 +546,7 @@ function ajax_constantonoff($code, $input=array(), $entity=null, $revertonoff=0,
* @param string $text_on Text if on
* @param string $text_off Text if off
* @param array $input Array of type->list of CSS element to switch. Example: array('disabled'=>array(0=>'cssid'))
- * @return void
+ * @return string html for button on/off
*/
function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input=array())
{
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index faeb1f71e29..7888338cdc2 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -4571,6 +4571,7 @@ function price($amount, $form=0, $outlangs='', $trunc=1, $rounding=-1, $forcerou
* 'MU'=Round to Max unit price (MAIN_MAX_DECIMALS_UNIT)
* 'MT'=Round to Max for totals with Tax (MAIN_MAX_DECIMALS_TOT)
* 'MS'=Round to Max for stock quantity (MAIN_MAX_DECIMALS_STOCK)
+ * Numeric = Nb of digits for rounding
* @param int $alreadysqlnb Put 1 if you know that content is already universal format number
* @return string Amount with universal numeric format (Example: '99.99999') or unchanged text if conversion fails. If amount is null or '', it returns ''.
*
@@ -4621,7 +4622,7 @@ function price2num($amount,$rounding='',$alreadysqlnb=0)
if ($rounding == 'MU') $nbofdectoround=$conf->global->MAIN_MAX_DECIMALS_UNIT;
elseif ($rounding == 'MT') $nbofdectoround=$conf->global->MAIN_MAX_DECIMALS_TOT;
elseif ($rounding == 'MS') $nbofdectoround=empty($conf->global->MAIN_MAX_DECIMALS_STOCK)?5:$conf->global->MAIN_MAX_DECIMALS_STOCK;
- elseif (is_numeric($rounding)) $nbofdectoround=$rounding; // For admin info page
+ elseif (is_numeric($rounding)) $nbofdectoround=$rounding;
//print "RR".$amount.' - '.$nbofdectoround.'
';
if (dol_strlen($nbofdectoround)) $amount = round($amount,$nbofdectoround); // $nbofdectoround can be 0.
else return 'ErrorBadParameterProvidedToFunction';
diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php
index 942625cac5e..850e4c0dda3 100644
--- a/htdocs/expedition/class/expeditionbatch.class.php
+++ b/htdocs/expedition/class/expeditionbatch.class.php
@@ -39,6 +39,7 @@ class ExpeditionLineBatch extends CommonObject
var $eatby;
var $batch;
var $qty;
+ var $dluo_qty; // deprecated, use qty
var $entrepot_id;
var $fk_origin_stock;
var $fk_expeditiondet;
@@ -121,7 +122,7 @@ class ExpeditionLineBatch extends CommonObject
$sql.= " ".(! isset($this->sellby) || dol_strlen($this->sellby)==0?'NULL':("'".$this->db->idate($this->sellby))."'").",";
$sql.= " ".(! isset($this->eatby) || dol_strlen($this->eatby)==0?'NULL':("'".$this->db->idate($this->eatby))."'").",";
$sql.= " ".(! isset($this->batch)?'NULL':("'".$this->db->escape($this->batch)."'")).",";
- $sql.= " ".(! isset($this->qty)?'NULL':$this->qty).",";
+ $sql.= " ".(! isset($this->qty)?((! isset($this->dluo_qty))?'NULL':$this->dluo_qty):$this->qty).","; // dluo_qty deprecated, use qty
$sql.= " ".(! isset($this->fk_origin_stock)?'NULL':$this->fk_origin_stock);
$sql.= ")";
@@ -221,6 +222,7 @@ class ExpeditionLineBatch extends CommonObject
$tmp->id = $obj->rowid;
$tmp->fk_origin_stock = $obj->fk_origin_stock;
$tmp->fk_expeditiondet = $obj->fk_expeditiondet;
+ $tmp->dluo_qty = $obj->qty; // dluo_qty deprecated, use qty
$tmp->qty = $obj->qty;
$ret[]=$tmp;
diff --git a/htdocs/install/mysql/data/llx_c_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql
index db1ba19aa6e..5f561f26ba0 100644
--- a/htdocs/install/mysql/data/llx_c_currencies.sql
+++ b/htdocs/install/mysql/data/llx_c_currencies.sql
@@ -80,7 +80,7 @@ INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'HNL'
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'HKD', '[36]', 1, 'Hong Kong Dollar');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'HUF', '[70,116]', 1, 'Hungary Forint');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'ISK', '[107,114]', 1, 'Iceland Krona');
-INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'INR', NULL, 1, 'India Rupee');
+INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'INR', '[8377]', 1, 'India Rupee');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'IDR', '[82,112]', 1, 'Indonesia Rupiah');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'IRR', '[65020]', 1, 'Iran Rial');
INSERT INTO llx_c_currencies ( code_iso, unicode, active, label ) VALUES ( 'IMP', '[163]', 1, 'Isle of Man Pound');
diff --git a/htdocs/product/list.php b/htdocs/product/list.php
index 36bf5a24ef9..562d09056c7 100644
--- a/htdocs/product/list.php
+++ b/htdocs/product/list.php
@@ -757,34 +757,34 @@ if ($resql)
if (! $i) $totalarray['nbfield']++;
}
- // Duration
- if (! empty($arrayfields['p.duration']['checked']))
+ // Duration
+ if (! empty($arrayfields['p.duration']['checked']))
+ {
+ print '';
+
+ if (preg_match('/([^a-z]+)[a-z]$/i',$obj->duration))
{
- print ' | ';
+ $duration_value = substr($obj->duration,0,dol_strlen($obj->duration)-1);
+ $duration_unit = substr($obj->duration,-1);
- if (preg_match('/([^a-z]+)[a-z]$/i',$obj->duration))
+ if ((float) $duration_value > 1)
{
- $duration_value = substr($obj->duration,0,dol_strlen($obj->duration)-1);
- $duration_unit = substr($obj->duration,-1);
-
- if ((float) $duration_value > 1)
- {
- $dur=array("i"=>$langs->trans("Minutes"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years"));
- }
- else if ((float) $duration_value > 0)
- {
- $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year"));
- }
- print $duration_value;
- print (! empty($duration_unit) && isset($dur[$duration_unit]) ? ' '.$langs->trans($dur[$duration_unit]) : '');
+ $dur=array("i"=>$langs->trans("Minutes"),"h"=>$langs->trans("Hours"),"d"=>$langs->trans("Days"),"w"=>$langs->trans("Weeks"),"m"=>$langs->trans("Months"),"y"=>$langs->trans("Years"));
}
- else
+ else if ((float) $duration_value > 0)
{
- print $obj->duration;
+ $dur=array("i"=>$langs->trans("Minute"),"h"=>$langs->trans("Hour"),"d"=>$langs->trans("Day"),"w"=>$langs->trans("Week"),"m"=>$langs->trans("Month"),"y"=>$langs->trans("Year"));
}
- print ' | ';
- if (! $i) $totalarray['nbfield']++;
+ print $duration_value;
+ print (! empty($duration_unit) && isset($dur[$duration_unit]) ? ' '.$langs->trans($dur[$duration_unit]) : '');
}
+ else
+ {
+ print $obj->duration;
+ }
+ print '';
+ if (! $i) $totalarray['nbfield']++;
+ }
// Sell price
if (! empty($arrayfields['p.sellprice']['checked']))
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 6e8d4aa7394..2aa8dc6fcc7 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -127,7 +127,7 @@ $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_stock as s on p.rowid = s.fk_produc
if ($search_categ) $sql.= ", ".MAIN_DB_PREFIX."categorie_product as cp";
$sql.= " WHERE p.entity IN (".getEntity('product').")";
if ($search_categ) $sql.= " AND p.rowid = cp.fk_product"; // Join for the needed table to filter by categ
-if ($sall) $sql.=natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $all);
+if ($sall) $sql.=natural_search(array('p.ref', 'p.label', 'p.description', 'p.note'), $sall);
// if the type is not 1, we show all products (type = 0,2,3)
if (dol_strlen($type))
{
diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php
index 2ec97ec7a9d..2b760fcd894 100644
--- a/htdocs/theme/md/style.css.php
+++ b/htdocs/theme/md/style.css.php
@@ -1529,7 +1529,7 @@ div#tmenu_tooltip {
background: rgb();
/*
- background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
+ background-image: linear-gradient(to top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(128,128,128,.3) 100%);
@@ -1610,7 +1610,7 @@ ul.tmenu { /* t r b l */
ul.tmenu li {
background: rgb();
/*
- background-image: linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
+ background-image: linear-gradient(to top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image: -o-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image: -moz-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
background-image: -webkit-linear-gradient(top, rgba(255,255,255,.3) 0%, rgba(0,0,0,.3) 100%);
@@ -2906,7 +2906,7 @@ div.pagination li.paginationafterarrows {
/* Prepare to remove class pair - impair
.noborder > tbody > tr:nth-child(even) td {
- background: linear-gradient(bottom, rgb() 85%, rgb() 100%);
+ background: linear-gradient(to bottom, rgb() 85%, rgb() 100%);
background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%);
@@ -2919,7 +2919,7 @@ div.pagination li.paginationafterarrows {
}
.noborder > tbody > tr:nth-child(odd) td {
- background: linear-gradient(bottom, rgb() 85%, rgb() 100%);
+ background: linear-gradient(to bottom, rgb() 85%, rgb() 100%);
background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%);
@@ -3184,7 +3184,7 @@ div .tdtop {
/* Prepare to remove class pair - impair */
.noborder > tbody > tr:nth-child(even):not(.liste_titre), .liste > tbody > tr:nth-child(even):not(.liste_titre) {
- background: linear-gradient(bottom, rgb() 85%, rgb() 100%);
+ background: linear-gradient(to bottom, rgb() 85%, rgb() 100%);
background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%);
@@ -3195,7 +3195,7 @@ div .tdtop {
}
.noborder > tbody > tr:nth-child(odd):not(.liste_titre), .liste > tbody > tr:nth-child(odd):not(.liste_titre) {
- background: linear-gradient(bottom, rgb() 85%, rgb() 100%);
+ background: linear-gradient(to bottom, rgb() 85%, rgb() 100%);
background: -o-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -moz-linear-gradient(bottom, rgb() 85%, rgb() 100%);
background: -webkit-linear-gradient(bottom, rgb() 85%, rgb() 100%);
@@ -3241,7 +3241,7 @@ div .tdtop {
.boxstats130 {
width: 135px;
height: 48px;
- padding: 3px
+ padding: 3px;
}
@media only screen and (max-width: 767px)
{