diff --git a/htdocs/telephonie/contrat/fiche.php b/htdocs/telephonie/contrat/fiche.php index 42bb47eb5df..2d287cc66d5 100644 --- a/htdocs/telephonie/contrat/fiche.php +++ b/htdocs/telephonie/contrat/fiche.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2006 Rodolphe Quiedeville * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -37,6 +37,11 @@ if ($_POST["action"] == 'add' && $user->rights->telephonie->ligne->creer) if ( $contrat->create($user) == 0) { + $soc = new Societe($db); + $soc->id = $_POST["client_comm"]; + $soc->AddPerms($user->id,1,1,1); + $soc->AddPerms($_POST["commercial_sign"],1,1,1); + Header("Location: fiche.php?id=".$contrat->id); } else @@ -581,8 +586,7 @@ else print "
"; /* Lignes */ - - print ''; + print '
'; $sql = "SELECT l.ligne, l.statut, l.rowid, l.remise, l.techno, f.nom as fournisseur"; $sql .= ", ss.code_client, ss.nom as agence, l.support";