Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2022-03-24 13:23:04 +01:00
commit 38439603be
3 changed files with 11 additions and 11 deletions

View File

@ -735,9 +735,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
print $langs->trans("Warehouse"); print $langs->trans("Warehouse");
} }
print '</td>'; print '</td>';
if ($conf->productbatch->enabled) { if ($conf->stock->enabled) {
// Available // Available
print '<td>'; print '<td align="right">';
if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) { if ($collapse || in_array($action, array('consumeorproduce', 'consumeandproduceall'))) {
print $langs->trans("Stock"); print $langs->trans("Stock");
} }
@ -964,12 +964,14 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
// Lot Batch // Lot Batch
if ($conf->productbatch->enabled) {
print '<td>'; print '<td>';
if ($line2['batch'] != '') { if ($line2['batch'] != '') {
$tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']); $tmpbatch->fetch(0, $line2['fk_product'], $line2['batch']);
print $tmpbatch->getNomUrl(1); print $tmpbatch->getNomUrl(1);
} }
print '</td>'; print '</td>';
}
// Action delete line // Action delete line
if ($permissiontodelete) { if ($permissiontodelete) {

View File

@ -245,10 +245,8 @@ if (empty($reshook)) {
$nbok = 0; $nbok = 0;
foreach ($toselect as $toselectid) { foreach ($toselect as $toselectid) {
$result = $objecttmp->fetch($toselectid); $result = $objecttmp->fetch($toselectid);
var_dump($objecttmp->status);
if ($result > 0) { if ($result > 0) {
$result = $objecttmp->cancel($user, 0); $result = $objecttmp->cancel($user, 0);
var_dump($result);
if ($result == 0) { if ($result == 0) {
setEventMessages($langs->trans('StatusOfRefMustBe', $objecttmp->ref, $objecttmp->LibStatut($objecttmp::STATUS_APPROVED)), null, 'warnings'); setEventMessages($langs->trans('StatusOfRefMustBe', $objecttmp->ref, $objecttmp->LibStatut($objecttmp::STATUS_APPROVED)), null, 'warnings');
$error++; $error++;

View File

@ -3,7 +3,7 @@
* Copyright (C) 2014-2020 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2014-2020 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr> * Copyright (C) 2015 Jean-François Ferry <jfefe@aternatik.fr>
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com> * Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2022 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr> * Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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); $ret = $object->create($user);
if ($ret < 0) { if ($ret < 0) {
var_dump($ret); setEventMessages($object->error, $object->errors, 'errors');
$error++; $error++;
} }
if (!empty($auto_create_paiement) && !$error) { if (!empty($auto_create_paiement) && !$error) {