From 93348630bfd9d57f2bd0cb492d770234ec5d4c78 Mon Sep 17 00:00:00 2001
From: FlorianMortgat <5845502+FlorianMortgat@users.noreply.github.com>
Date: Sat, 25 Jul 2020 11:05:05 +0200
Subject: [PATCH 01/10] FIX 11.0: computation of the bottom margin of
returns NaN because body is not loaded yet
---
htdocs/includes/DebugBar/Resources/debugbar.js | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/htdocs/includes/DebugBar/Resources/debugbar.js b/htdocs/includes/DebugBar/Resources/debugbar.js
index faf567e37c1..1dcbec2146f 100644
--- a/htdocs/includes/DebugBar/Resources/debugbar.js
+++ b/htdocs/includes/DebugBar/Resources/debugbar.js
@@ -409,12 +409,11 @@ if (typeof(PhpDebugBar) == 'undefined') {
className: "phpdebugbar " + csscls('minimized'),
- options: {
- bodyMarginBottom: true,
- bodyMarginBottomHeight: parseInt($('body').css('margin-bottom'))
- },
-
initialize: function() {
+ this.options = {
+ bodyMarginBottom: true,
+ bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
+ };
this.controls = {};
this.dataMap = {};
this.datasets = {};
From 25994e61bce5d8d165dd5fd91fcd9d5113b8b6da Mon Sep 17 00:00:00 2001
From: VERDOL Gauthier
Date: Mon, 27 Jul 2020 16:04:21 +0200
Subject: [PATCH 02/10] FIX : We need to see unit line on PDF even though it's
an option
---
htdocs/core/lib/pdf.lib.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php
index af1da161dc7..1d9d218f7af 100644
--- a/htdocs/core/lib/pdf.lib.php
+++ b/htdocs/core/lib/pdf.lib.php
@@ -1826,7 +1826,6 @@ function pdf_getlineunit($object, $i, $outputlangs, $hidedetails = 0, $hookmanag
}
if (empty($reshook))
{
- if ($object->lines[$i]->special_code == 3) return '';
if (empty($hidedetails) || $hidedetails > 1) $result.=$langs->transnoentitiesnoconv($object->lines[$i]->getLabelOfUnit('short'));
}
return $result;
From ee55b82a8d7449b53f649417102ffb43e2e9e5cb Mon Sep 17 00:00:00 2001
From: Marc DLL <68746600@users.noreply.github.com>
Date: Mon, 27 Jul 2020 23:27:44 +0200
Subject: [PATCH 03/10] FIX: shipping creation: checks not done on weight and
sizes
---
htdocs/expedition/class/expedition.class.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php
index b623ea9c629..8417ddb9bfb 100644
--- a/htdocs/expedition/class/expedition.class.php
+++ b/htdocs/expedition/class/expedition.class.php
@@ -321,10 +321,10 @@ class Expedition extends CommonObject
$sql.= ", ".($this->fk_delivery_address>0?$this->fk_delivery_address:"null");
$sql.= ", ".($this->shipping_method_id>0?$this->shipping_method_id:"null");
$sql.= ", '".$this->db->escape($this->tracking_number)."'";
- $sql.= ", ".$this->weight;
- $sql.= ", ".$this->sizeS; // TODO Should use this->trueDepth
- $sql.= ", ".$this->sizeW; // TODO Should use this->trueWidth
- $sql.= ", ".$this->sizeH; // TODO Should use this->trueHeight
+ $sql.= ", ".(is_numeric($this->weight)?$this->weight:'NULL');
+ $sql.= ", ".(is_numeric($this->sizeS)?$this->sizeS:'NULL'); // TODO Should use this->trueDepth
+ $sql.= ", ".(is_numeric($this->sizeW)?$this->sizeW:'NULL'); // TODO Should use this->trueWidth
+ $sql.= ", ".(is_numeric($this->sizeH)?$this->sizeH:'NULL'); // TODO Should use this->trueHeight
$sql.= ", ".($this->weight_units != '' ? (int) $this->weight_units : 'NULL');
$sql.= ", ".($this->size_units != '' ? (int) $this->size_units : 'NULL');
$sql.= ", ".(!empty($this->note_private)?"'".$this->db->escape($this->note_private)."'":"null");
From 9f0c3b0db1a665a3daeb3d099fc357363f382933 Mon Sep 17 00:00:00 2001
From: atm-lena
Date: Tue, 28 Jul 2020 15:13:56 +0200
Subject: [PATCH 04/10] fetch() command fourn : Same management as
commande.class.php of entity
---
htdocs/fourn/class/fournisseur.commande.class.php | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index cd35e1d34de..c6c06a8d9b7 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -331,8 +331,11 @@ class CommandeFournisseur extends CommonOrder
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
$sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
+
+ if(empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
+ else $sql .= " WHERE c.rowid=".$id;
+
if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'";
- else $sql .= " AND c.rowid=".$id;
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
$resql = $this->db->query($sql);
From b480fb2dfcf73c3331a66b9cbb0bc33c1cd5e3c9 Mon Sep 17 00:00:00 2001
From: atm-lena
Date: Tue, 28 Jul 2020 15:32:58 +0200
Subject: [PATCH 05/10] Delete double line
---
htdocs/fourn/class/fournisseur.commande.class.php | 1 -
1 file changed, 1 deletion(-)
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index c6c06a8d9b7..fc76a158cab 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -330,7 +330,6 @@ class CommandeFournisseur extends CommonOrder
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_paiement as p ON c.fk_mode_reglement = p.id";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
- $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
if(empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
else $sql .= " WHERE c.rowid=".$id;
From d214dbb5fd4f99216466265254d84e6c1148965a Mon Sep 17 00:00:00 2001
From: VERDOL Gauthier
Date: Tue, 28 Jul 2020 15:42:54 +0200
Subject: [PATCH 06/10] FIX : Order by amount in product propal stats must be
done on d.total_ht and not p.total
---
htdocs/product/stats/propal.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/product/stats/propal.php b/htdocs/product/stats/propal.php
index 208ff49e158..52f0510cb80 100644
--- a/htdocs/product/stats/propal.php
+++ b/htdocs/product/stats/propal.php
@@ -208,7 +208,7 @@ if ($id > 0 || ! empty($ref))
print_liste_field_titre("Company", $_SERVER["PHP_SELF"], "s.nom", "", $option, '', $sortfield, $sortorder);
print_liste_field_titre("DatePropal", $_SERVER["PHP_SELF"], "p.datep", "", $option, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Qty", $_SERVER["PHP_SELF"], "d.qty", "", $option, 'align="center"', $sortfield, $sortorder);
- print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "p.total", "", $option, 'align="right"', $sortfield, $sortorder);
+ print_liste_field_titre("AmountHT", $_SERVER["PHP_SELF"], "d.total_ht", "", $option, 'align="right"', $sortfield, $sortorder);
print_liste_field_titre("Status", $_SERVER["PHP_SELF"], "p.fk_statut", "", $option, 'align="right"', $sortfield, $sortorder);
print "\n";
From 8ee5b16e895f39b3126a553a61ace03cbe29b14b Mon Sep 17 00:00:00 2001
From: lvessiller
Date: Wed, 29 Jul 2020 12:00:22 +0200
Subject: [PATCH 07/10] FIX redirect on contact card from main search
---
htdocs/contact/list.php | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index b0db8b0affb..b8f9d3d14a4 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -389,8 +389,8 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->plimit($limit+1, $offset);
-$result = $db->query($sql);
-if (! $result)
+$resql = $db->query($sql);
+if (! $resql)
{
dol_print_error($db);
exit;
@@ -763,7 +763,7 @@ $i = 0;
$totalarray=array();
while ($i < min($num, $limit))
{
- $obj = $db->fetch_object($result);
+ $obj = $db->fetch_object($resql);
print '';
@@ -980,7 +980,7 @@ while ($i < min($num, $limit))
$i++;
}
-$db->free($result);
+$db->free($resql);
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter', $parameters); // Note that $action and $object may have been modified by hook
From d9191c74d8f3212d20125e47c4faed056d6e4214 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Jul 2020 12:59:59 +0200
Subject: [PATCH 08/10] Update fournisseur.commande.class.php
---
htdocs/fourn/class/fournisseur.commande.class.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php
index fc76a158cab..dd34555dd79 100644
--- a/htdocs/fourn/class/fournisseur.commande.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.class.php
@@ -331,7 +331,7 @@ class CommandeFournisseur extends CommonOrder
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_input_method as cm ON cm.rowid = c.fk_input_method";
$sql .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_incoterms as i ON c.fk_incoterms = i.rowid';
- if(empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
+ if (empty($id)) $sql .= " WHERE c.entity IN (".getEntity('supplier_order').")";
else $sql .= " WHERE c.rowid=".$id;
if ($ref) $sql .= " AND c.ref='".$this->db->escape($ref)."'";
From 6bd450dcd022b33ad5cf2a75cad42ab50ea8d4d5 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Jul 2020 13:10:31 +0200
Subject: [PATCH 09/10] Doc
---
dev/dolibarr_changes.txt | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt
index 48c6bf342a9..169fa27b5bd 100644
--- a/dev/dolibarr_changes.txt
+++ b/dev/dolibarr_changes.txt
@@ -8,6 +8,7 @@ ALL:
Check "@CHANGE"
+
PrestaShopWebservice:
---------------------
Replace
@@ -27,6 +28,19 @@ With
+DEBUGBAR:
+---------
+
+Move
+ this.options = {
+ bodyMarginBottom: true,
+ bodyMarginBottomHeight: parseInt($('body').css('margin-bottom')),
+ };
+few line lower in the
+ initialize: function() {
+
+
+
ESCPOS:
-------
Replace
From 4a291f181fadca23d9843e1043ec15112d5dbf38 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Jul 2020 13:47:04 +0200
Subject: [PATCH 10/10] Fix regression
---
htdocs/contact/list.php | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/htdocs/contact/list.php b/htdocs/contact/list.php
index bb8f9497969..dbdc9388404 100644
--- a/htdocs/contact/list.php
+++ b/htdocs/contact/list.php
@@ -365,8 +365,8 @@ else
$nbtotalofrecords = '';
if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
{
- $result = $db->query($sql);
- $nbtotalofrecords = $db->num_rows($result);
+ $resql = $db->query($sql);
+ $nbtotalofrecords = $db->num_rows($resql);
if (($page * $limit) > $nbtotalofrecords) // if total resultset is smaller then paging size (filtering), goto and load page 0
{
$page = 0;
@@ -376,18 +376,18 @@ if (empty($conf->global->MAIN_DISABLE_FULL_SCANLIST))
$sql.= $db->plimit($limit+1, $offset);
-$result = $db->query($sql);
-if (! $result)
+$resql = $db->query($sql);
+if (! $resql)
{
dol_print_error($db);
exit;
}
-$num = $db->num_rows($result);
+$num = $db->num_rows($resql);
$arrayofselected=is_array($toselect)?$toselect:array();
-if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $seearch_cti != ''))
+if ($num == 1 && ! empty($conf->global->MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE) && ($sall != '' || $search_cti != ''))
{
$obj = $db->fetch_object($resql);
$id = $obj->rowid;
@@ -715,7 +715,7 @@ $i = 0;
$totalarray=array();
while ($i < min($num,$limit))
{
- $obj = $db->fetch_object($result);
+ $obj = $db->fetch_object($resql);
print '';
@@ -914,7 +914,7 @@ while ($i < min($num,$limit))
$i++;
}
-$db->free($result);
+$db->free($resql);
$parameters=array('arrayfields'=>$arrayfields, 'sql'=>$sql);
$reshook=$hookmanager->executeHooks('printFieldListFooter',$parameters); // Note that $action and $object may have been modified by hook