diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 229acbeba1f..8a63be13a91 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -1,8 +1,8 @@ - * Copyright (C) 2004-2006 Destailleur Laurent - * Copyright (C) 2004 Eric Seigne - * Copyright (C) 2005-2006 Regis Houssin +/* Copyright (C) 2001-2007 Rodolphe Quiedeville + * Copyright (C) 2004-2006 Destailleur Laurent + * Copyright (C) 2004 Eric Seigne + * Copyright (C) 2005-2006 Regis Houssin * * 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 @@ -23,9 +23,9 @@ */ /** - \file htdocs/compta/propal.php - \ingroup propale - \brief Page liste des propales (vision compta) + \file htdocs/compta/propal.php + \ingroup propale + \brief Page liste des propales (vision compta) */ require("./pre.inc.php"); @@ -107,7 +107,7 @@ if ( $action == 'delete' ) -llxHeader(); + $html = new Form($db); @@ -118,40 +118,45 @@ $html = new Form($db); */ if ($_GET["propalid"] > 0) { - if ($mesg) print "$mesg
"; + if ($mesg) print "$mesg
"; - $propal = new Propal($db); - $propal->fetch($_GET['propalid']); + $propal = new Propal($db); + $propal->fetch($_GET['propalid']); + + if ($user->societe_id > 0 && $propal->socid <> $user->societe_id) + accessforbidden(); - $societe = new Societe($db); - $societe->fetch($propal->socid); + llxHeader(); - $head = propal_prepare_head($propal); - dolibarr_fiche_head($head, 'compta', $langs->trans('Proposal')); + $societe = new Societe($db); + $societe->fetch($propal->socid); - - /* - * Fiche propal - * - */ - print ''; + $head = propal_prepare_head($propal); + dolibarr_fiche_head($head, 'compta', $langs->trans('Proposal')); + + + /* + * Fiche propal + * + */ + print '
'; - // Ref - print ''; + // Ref + print ''; - // Ref client - print ''; - print ''; + // Ref client + print ''; + print ''; - $rowspan=8; + $rowspan=8; // Société print ''; @@ -716,6 +721,8 @@ et non globalement } else { + llxHeader(); + /** * * Mode Liste des propales
'.$langs->trans('Ref').''.$propal->ref_url.'
'.$langs->trans('Ref').''.$propal->ref_url.'
'; - print ''; - if ($_GET['action'] != 'refclient' && $propal->brouillon) print ''; - print '
'; - print $langs->trans('RefCustomer').''; - print ''.img_edit($langs->trans('Edit')).'
'; - print '
'; - print $propal->ref_client; - print '
'; + print ''; + if ($_GET['action'] != 'refclient' && $propal->brouillon) print ''; + print '
'; + print $langs->trans('RefCustomer').''; + print ''.img_edit($langs->trans('Edit')).'
'; + print '
'; + print $propal->ref_client; + print '
'.$langs->trans('Company').''.$societe->getNomUrl(1).'