diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index dd081a87870..40d220ac717 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1192,6 +1192,7 @@ class Facture extends CommonInvoice if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts { unset($object->lines[$i]); + continue; } // Bloc to update dates of service (month by month only if previously filled and similare to start and end of month) @@ -1217,9 +1218,8 @@ class Facture extends CommonInvoice $object->lines[$i]->date_end = $newLast; } } - if ($object->lines[$i]) { - $object->lines[$i]->ref_ext = ''; - }// Do not clone ref_ext + + $object->lines[$i]->ref_ext = ''; // Do not clone ref_ext } // Create clone