diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 85c6c9b67da..4f358074e59 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -420,7 +420,7 @@ class Facture extends CommonInvoice if ($originforcontact == 'shipping') // shipment and order share the same contacts. If creating from shipment we take data of order { require_once DOL_DOCUMENT_ROOT . '/expedition/class/expedition.class.php'; - $exp = new Expedition($db); + $exp = new Expedition($this->db); $exp->fetch($origin_id); $exp->fetchObjectLinked(); if (count($exp->linkedObjectsIds['commande']) > 0)