From 72459ac35cb5f44383005197961ae3fd68312ac4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Mar 2011 02:06:57 +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 4eb07236c33..94968aa5d8c 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 => $val) { if (($this->lines[$i]->info_bits & 0x01) == 0) // We keep only lines with first bit = 0 {