diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index c2d1f7344c4..ddee2ad5fb4 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -815,6 +815,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $lineid = $result; } else { $lineid = 0; + $errors[] = $objecttmp->error; $error++; break; } @@ -959,7 +960,7 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. $action = 'create'; $_GET["origin"] = $_POST["origin"]; $_GET["originid"] = $_POST["originid"]; - setEventMessages("Error", null, 'errors'); + setEventMessages("Error", $errors, 'errors'); $error++; } }