diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 4f738f68a97..d704d9974f9 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -642,9 +642,9 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lastref = ''; $db->begin(); - + $nbOrders = is_array($orders) ? count($orders) : 1; - + foreach ($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) {