diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 43f91978f91..f4a76a7eeb3 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -132,6 +132,12 @@ if ($action == 'addline' && $user->rights->fournisseur->commande->creer) dol_print_error($db,$object->error); exit; } + + if ($object->socid) + { + $societe=new Societe($db); + $societe->fetch($object->socid); + } // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit @@ -143,12 +149,12 @@ if ($action == 'addline' && $user->rights->fournisseur->commande->creer) $productsupplier = new ProductFournisseur($db); $idprod=$productsupplier->get_buyprice($_POST['idprodfournprice'], $qty); - //$societe=''; - if ($object->socid) - { - $societe=new Societe($db); - $societe->fetch($object->socid); - } + //$societe=''; + /*if ($object->socid) + { + $societe=new Societe($db); + $societe->fetch($object->socid); + }*/ if ($idprod > 0) {