diff --git a/htdocs/fourn/commande/modules/modules_commandefournisseur.php b/htdocs/fourn/commande/modules/modules_commandefournisseur.php index 831cd65188e..62a0fbbc799 100644 --- a/htdocs/fourn/commande/modules/modules_commandefournisseur.php +++ b/htdocs/fourn/commande/modules/modules_commandefournisseur.php @@ -165,7 +165,7 @@ function commande_supplier_pdf_create($db, $comid, $modele='') if ( $obj->write_pdf_file($comid) > 0) { // on supprime l'image correspondant au preview - commande_delete_preview($db, $comid); + commande_supplier_delete_preview($db, $comid); return 1; } else diff --git a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php index 47651cf747b..2b3ef326fd2 100644 --- a/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php +++ b/htdocs/fourn/commande/modules/pdf/pdf_muscadet.modules.php @@ -30,6 +30,7 @@ */ require_once(DOL_DOCUMENT_ROOT ."/fourn/commande/modules/modules_commandefournisseur.php"); +require_once(DOL_DOCUMENT_ROOT."/fourn/fournisseur.commande.class.php"); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); @@ -138,7 +139,7 @@ class pdf_muscadet extends ModelePDFCommandesSuppliers if ($conf->commande->dir_output) { - $com = new Commande($this->db); + $com = new CommandeFournisseur($this->db); $ret=$com->fetch($id); $nblignes = sizeof($com->lignes);