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 1/4] 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 9f0c3b0db1a665a3daeb3d099fc357363f382933 Mon Sep 17 00:00:00 2001
From: atm-lena
Date: Tue, 28 Jul 2020 15:13:56 +0200
Subject: [PATCH 2/4] 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 3/4] 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 d9191c74d8f3212d20125e47c4faed056d6e4214 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Wed, 29 Jul 2020 12:59:59 +0200
Subject: [PATCH 4/4] 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)."'";