diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php
index 6a5c41b77c5..7129cadb273 100644
--- a/htdocs/mrp/mo_production.php
+++ b/htdocs/mrp/mo_production.php
@@ -735,9 +735,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans("Warehouse");
}
print '';
- if ($conf->productbatch->enabled) {
+ if ($conf->stock->enabled) {
// Available
- print '
';
+ print ' | ';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Stock");
}
@@ -964,12 +964,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
// Lot Batch
- print ' | ';
- if ($line2['batch'] != '') {
- $tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
- print $tmpbatch->getNomUrl(1);
+ if ($conf->productbatch->enabled) {
+ print ' | ';
+ if ($line2['batch'] != '') {
+ $tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
+ print $tmpbatch->getNomUrl(1);
+ }
+ print ' | ';
}
- print '';
// Action delete line
if ($permissiontodelete) {
diff --git a/htdocs/partnership/partnership_list.php b/htdocs/partnership/partnership_list.php
index dc9958fa3df..0f4aa61f621 100644
--- a/htdocs/partnership/partnership_list.php
+++ b/htdocs/partnership/partnership_list.php
@@ -245,10 +245,8 @@ if (empty($reshook)) {
$nbok = 0;
foreach ($toselect as $toselectid) {
$result = $objecttmp->fetch($toselectid);
- var_dump($objecttmp->status);
if ($result > 0) {
$result = $objecttmp->cancel($user, 0);
- var_dump($result);
if ($result == 0) {
setEventMessages($langs->trans('StatusOfRefMustBe', $objecttmp->ref, $objecttmp->LibStatut($objecttmp::STATUS_APPROVED)), null, 'warnings');
$error++;
diff --git a/htdocs/salaries/card.php b/htdocs/salaries/card.php
index 32be3b3013d..378e7ac4ca1 100644
--- a/htdocs/salaries/card.php
+++ b/htdocs/salaries/card.php
@@ -3,7 +3,7 @@
* Copyright (C) 2014-2020 Laurent Destailleur
* Copyright (C) 2015 Jean-François Ferry
* Copyright (C) 2015 Charlie BENKE
- * Copyright (C) 2018-2021 Frédéric France
+ * Copyright (C) 2018-2022 Frédéric France
* Copyright (C) 2021 Gauthier VERDOL
*
* This program is free software; you can redistribute it and/or modify
@@ -270,7 +270,7 @@ if ($action == 'add' && empty($cancel)) {
$ret = $object->create($user);
if ($ret < 0) {
- var_dump($ret);
+ setEventMessages($object->error, $object->errors, 'errors');
$error++;
}
if (!empty($auto_create_paiement) && !$error) {