Merge pull request #52 from simnandez/develop

Cherry Pick 3.1 to develop
This commit is contained in:
Regis Houssin 2011-11-20 01:40:31 -08:00
commit 2f100d0d72
2 changed files with 14 additions and 7 deletions

View File

@ -39,6 +39,7 @@ require_once(DOL_DOCUMENT_ROOT."/core/lib/images.lib.php");
require_once(DOL_DOCUMENT_ROOT."/product/class/product.class.php");
$langs->load("products");
$langs->load("other");
$modulepart=$_REQUEST['modulepart']?$_REQUEST['modulepart']:'produit|service';
if (isset($_GET["id"]))
@ -207,4 +208,4 @@ print '</fieldset>';
llxFooter();
?>
?>

View File

@ -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)
{