From 31c4cc0ecf0c920c12e51d6df98a33300d688d89 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Mar 2011 02:04:44 +0000 Subject: [PATCH] Fix: Error when cloning invoice with discount --- htdocs/compta/facture/class/facture.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index fa9e53d26a5..933fe2c2fde 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -294,7 +294,7 @@ class Facture extends CommonObject else { dol_syslog("There is ".sizeof($this->lines)." lines that are array lines"); - for ($i = 0 ; $i < sizeof($this->lines) ; $i++) + foreach ($this->lines as $i => $line) { if (($this->lines[$i]->info_bits & 0x01) == 0) // We keep only lines with first bit = 0 {