From dd8b92e5f0c6702a98511797a2e16b6a151265d2 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 10 Sep 2010 11:08:25 +0000 Subject: [PATCH] Works on module hook integration --- htdocs/compta/facture/class/facture.class.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 1cad638831f..55bd253d6d2 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -418,7 +418,7 @@ class Facture extends CommonObject } } - dol_syslog("Facture::createFromCurrent invertdetail=".$invertdetail." socid=".$this->socid." nboflines=".sizeof($facture->lignes)); + dol_syslog("Facture::createFromCurrent invertdetail=".$invertdetail." socid=".$this->socid." nboflines=".sizeof($facture->lines)); $facid = $facture->create($user); @@ -434,7 +434,7 @@ class Facture extends CommonObject */ function createFromClone($fromid,$invertdetail=0) { - global $user,$langs; + global $conf,$user,$langs; $error=0; @@ -462,14 +462,14 @@ class Facture extends CommonObject $object->ref_client = ''; $object->close_code = ''; $object->close_note = ''; - $object->products = $object->lignes; // Tant que products encore utilise + $object->products = $object->lines; // Tant que products encore utilise // Loop on each line of new invoice - foreach($object->lignes as $i => $line) + foreach($object->lines as $i => $line) { - if (($object->lignes[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts + if (($object->lines[$i]->info_bits & 0x02) == 0x02) // We do not clone line of discounts { - unset($object->lignes[$i]); + unset($object->lines[$i]); unset($object->products[$i]); // Tant que products encore utilise } }