diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php
index 25f8af9aa76..e54177ec9fe 100644
--- a/htdocs/comm/propal.php
+++ b/htdocs/comm/propal.php
@@ -162,9 +162,10 @@ if ($_POST['action'] == 'set_ref_client' && $user->rights->propale->creer)
/*
* Creation propale
*/
-if ($_POST['action'] == 'add')
+if ($_POST['action'] == 'add' && $user->rights->propale->creer)
{
- $propal = new Propal($db, $_POST['socidp']);
+ $propal = new Propal($db);
+ $propal->socidp=$_POST['socidp'];
$propal->fetch_client();
$db->begin();
@@ -477,6 +478,7 @@ if ($_POST['action'] == "addligne" && $user->rights->propale->creer)
// La description de la ligne est celle saisie ou
// celle du produit si (non saisi + PRODUIT_CHANGE_PROD_DESC défini)
+ // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on
$desc=$_POST['np_desc'];
if (! $desc && $conf->global->PRODUIT_CHANGE_PROD_DESC)
{
@@ -1042,6 +1044,7 @@ if ($conf->expedition->enabled)
else print img_object($langs->trans('ShowProduct'),'product');
print ' '.$objp->ref.'';
print ' - '.nl2br($objp->product);
+ // \todo Ne faut-il pas rendre $conf->global->PRODUIT_CHANGE_PROD_DESC toujours a on
if ($conf->global->FORM_ADD_PROD_DESC && !$conf->global->PRODUIT_CHANGE_PROD_DESC)
{
print ' '.nl2br($objp->product_desc);
@@ -1177,7 +1180,7 @@ if ($conf->expedition->enabled)
}
else
{
- print '';
+ print '';
}
print '';
print '
';
@@ -1373,7 +1376,7 @@ if ($conf->expedition->enabled)
$var=true;
print '