diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index e9bc3ec9c69..280b0ddb882 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1396,6 +1396,7 @@ if ($_GET['action'] == 'create') $classname = 'Actions'.ucfirst($subelement); $objectsrc = new $classname($db); $objectsrc->fetch(GETPOST('originid')); + if (empty($objectsrc->object->lines) && method_exists($objectsrc->object,'fetch_lines')) $objectsrc->object->fetch_lines(); $objectsrc->object->fetch_thirdparty(); $projectid = (!empty($objectsrc->object->fk_project)?$object->fk_project:''); diff --git a/htdocs/core/class/actions_commonobject.class.php b/htdocs/core/class/actions_commonobject.class.php index 1d6fd8cd5cd..16f57077c73 100644 --- a/htdocs/core/class/actions_commonobject.class.php +++ b/htdocs/core/class/actions_commonobject.class.php @@ -69,8 +69,6 @@ class ActionsCommonObject $num = count($this->object->lines); $var = true; $i = 0; - - var_dump($this->object); foreach ($this->object->lines as $line) {