diff --git a/htdocs/compta/facture/facture-rec.class.php b/htdocs/compta/facture/facture-rec.class.php index 40cb7e0f654..6dbd95d3476 100644 --- a/htdocs/compta/facture/facture-rec.class.php +++ b/htdocs/compta/facture/facture-rec.class.php @@ -1,5 +1,6 @@ + * Copyright (C) 2004 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -189,7 +190,7 @@ class FactureRec while ($i < $num) { $objp = $this->db->fetch_object($i); - $faclig = new FactureLigne(); + $faclig = new FactureLigne($this->db); $faclig->produit_id = $objp->fk_product; $faclig->desc = stripslashes($objp->description); $faclig->qty = $objp->qty; diff --git a/htdocs/facture.class.php b/htdocs/facture.class.php index 7b6153f6ffb..ed510e802a6 100644 --- a/htdocs/facture.class.php +++ b/htdocs/facture.class.php @@ -317,7 +317,7 @@ class Facture while ($i < $num) { $objp = $this->db->fetch_object($i); - $faclig = new FactureLigne(); + $faclig = new FactureLigne($this->db); $faclig->desc = stripslashes($objp->description); $faclig->qty = $objp->qty; $faclig->price = $objp->price;