diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php
index 6c1e18d6d2c..6435657527d 100644
--- a/htdocs/barcode/printsheet.php
+++ b/htdocs/barcode/printsheet.php
@@ -270,9 +270,18 @@ if (empty($reshook)) {
if (!$mesg) {
$outputlangs = $langs;
+ $previousConf = getDolGlobalInt('TCPDF_THROW_ERRORS_INSTEAD_OF_DIE');
+ $conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = 1;
+
// This generates and send PDF to output
// TODO Move
- $result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile));
+ try {
+ $result = doc_label_pdf_create($db, $arrayofrecords, $modellabel, $outputlangs, $diroutput, $template, dol_sanitizeFileName($outfile));
+ } catch (Exception $e) {
+ $mesg = $langs->trans('ErrorGeneratingBarcode');
+ }
+
+ $conf->global->TCPDF_THROW_ERRORS_INSTEAD_OF_DIE = $previousConf;
}
}
diff --git a/htdocs/compta/prelevement/list.php b/htdocs/compta/prelevement/list.php
index 3417e5b6d8d..8ac9dff407a 100644
--- a/htdocs/compta/prelevement/list.php
+++ b/htdocs/compta/prelevement/list.php
@@ -548,7 +548,7 @@ if ($num == 0) {
print '
| '.$langs->trans("None").' |
';
}
-$db->free($result);
+$db->free($resql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
diff --git a/htdocs/compta/prelevement/orders_list.php b/htdocs/compta/prelevement/orders_list.php
index 01a30e5ea3c..fbf0519c6e8 100644
--- a/htdocs/compta/prelevement/orders_list.php
+++ b/htdocs/compta/prelevement/orders_list.php
@@ -466,7 +466,7 @@ if ($num == 0) {
print '| '.$langs->trans("None").' |
';
}
-$db->free($result);
+$db->free($resql);
$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
diff --git a/htdocs/core/ajax/selectsearchbox.php b/htdocs/core/ajax/selectsearchbox.php
index f1d63188307..99da470a3b7 100644
--- a/htdocs/core/ajax/selectsearchbox.php
+++ b/htdocs/core/ajax/selectsearchbox.php
@@ -96,7 +96,7 @@ if (isModEnabled('mrp') && $user->hasRight('mrp', 'read') && !getDolGlobalString
if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_PROJECT_DISABLED') && $user->hasRight('projet', 'lire')) {
$arrayresult['searchintoprojects'] = array('position' => 40, 'shortcut' => 'Q', 'img' => 'object_project', 'label' => $langs->trans("SearchIntoProjects", $search_boxvalue), 'text' => img_picto('', 'object_project', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoProjects", $search_boxvalue), 'url' => DOL_URL_ROOT.'/projet/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
-if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_TASK_DISABLED') && $user->hasRight('projet', 'lire')) {
+if (isModEnabled('project') && !getDolGlobalString('MAIN_SEARCHFORM_TASK_DISABLED') && !getDolGlobalString('PROJECT_HIDE_TASKS') && $user->hasRight('projet', 'lire')) {
$arrayresult['searchintotasks'] = array('position' => 45, 'img' => 'object_projecttask', 'label' => $langs->trans("SearchIntoTasks", $search_boxvalue), 'text' => img_picto('', 'object_projecttask', 'class="pictofixedwidth"').' '.$langs->trans("SearchIntoTasks", $search_boxvalue), 'url' => DOL_URL_ROOT.'/projet/tasks/list.php'.($search_boxvalue ? '?search_all='.urlencode($search_boxvalue) : ''));
}
diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php
index 1d8dd35f46f..e3f2000218c 100644
--- a/htdocs/core/lib/project.lib.php
+++ b/htdocs/core/lib/project.lib.php
@@ -551,14 +551,16 @@ function project_admin_prepare_head()
$head[$h][2] = 'attributes';
$h++;
- $head[$h][0] = DOL_URL_ROOT.'/projet/admin/project_task_extrafields.php';
- $head[$h][1] = $langs->trans("ExtraFieldsProjectTask");
- $nbExtrafields = $extrafields->attributes['projet_task']['count'];
- if ($nbExtrafields > 0) {
- $head[$h][1] .= ''.$nbExtrafields.'';
+ if (empty($conf->global->PROJECT_HIDE_TASKS)) {
+ $head[$h][0] = DOL_URL_ROOT . '/projet/admin/project_task_extrafields.php';
+ $head[$h][1] = $langs->trans("ExtraFieldsProjectTask");
+ $nbExtrafields = $extrafields->attributes['projet_task']['count'];
+ if ($nbExtrafields > 0) {
+ $head[$h][1] .= '' . $nbExtrafields . '';
+ }
+ $head[$h][2] = 'attributes_task';
+ $h++;
}
- $head[$h][2] = 'attributes_task';
- $h++;
if (getDolGlobalString('PROJECT_USE_OPPORTUNITIES')) {
$langs->load("members");
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 51838b0dd62..72ba3b52f20 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -324,7 +324,8 @@ ErrorFixThisHere=Fix this here
ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Error: The URL of you current instance (%s) does not match the URL defined into your OAuth2 login setup (%s). Doing OAuth2 login in such a configuration is not allowed.
ErrorMenuExistValue=A Menu already exist with this Title or URL
ErrorSVGFilesNotAllowedAsLinksWithout=SVG files are not allowed as external links without the option %s
-ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handle yet
+ErrorTypeMenu=Impossible to add another menu for the same module on the navbar, not handled yet
+ErrorGeneratingBarcode=Error while generating the barcode (probably invalid code shape)
ErrorObjectNotFound = The object %s is not found, please check your url
ErrorCountryCodeMustBe2Char=Country code must be a 2 character string
ErrorABatchShouldNotContainsSpaces=A lot or serial number should not contains spaces
diff --git a/htdocs/langs/fr_FR/errors.lang b/htdocs/langs/fr_FR/errors.lang
index 8abb5564d03..d1dc6d62221 100644
--- a/htdocs/langs/fr_FR/errors.lang
+++ b/htdocs/langs/fr_FR/errors.lang
@@ -322,6 +322,7 @@ ErrorFixThisHere= Corrigez ceci ici
ErrorTheUrlOfYourDolInstanceDoesNotMatchURLIntoOAuthSetup=Erreur : L'URL de votre instance actuelle (%s) ne correspond pas à l'URL définie dans votre configuration de connexion OAuth2 (%s). La connexion OAuth2 dans une telle configuration n'est pas autorisée.
ErrorMenuExistValue=Un menu existe déjà avec ce titre ou cette URL
ErrorSVGFilesNotAllowedAsLinksWithout=Les fichiers SVG ne sont pas autorisés en tant que liens externes sans l'option %s
+ErrorGeneratingBarcode=Erreur à la génération du code-barre (probablement une valeur invalide)
ErrorTypeMenu=Impossible d'ajouter un autre menu pour le même module sur la barre de navigation, pas encore géré
ErrorObjectNotFound = L'objet %s n'est pas trouvé, veuillez vérifier votre url
ErrorCountryCodeMustBe2Char=Le code pays doit être une chaîne de 2 caractères
diff --git a/htdocs/product/stock/replenish.php b/htdocs/product/stock/replenish.php
index 2f70cd3a963..01f89e89bad 100644
--- a/htdocs/product/stock/replenish.php
+++ b/htdocs/product/stock/replenish.php
@@ -365,7 +365,7 @@ $sql .= ' FROM ' . MAIN_DB_PREFIX . 'product as p';
$sql .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'product_stock as s ON p.rowid = s.fk_product';
$sql .= ' AND s.fk_entrepot IN (' . $db->sanitize($list_warehouse) . ')';
-$list_warehouse_selected = ($fk_entrepot < 0) ? '0' : $fk_entrepot;
+$list_warehouse_selected = ($fk_entrepot < 0 || empty($fk_entrepot)) ? '0' : $fk_entrepot;
$sql .= ' AND s.fk_entrepot IN (' . $db->sanitize($list_warehouse_selected) . ')';
diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php
index 360c10bcaa5..5fb49ee544c 100644
--- a/htdocs/takepos/invoice.php
+++ b/htdocs/takepos/invoice.php
@@ -1861,6 +1861,13 @@ if ($placeid > 0) {
if ($line->product_label) {
$htmlforlines .= $line->product_label;
}
+ if (!empty($line->batch)) {
+ $tooltiptext .= '
'.$langs->trans("LotSerial").' : '.$line->batch.'
';
+ }
+ if (!empty($line->fk_warehouse)) {
+ $tooltiptext .= ''.$langs->trans("Warehouse").' : '.$line->fk_warehouse.'
';
+ }
+
if ($line->product_label != $line->desc) {
if ($line->product_label && $line->desc) {
$htmlforlines .= '
';