From 955f14e29940eb61ffd5933a0bfd229e04b6027f Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:25:47 +0200 Subject: [PATCH 1/4] php V8 warning, no soc associated with storage --- htdocs/product/stock/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 0e7189ae038..8231be30d0c 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -447,7 +447,7 @@ if ($action == 'create') { $morehtmlref .= ''; $morehtmlref .= ''; } else { - $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); + $morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, ($socid > 0 ? $socid : -1), $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (!empty($object->fk_project)) { From 67021bfd3111fb09bc0085cc99c1791714ce9246 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:32:04 +0200 Subject: [PATCH 2/4] php V8 warning --- htdocs/product/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index a1b450f7a0c..9aade4fa62d 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -13,7 +13,7 @@ * Copyright (C) 2014-2015 Ferran Marcet * Copyright (C) 2015 Jean-François Ferry * Copyright (C) 2015 Raphaël Doursenaud - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016-2022 Charlene Benke * Copyright (C) 2016 Meziane Sof * Copyright (C) 2017 Josep Lluís Amador * Copyright (C) 2019-2021 Frédéric France @@ -1860,7 +1860,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Batch number managment - if ($conf->productbatch->enabled) { + if (!empty($conf->productbatch->enabled)) { if ($object->isProduct() || !empty($conf->global->STOCK_SUPPORTS_SERVICES)) { print ''.$langs->trans("ManageLotSerial").''; $statutarray = array('0' => $langs->trans("ProductStatusNotOnBatch"), '1' => $langs->trans("ProductStatusOnBatch"), '2' => $langs->trans("ProductStatusOnSerial")); @@ -1964,7 +1964,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''.$langs->trans("Description").''; // We use dolibarr_details as type of DolEditor here, because we must not accept images as description is included into PDF and not accepted by TCPDF. - $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_4, '90%'); + $doleditor = new DolEditor('desc', $object->description, '', 160, 'dolibarr_details', '', false, true, !empty($conf->global->FCKEDITOR_ENABLE_PRODUCTDESC)?$conf->global->FCKEDITOR_ENABLE_PRODUCTDESC:0, ROWS_4, '90%'); $doleditor->Create(); print ""; From fcc23909b32995e0c278d31bcafab6ee19e5e0bd Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:39:11 +0200 Subject: [PATCH 3/4] Update card.php --- htdocs/product/stock/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 8231be30d0c..009bc70ebb2 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -314,7 +314,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' '; + print ' '; print ''; } @@ -854,7 +854,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' id.($fac_rec ? '&fac_rec='.$fac_rec : '')).'">'; + print ' 0 ? '&socid='.$socid : "")).'">'; print ''; } From 88cab8b8e7745ee86526fc7e0bac31b9899050e9 Mon Sep 17 00:00:00 2001 From: BENKE Charlene <1179011+defrance@users.noreply.github.com> Date: Mon, 20 Jun 2022 15:41:19 +0200 Subject: [PATCH 4/4] Update card.php --- htdocs/product/stock/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 009bc70ebb2..3ef85adeb84 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -314,7 +314,7 @@ if ($action == 'create') { $langs->load('projects'); print ''.$langs->trans('Project').''; print img_picto('', 'project').$formproject->select_projects(($socid > 0 ? $socid : -1), $projectid, 'projectid', 0, 0, 1, 1, 0, 0, 0, '', 1, 0, 'maxwidth500'); - print ' '; + print ' '; print ''; }