From 71d988b015677851cc3848736cce7300bc5da332 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Nov 2024 19:34:36 +0100 Subject: [PATCH] Add code to make easier to test PDF generation with n lines of product --- htdocs/commande/class/commande.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 3e97bd80372..d29baca6cd5 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -4049,8 +4049,9 @@ class Commande extends CommonOrder $this->status = $this::STATUS_DRAFT; // Lines - $nbp = 5; + $nbp = min(1000, GETPOSTINT('nblines') ? GETPOSTINT('nblines') : 5); // We can force the nb of lines to test from command line (but not more than 1000) $xnbp = 0; + while ($xnbp < $nbp) { $line = new OrderLine($this->db);