diff --git a/htdocs/soc.php b/htdocs/soc.php index 2faa2d668ae..1668b0eae82 100644 --- a/htdocs/soc.php +++ b/htdocs/soc.php @@ -33,7 +33,8 @@ $langs->load("soc"); */ if ($user->societe_id > 0) { - $action = ''; + $_POST["action"] = ''; + $_GET["action"] = ''; $socid = $user->societe_id; } @@ -59,178 +60,6 @@ if ($_POST["action"] == 'add' or $_POST["action"] == 'update') $soc->client = $_POST["client"]; $soc->fournisseur = $_POST["fournisseur"]; - if ($_POST["action"] == 'update') - { - $soc->update($socid); - } - if ($_POST["action"] == 'add') - { - $socid = $soc->create(); - } -} - -/* - * - * - */ -llxHeader(); -$form = new Form($db); - -if ($_GET["action"] == 'create') -{ - if ($user->rights->societe->creer) { - /* - * Fiche societe en mode création - */ - $soc = new Societe($db); - if ($_GET["type"]=='f') { $soc->fournisseur=1; } - if ($_GET["type"]=='c') { $soc->client=1; } - if ($_GET["type"]=='p') { $soc->client=2; } - - print '