From 3849da4fe421fa97974116264eeb2f64d56beab2 Mon Sep 17 00:00:00 2001 From: dolibarr95 Date: Wed, 27 Sep 2017 09:09:38 +0200 Subject: [PATCH] Line missing (error 500) Create an instance of ProductFournisseur. --- htdocs/fourn/commande/card.php | 1 + 1 file changed, 1 insertion(+) 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');