diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 0ee9e87db4d..78e3884e9c4 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -855,7 +855,7 @@ if ($id > 0 || !empty($ref)) {
// Already dispatched
print '
'.$products_dispatched[$objp->rowid].' | ';
- if (!empty($conf->productbatch->enabled) && $objp->tobatch == 1) {
+ if (!empty($conf->productbatch->enabled) && $objp->tobatch > 0) {
$type = 'batch';
print '';
print ' | '; // Qty to dispatch
@@ -967,7 +967,7 @@ if ($id > 0 || !empty($ref)) {
print '';
print '';
- if (!empty($conf->productbatch->enabled) && $objp->tobatch == 1) {
+ if (!empty($conf->productbatch->enabled) && $objp->tobatch > 0) {
$type = 'batch';
print img_picto($langs->trans('AddStockLocationLine'), 'split.png', 'class="splitbutton" onClick="addDispatchLine('.$i.', \''.$type.'\')"');
} else {
|