diff --git a/htdocs/comm/addpropal.php b/htdocs/comm/addpropal.php index 7a15d872e25..1c8d1599fad 100644 --- a/htdocs/comm/addpropal.php +++ b/htdocs/comm/addpropal.php @@ -34,19 +34,6 @@ if (defined("PROPALE_ADDON") && is_readable(DOL_DOCUMENT_ROOT ."/includes/module require(DOL_DOCUMENT_ROOT ."/includes/modules/propale/".PROPALE_ADDON.".php"); } -$sql = "SELECT s.nom, s.idp, s.prefix_comm FROM ".MAIN_DB_PREFIX."societe as s WHERE s.idp = ".$_GET["socidp"]; - -$result = $db->query($sql); -if ($result) -{ - if ( $db->num_rows() ) - { - $objsoc = $db->fetch_object(0); - } - $db->free(); -} - - llxHeader(); print_titre("Nouvelle proposition commerciale"); @@ -58,6 +45,11 @@ print_titre("Nouvelle proposition commerciale"); */ if ($_GET["action"] == 'create') { + + $soc = new Societe($db); + /* TODO Ajouter un test ici */ + $soc->fetch($_GET["socidp"]); + $obj = PROPALE_ADDON; $modPropale = new $obj; $numpr = $modPropale->propale_get_num(); @@ -73,12 +65,12 @@ if ($_GET["action"] == 'create') } } - print "