From 5afe1dbb84e190e6c17f1b2ab8bee157bb0e76ea Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Jul 2022 20:57:29 +0200 Subject: [PATCH] Update actions_massactions.inc.php --- htdocs/core/actions_massactions.inc.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index 2bebd1ada00..0d279a4ac3d 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -641,7 +641,9 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lastref = ''; $db->begin(); - $nbOrders = is_array($orders) ? count($orders) : 1; + + $nbOrders = is_array($orders) ? count($orders) : 1; + foreach ($orders as $id_order) { $cmd = new Commande($db); if ($cmd->fetch($id_order) <= 0) {