diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 13ddccdd896..915177164ac 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -602,9 +602,7 @@ class Expedition extends CommonObject $this->fk_incoterms = $obj->fk_incoterms; $this->location_incoterms = $obj->location_incoterms; $this->libelle_incoterms = $obj->libelle_incoterms; - - $this->lines = array(); - + $this->db->free($result); if ($this->statut == self::STATUS_DRAFT) $this->brouillon = 1; @@ -1381,6 +1379,7 @@ class Expedition extends CommonObject // phpcs:enable global $conf, $mysoc; // TODO: recuperer les champs du document associe a part + $this->lines=array(); $sql = "SELECT cd.rowid, cd.fk_product, cd.label as custom_label, cd.description, cd.qty as qty_asked, cd.product_type"; $sql.= ", cd.total_ht, cd.total_localtax1, cd.total_localtax2, cd.total_ttc, cd.total_tva";