';
// Details per warehouse
From 817920f282c517ad39cbf4d0d17392c56dde16ef Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 12 Oct 2018 17:36:49 +0200
Subject: [PATCH 18/40] Prepare 6.0.8
---
ChangeLog | 31 +++++++++++++++++++++++++++++++
1 file changed, 31 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 405aaa9ed9d..1bffab94cda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,37 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
+***** ChangeLog for 6.0.8 compared to 6.0.7 *****
+FIX: #8762
+FIX: #9032
+FIX: case when we valid form with keyboard
+FIX: clause must not be there
+FIX: dol_delete_file must work in a context without db handler loaded
+FIX: entity test must be on product_fourn_price table and not product table
+FIX: Fetch shipping will now fetch project id
+FIX: $fk_account is always empty, must be $soc->fk_account
+FIX: getEntity project and not projet
+FIX: If we enable 3 steps for supplier order approbation, we must no…
+FIX: If we enable 3 steps for supplier order approbation, we must not delete all fourn rights def.
+FIX: Keep supplier proposal price for supplier order
+FIX: langs fr
+FIX: missing filters during ordering
+FIX: missing filters during reordering
+FIX: need to filter on aa.entity for same accounting accounts available in several entities
+FIX: page must always be 0 when we search
+FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
+FIX: PDF address: handle when contact thirdparty different from document thirdparty
+FIX: propal: correctly preset project when creating with origin/originid
+FIX: pu_ht_devise was not converted to numeric so decimals were lost
+FIX: pu_ht_devise was not converted to numeric so decimals were lost when calculating total_ht_devise
+FIX: remain to pay for credit note was wrong on invoice list
+FIX: shipment: fk_proje(c)t not handled in fetch() and update() methods
+FIX: showOptionals: column mismatches
+FIX: sometimes amounts are identical but php find them different.
+FIX: test is_erasable() must be done before call function delete()
+FIX: test is_erasable() must be done before call function delete() too to avoid delete invoice with &action=delete in url
+FIX: we must see number of all shared projects
+FIX: wrong var name
***** ChangeLog for 6.0.7 compared to 6.0.6 *****
FIX: #8023
From afd9b4ea1a793ffcee8de396e24dc9a21a71ef4d Mon Sep 17 00:00:00 2001
From: Marc de Lima Lucio
Date: Fri, 12 Oct 2018 18:19:17 +0200
Subject: [PATCH 19/40] FIX: propal pdf: missing parenthesis for customs code
---
htdocs/comm/propal/card.php | 1 +
1 file changed, 1 insertion(+)
diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php
index 2fdaadd1d59..c21e6ebec10 100644
--- a/htdocs/comm/propal/card.php
+++ b/htdocs/comm/propal/card.php
@@ -868,6 +868,7 @@ if (empty($reshook))
// Add custom code and origin country into description
if (empty($conf->global->MAIN_PRODUCT_DISABLE_CUSTOMCOUNTRYCODE) && (! empty($prod->customcode) || ! empty($prod->country_code)))
{
+ $tmptxt = '(';
// Define output language
if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) {
$outputlangs = $langs;
From d4b02c05524b89ecfb70c78b45be3e293fb484ff Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 12 Oct 2018 19:03:03 +0200
Subject: [PATCH 20/40] Release 6.0.8
---
htdocs/filefunc.inc.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php
index 9ab5de809b9..41fcff97fd8 100644
--- a/htdocs/filefunc.inc.php
+++ b/htdocs/filefunc.inc.php
@@ -31,7 +31,7 @@
*/
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
-if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.8'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
+if (! defined('DOL_VERSION')) define('DOL_VERSION','6.0.9'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (! defined('EURO')) define('EURO',chr(128));
From bb606df5e064351715196bd7b1528e3629c53e10 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 12 Oct 2018 19:12:20 +0200
Subject: [PATCH 21/40] Prepare 7.0.4
---
ChangeLog | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index bdbb165903d..0a74e1b6f8e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,63 @@
English Dolibarr ChangeLog
--------------------------------------------------------------
+
+***** ChangeLog for 7.0.4 compared to 7.0.3 *****
+FIX: #8984 button create expense report
+FIX: #9032
+FIX: #9161
+FIX: #9328
+FIX: According to french law, if seller is in France and buyer isn't in UE and isn't a company, TVA used = TVA product
+FIX: Add calls to fetchComments function
+FIX: better compatibility with multicompany
+FIX: case when we valid form with keyboard
+FIX: character making error on bill list
+FIX: check !empty exclude select element
+FIX: combo into popup become crazy with IE10
+FIX: combo of stock in popup are crazy in IE
+FIX: Deletion of files in migration
+FIX: exclude element of the select
+FIX: extrafieldkey
+FIX: Fetch function will fetch comments
+FIX: Fetch task will now fetch comments
+FIX: filter supplier invoice list by societe name.
+FIX: $fk_account is always empty, must be $soc->fk_account
+FIX: Force stripe api version to avoid trouble if we update stripe api
+FIX: getEntity project and not projet
+FIX: Get templates in a forced language
+FIX: global $mysoc missing (to avoid php notice on lines 279, 280 & 281)
+FIX: Injection
+FIX: invoice stats: situation invoices were not counted
+FIX: keep context filter on contact list on change column displayed
+FIX: Keep same project when creating shipping from order
+FIX: langs fr
+FIX: Lose filter on payment type or category after a sort on invoice list
+FIX: Missing behavior
+FIX: missing hook to edit sql
+FIX: multicompany compatibility !
+FIX: need to filter on current entity on replenish
+FIX: Option MAIN_DISABLE_NOTES_TAB #9611
+FIX: page must always be 0 when we search (to avoid case : when we're on page 3 and we're looking for a precise thirdparty, we stay on page 3 and nothing's displaied)
+FIX: Pagination on related item pages
+FIX: Pagination on withdraw request list
+FIX: PDF address: handle when contact thirdparty different from document thirdparty
+FIX: PHP warning, undefined index notnull
+FIX: Product marge tabs on product card
+FIX: Product margin tab and credit note
+FIX: propal: correctly preset project when creating with origin/originid
+FIX: remain to pay for credit note was wrong on invoice list
+FIX: remove debug
+FIX: Remove fetchComments from project and task fetch function
+FIX: remove rowid for multicompany compatibility
+FIX: Search on Ref project on order list
+FIX: search on ref project on propal list
+FIX: showOptionals: column mismatches
+FIX: SQL Injections reported by mu shcor (ADLab of Venustech)
+FIX: stock replenish with multientity
+FIX: table llx_chargessociales doesn't exists
+FIX: we must see number of all shared projects
+FIX: when stock is empty for current entity but > 0 in other entity, until this commit product wasn't displaied on replenishment, it must depends on multientity stock sharing
+
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
FIX: 7.0 task contact card without withproject parameters
FIX: #8722
From bd60fe6ffda132beacb69bfd492c04f4212f9a61 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 12 Oct 2018 19:13:11 +0200
Subject: [PATCH 22/40] Prepare 7.0.4
---
ChangeLog | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index 0a74e1b6f8e..61b3f85edb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -58,6 +58,11 @@ FIX: stock replenish with multientity
FIX: table llx_chargessociales doesn't exists
FIX: we must see number of all shared projects
FIX: when stock is empty for current entity but > 0 in other entity, until this commit product wasn't displaied on replenishment, it must depends on multientity stock sharing
+FIX: when we're just admin and not super admin, if we create new user with transverse mode, we don't see it then we can't add him in usergroup
+FIX: wrong function name
+FIX: Wrong position of firstname lastname
+FIX: wrong value for module part and return access denied
+FIX: Wrong variable and trigger name
***** ChangeLog for 7.0.3 compared to 7.0.2 *****
FIX: 7.0 task contact card without withproject parameters
From b78932b9f7679cec79d97cf6b0046c6bdec3bde4 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur
Date: Fri, 12 Oct 2018 21:11:40 +0200
Subject: [PATCH 23/40] Prepare 7.0.5
---
htdocs/filefunc.inc.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php
index adfe8cea7e9..dbc0e4bda8c 100644
--- a/htdocs/filefunc.inc.php
+++ b/htdocs/filefunc.inc.php
@@ -31,7 +31,7 @@
*/
if (! defined('DOL_APPLICATION_TITLE')) define('DOL_APPLICATION_TITLE','Dolibarr');
-if (! defined('DOL_VERSION')) define('DOL_VERSION','7.0.4'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
+if (! defined('DOL_VERSION')) define('DOL_VERSION','7.0.5'); // a.b.c-alpha, a.b.c-beta, a.b.c-rcX or a.b.c
if (! defined('EURO')) define('EURO',chr(128));
From e2748953c3a7e8b0de07f504124bcc183ec90efb Mon Sep 17 00:00:00 2001
From: atm-ph
Date: Fri, 12 Oct 2018 22:31:47 +0200
Subject: [PATCH 24/40] Fix print extrafield date in list
---
htdocs/core/tpl/extrafields_list_print_fields.tpl.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
index 855794da2d6..6d72c63ab41 100644
--- a/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
+++ b/htdocs/core/tpl/extrafields_list_print_fields.tpl.php
@@ -21,7 +21,7 @@ if (! empty($extrafieldsobjectkey)) // New method: $extrafieldsobject can be 'so
if ($align) print ' align="'.$align.'"';
print '>';
$tmpkey='options_'.$key;
- if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !preg_match('/^[0-9]{10}$/', $obj->$tmpkey))
+ if (in_array($extrafields->attributes[$extrafieldsobjectkey]['type'][$key], array('date', 'datetime', 'timestamp')) && !is_numeric($obj->$tmpkey))
{
$value = $db->jdate($obj->$tmpkey);
}
From 23e4cd57f33f8575f2a52912569063e091ae9c7e Mon Sep 17 00:00:00 2001
From: atm-ph
Date: Fri, 12 Oct 2018 23:27:38 +0200
Subject: [PATCH 25/40] Fix warnings PHP7
---
htdocs/product/reassort.php | 1 +
htdocs/product/reassortlot.php | 1 +
htdocs/product/stock/productlot_list.php | 3 ++-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index 70dce7470cd..b1b612d1a39 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -54,6 +54,7 @@ $fourn_id = GETPOST("fourn_id",'int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
+if (empty($page) || $page < 0) $page = 0;
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="ASC";
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index 490986b155e..e1b6c82c8f3 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -58,6 +58,7 @@ $fourn_id = GETPOST("fourn_id",'int');
$sortfield = GETPOST("sortfield",'alpha');
$sortorder = GETPOST("sortorder",'alpha');
$page = GETPOST("page",'int');
+if (empty($page) || $page < 0) $page = 0;
if (! $sortfield) $sortfield="p.ref";
if (! $sortorder) $sortorder="ASC";
$limit = GETPOST('limit')?GETPOST('limit','int'):$conf->liste_limit;
diff --git a/htdocs/product/stock/productlot_list.php b/htdocs/product/stock/productlot_list.php
index 325ddd5f796..8e5e5d925e9 100644
--- a/htdocs/product/stock/productlot_list.php
+++ b/htdocs/product/stock/productlot_list.php
@@ -47,6 +47,7 @@ $id = GETPOST('id','int');
$action = GETPOST('action','alpha');
$backtopage = GETPOST('backtopage');
$myparam = GETPOST('myparam','alpha');
+$toselect = GETPOST('toselect', 'array');
$search_entity=GETPOST('search_entity','int');
@@ -152,7 +153,7 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$search_import_key='';
$search_date_creation='';
$search_date_update='';
- $toselect='';
+ $toselect=array();
$search_array_options=array();
}
From 7b17b453bf38b0864cb7772effd1e1f25ef9026b Mon Sep 17 00:00:00 2001
From: atm-ph
Date: Fri, 12 Oct 2018 23:29:35 +0200
Subject: [PATCH 26/40] Fix sort and switch page
---
htdocs/product/reassort.php | 35 ++++++++++++++-------------
htdocs/product/reassortlot.php | 43 +++++++++++++++++++---------------
2 files changed, 43 insertions(+), 35 deletions(-)
diff --git a/htdocs/product/reassort.php b/htdocs/product/reassort.php
index b1b612d1a39..fe087fd16a3 100644
--- a/htdocs/product/reassort.php
+++ b/htdocs/product/reassort.php
@@ -92,11 +92,15 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$sref="";
$snom="";
$sall="";
+ $tosell="";
+ $tobuy="";
$search_sale="";
$search_categ="";
$type="";
$catid='';
$toolowstock='';
+ $fourn_id='';
+ $sbarcode='';
}
@@ -183,6 +187,20 @@ if ($resql)
}
$texte.=' ('.$langs->trans("Stocks").')';
+ $param='';
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if ($sall) $param.="&sall=".$sall;
+ if ($tosell) $param.="&tosell=".$tosell;
+ if ($tobuy) $param.="&tobuy=".$tobuy;
+ if ($type) $param.="&type=".$type;
+ if ($fourn_id) $param.="&fourn_id=".$fourn_id;
+ if ($snom) $param.="&snom=".$snom;
+ if ($sref) $param.="&sref=".$sref;
+ if ($search_sale) $param.="&search_sale=".$search_sale;
+ if ($search_categ) $param.="&search_categ=".$search_categ;
+ if ($toolowstock) $param.="&toolowstock=".$toolowstock;
+ if ($sbarcode) $param.="&sbarcode=".$sbarcode;
+ if ($catid) $param.="&catid=".$catid;
llxHeader("", $texte, $helpurl);
@@ -193,14 +211,7 @@ if ($resql)
print '';
print '';
- if ($sref || $snom || $sall || GETPOST('search'))
- {
- print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy.(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
- }
- else
- {
- print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":"").(!empty($search_categ) ? '&search_categ='.$search_categ : '').(!empty($toolowstock) ? '&toolowstock='.$toolowstock : ''), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
- }
+ print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
if (! empty($catid))
{
@@ -236,14 +247,6 @@ if ($resql)
print '';
}
- $param='';
- if ($tosell) $param.="&tosell=".$tosell;
- if ($tobuy) $param.="&tobuy=".$tobuy;
- if ($type) $param.="&type=".$type;
- if ($fourn_id) $param.="&fourn_id=".$fourn_id;
- if ($snom) $param.="&snom=".$snom;
- if ($sref) $param.="&sref=".$sref;
-
$formProduct = new FormProduct($db);
$formProduct->loadWarehouses();
$warehouses_list = $formProduct->cache_warehouses;
diff --git a/htdocs/product/reassortlot.php b/htdocs/product/reassortlot.php
index e1b6c82c8f3..7cedbcd3981 100644
--- a/htdocs/product/reassortlot.php
+++ b/htdocs/product/reassortlot.php
@@ -89,6 +89,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$sref="";
$snom="";
$sall="";
+ $tosell="";
+ $tobuy="";
$search_sale="";
$search_categ="";
$type="";
@@ -96,6 +98,8 @@ if (GETPOST('button_removefilter_x','alpha') || GETPOST('button_removefilter.x',
$toolowstock='';
$search_batch='';
$search_warehouse='';
+ $fourn_id='';
+ $sbarcode='';
}
@@ -194,6 +198,24 @@ if ($resql)
}
$texte.=' ('.$langs->trans("StocksByLotSerial").')';
+ $param='';
+ if ($limit > 0 && $limit != $conf->liste_limit) $param.='&limit='.$limit;
+ if ($sall) $param.="&sall=".$sall;
+ if ($tosell) $param.="&tosell=".$tosell;
+ if ($tobuy) $param.="&tobuy=".$tobuy;
+ if ($type) $param.="&type=".$type;
+ if ($fourn_id) $param.="&fourn_id=".$fourn_id;
+ if ($snom) $param.="&snom=".$snom;
+ if ($sref) $param.="&sref=".$sref;
+ if ($search_batch) $param.="&search_batch=".$search_batch;
+ if ($sbarcode) $param.="&sbarcode=".$sbarcode;
+ if ($search_warehouse) $param.="&search_warehouse=".$search_warehouse;
+ if ($catid) $param.="&catid=".$catid;
+ if ($toolowstock) $param.="&toolowstock=".$toolowstock;
+ if ($search_sale) $param.="&search_sale=".$search_sale;
+ if ($search_categ) $param.="&search_categ=".$search_categ;
+ /*if ($eatby) $param.="&eatby=".$eatby;
+ if ($sellby) $param.="&sellby=".$sellby;*/
llxHeader("",$title,$helpurl,$texte);
@@ -204,14 +226,8 @@ if ($resql)
print '';
print '';
- if ($sref || $snom || $sall || GETPOST('search'))
- {
- print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=".$sref."&snom=".$snom."&sall=".$sall."&tosell=".$tosell."&tobuy=".$tobuy, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
- }
- else
- {
- print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], "&sref=$sref&snom=$snom&fourn_id=$fourn_id".(isset($type)?"&type=$type":""), $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
- }
+ print_barre_liste($texte, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder,'',$num, $nbtotalofrecords, 'title_products', 0, '', '', $limit);
+
if (! empty($catid))
{
@@ -245,17 +261,6 @@ if ($resql)
}
- $param='';
- if ($tosell) $param.="&tosell=".$tosell;
- if ($tobuy) $param.="&tobuy=".$tobuy;
- if ($type) $param.="&type=".$type;
- if ($fourn_id) $param.="&fourn_id=".$fourn_id;
- if ($snom) $param.="&snom=".$snom;
- if ($sref) $param.="&sref=".$sref;
- if ($search_batch) $param.="&search_batch=".$search_batch;
- /*if ($eatby) $param.="&eatby=".$eatby;
- if ($sellby) $param.="&sellby=".$sellby;*/
-
print '
';
print '
';
From 1f1a614b47d7a0e8a37f496920a2f15f2ab8a189 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?=
Date: Sun, 14 Oct 2018 10:21:06 +0200
Subject: [PATCH 27/40] Update import.lib.php
---
htdocs/core/lib/import.lib.php | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/htdocs/core/lib/import.lib.php b/htdocs/core/lib/import.lib.php
index 89847d69c11..ea700c38845 100644
--- a/htdocs/core/lib/import.lib.php
+++ b/htdocs/core/lib/import.lib.php
@@ -1,8 +1,9 @@
- * Copyright (C) 2007 Rodolphe Quiedeville
- * Copyright (C) 2010 Regis Houssin
- * Copyright (C) 2010 Juanjo Menent
+/* Copyright (C) 2006-2009 Laurent Destailleur
+ * Copyright (C) 2007 Rodolphe Quiedeville
+ * Copyright (C) 2010 Regis Houssin
+ * Copyright (C) 2010 Juanjo Menent
+ * Copyright (C) 2018 Frédéric 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
@@ -20,10 +21,9 @@
*/
/**
- * \file htdocs/core/lib/order.lib.php
- * \brief Ensemble de fonctions de base pour le module commande
- * \ingroup commande
- */
+ * \file htdocs/core/lib/import.lib.php
+ * \brief Ensemble de fonctions de base pour le module import
+ * \ingroup import
/**
* Function to return list of tabs for import pages
From 70a98743e807a819fc8ec01fa92e5085f2d082c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?=
Date: Sun, 14 Oct 2018 10:48:06 +0200
Subject: [PATCH 28/40] Update functions.lib.php
---
htdocs/core/lib/functions.lib.php | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php
index 9cbd8562949..cff0ef2b8ef 100644
--- a/htdocs/core/lib/functions.lib.php
+++ b/htdocs/core/lib/functions.lib.php
@@ -13,6 +13,7 @@
* Copyright (C) 2014 Cédric GROSS
* Copyright (C) 2014-2015 Marcos García
* Copyright (C) 2015 Jean-François Ferry
+ * Copyright (C) 2018 Frédéric 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
@@ -5975,11 +5976,12 @@ function complete_head_from_modules($conf,$langs,$object,&$head,&$h,$type,$mode=
// No need to make a return $head. Var is modified as a reference
if (! empty($hookmanager))
{
- $parameters=array('object' => $object, 'mode' => $mode, 'head'=>$head);
- $reshook=$hookmanager->executeHooks('completeTabsHead',$parameters);
+ $parameters=array('object' => $object, 'mode' => $mode, 'head' => $head);
+ $reshook=$hookmanager->executeHooks('completeTabsHead', $parameters);
if ($reshook > 0)
{
$head = $hookmanager->resArray;
+ $h = count($head);
}
}
}
From 787658ac98fcab578d70b69a2a64aff20f4f8015 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?=
Date: Sun, 14 Oct 2018 10:56:03 +0200
Subject: [PATCH 29/40] reduce complexity of payments.lib.php
---
htdocs/core/lib/payments.lib.php | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/htdocs/core/lib/payments.lib.php b/htdocs/core/lib/payments.lib.php
index ffb0aba36ca..bd460f8d53e 100644
--- a/htdocs/core/lib/payments.lib.php
+++ b/htdocs/core/lib/payments.lib.php
@@ -1,6 +1,7 @@
+ * Copyright (C) 2013 Marcos García
+ * Copyright (C) 2018 Frédéric 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
@@ -136,7 +137,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo
else $out.='&securekey='.dol_hash($conf->global->PAYMENT_SECURITY_TOKEN, 2);
}
}
- if ($type == 'order')
+ elseif ($type == 'order')
{
$out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=order&ref='.($mode?'':'');
if ($mode == 1) $out.='order_ref';
@@ -154,7 +155,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo
}
}
}
- if ($type == 'invoice')
+ elseif ($type == 'invoice')
{
$out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=invoice&ref='.($mode?'':'');
if ($mode == 1) $out.='invoice_ref';
@@ -172,7 +173,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo
}
}
}
- if ($type == 'contractline')
+ elseif ($type == 'contractline')
{
$out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=contractline&ref='.($mode?'':'');
if ($mode == 1) $out.='contractline_ref';
@@ -190,7 +191,7 @@ function getOnlinePaymentUrl($mode, $type, $ref='', $amount='9.99', $freetag='yo
}
}
}
- if ($type == 'membersubscription')
+ elseif ($type == 'membersubscription')
{
$out=DOL_MAIN_URL_ROOT.'/public/payment/newpayment.php?source=membersubscription&ref='.($mode?'':'');
if ($mode == 1) $out.='member_ref';
@@ -289,14 +290,14 @@ function htmlPrintOnlinePaymentFooter($fromcompany,$langs,$addformmessage=0,$suf
$parammessageform='ONLINE_PAYMENT_MESSAGE_FORM_'.$suffix;
if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform);
- else if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM);
+ elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORM)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORM);
// Add other message if VAT exists
if ($object->total_vat != 0 || $object->total_tva != 0)
{
$parammessageform='ONLINE_PAYMENT_MESSAGE_FORMIFVAT_'.$suffix;
if (! empty($conf->global->$parammessageform)) print $langs->transnoentities($conf->global->$parammessageform);
- else if (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT);
+ elseif (! empty($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT)) print $langs->transnoentities($conf->global->ONLINE_PAYMENT_MESSAGE_FORMIFVAT);
}
}
From af813f82145befb310c35973efac5ab97ff213ea Mon Sep 17 00:00:00 2001
From: Maxime Kohlhaas
Date: Sun, 14 Oct 2018 19:55:25 +0200
Subject: [PATCH 30/40] Fix missing status_batch var on product lists #9606
---
htdocs/product/index.php | 3 ++-
htdocs/product/list.php | 1 +
htdocs/product/reassortlot.php | 1 +
htdocs/product/stock/productlot_list.php | 4 +++-
4 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/htdocs/product/index.php b/htdocs/product/index.php
index 6eebc4d85e2..b998bdc3148 100644
--- a/htdocs/product/index.php
+++ b/htdocs/product/index.php
@@ -273,7 +273,7 @@ print '