Fix permissions en mode clients

This commit is contained in:
Rodolphe Quiedeville 2007-01-24 16:09:22 +00:00
parent 64dd0ec746
commit 902e221c0d

View File

@ -1,8 +1,8 @@
<?php <?php
/* Copyright (C) 2001-2003,2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Destailleur Laurent <eldy@users.sourceforge.net> * Copyright (C) 2004-2006 Destailleur Laurent <eldy@users.sourceforge.net>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com> * Copyright (C) 2005-2006 Regis Houssin <regis.houssin@cap-networks.com>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -23,9 +23,9 @@
*/ */
/** /**
\file htdocs/compta/propal.php \file htdocs/compta/propal.php
\ingroup propale \ingroup propale
\brief Page liste des propales (vision compta) \brief Page liste des propales (vision compta)
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -107,7 +107,7 @@ if ( $action == 'delete' )
llxHeader();
$html = new Form($db); $html = new Form($db);
@ -118,40 +118,45 @@ $html = new Form($db);
*/ */
if ($_GET["propalid"] > 0) if ($_GET["propalid"] > 0)
{ {
if ($mesg) print "$mesg<br>"; if ($mesg) print "$mesg<br>";
$propal = new Propal($db); $propal = new Propal($db);
$propal->fetch($_GET['propalid']); $propal->fetch($_GET['propalid']);
$societe = new Societe($db); if ($user->societe_id > 0 && $propal->socid <> $user->societe_id)
$societe->fetch($propal->socid); accessforbidden();
$head = propal_prepare_head($propal); llxHeader();
dolibarr_fiche_head($head, 'compta', $langs->trans('Proposal'));
$societe = new Societe($db);
$societe->fetch($propal->socid);
$head = propal_prepare_head($propal);
dolibarr_fiche_head($head, 'compta', $langs->trans('Proposal'));
/* /*
* Fiche propal * Fiche propal
* *
*/ */
print '<table class="border" width="100%">'; print '<table class="border" width="100%">';
// Ref // Ref
print '<tr><td>'.$langs->trans('Ref').'</td><td colspan="5">'.$propal->ref_url.'</td></tr>'; print '<tr><td>'.$langs->trans('Ref').'</td><td colspan="5">'.$propal->ref_url.'</td></tr>';
// Ref client // Ref client
print '<tr><td>'; print '<tr><td>';
print '<table class="nobordernopadding" width="100%"><tr><td nowrap>'; print '<table class="nobordernopadding" width="100%"><tr><td nowrap>';
print $langs->trans('RefCustomer').'</td><td align="left">'; print $langs->trans('RefCustomer').'</td><td align="left">';
print '</td>'; print '</td>';
if ($_GET['action'] != 'refclient' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;propalid='.$propal->id.'">'.img_edit($langs->trans('Edit')).'</a></td>'; if ($_GET['action'] != 'refclient' && $propal->brouillon) print '<td align="right"><a href="'.$_SERVER['PHP_SELF'].'?action=refclient&amp;propalid='.$propal->id.'">'.img_edit($langs->trans('Edit')).'</a></td>';
print '</tr></table>'; print '</tr></table>';
print '</td><td colspan="5">'; print '</td><td colspan="5">';
print $propal->ref_client; print $propal->ref_client;
print '</td>'; print '</td>';
print '</tr>'; print '</tr>';
$rowspan=8; $rowspan=8;
// Société // Société
print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$societe->getNomUrl(1).'</td></tr>'; print '<tr><td>'.$langs->trans('Company').'</td><td colspan="5">'.$societe->getNomUrl(1).'</td></tr>';
@ -716,6 +721,8 @@ et non globalement
} else { } else {
llxHeader();
/** /**
* *
* Mode Liste des propales * Mode Liste des propales