diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index a7568f446ca..0e23b62fbb0 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -561,6 +561,7 @@ if (empty($reshook)) if (!$res) dol_print_error($db); } + $productsupplier = new ProductFournisseur($db); if ($productsupplier->get_buyprice(0, price2num($_POST['qty']), $line->fk_product, 'none', GETPOST('socid','int')) < 0 ) { setEventMessages($langs->trans("ErrorQtyTooLowForThisSupplier"), null, 'warnings');