From 6ed2ae188ef64f9094dabe10332ee9c825d084d9 Mon Sep 17 00:00:00 2001 From: Laurent Dinclaux Date: Fri, 10 Jul 2020 00:51:41 +1100 Subject: [PATCH] Fix extrafields ordering on PDFs --- htdocs/core/class/commondocgenerator.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/class/commondocgenerator.class.php b/htdocs/core/class/commondocgenerator.class.php index 72d45f2467c..be23895fe7f 100644 --- a/htdocs/core/class/commondocgenerator.class.php +++ b/htdocs/core/class/commondocgenerator.class.php @@ -1296,7 +1296,7 @@ abstract class CommonDocGenerator { // Sort extrafields by rank uasort($fields, function ($a, $b) { - return ($a->rank > $b->rank) ? -1 : 1; + return ($a->rank > $b->rank) ? 1 : -1; }); // define some HTML content with style