From 5dabcec7671b75f4c978f657aaf1f60e4f4eb44f Mon Sep 17 00:00:00 2001 From: boudet jean pascal <68547382+atm-jpb@users.noreply.github.com> Date: Mon, 4 Jul 2022 17:17:55 +0200 Subject: [PATCH] rank duplicate on mass action #### rank duplicate on mass action invoice from multiple orders we have to define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several order massaction request. --- htdocs/core/actions_massactions.inc.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/htdocs/core/actions_massactions.inc.php b/htdocs/core/actions_massactions.inc.php index b98ce37d8f1..5859760d955 100644 --- a/htdocs/core/actions_massactions.inc.php +++ b/htdocs/core/actions_massactions.inc.php @@ -791,7 +791,10 @@ if ($massaction == 'confirm_createbills') { // Create bills from orders. 'HT', 0, $product_type, - $lines[$i]->rang, + + //we have define the max rank for each line which makes it possible not to have a duplicate on the rank field in the case of several orders + //-1 will give us the right number + -1, // rank $lines[$i]->special_code, $objecttmp->origin, $lines[$i]->rowid,