Correction bug #18853

This commit is contained in:
Rodolphe Quiedeville 2007-01-24 10:49:56 +00:00
parent 2f4137934f
commit c09d353a7a

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2001-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2006 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2006 Laurent Destailleur <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 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
@ -71,8 +71,6 @@ $NBLINES=4;
$form=new Form($db); $form=new Form($db);
/******************************************************************************/ /******************************************************************************/
/* Actions */ /* Actions */
/******************************************************************************/ /******************************************************************************/
@ -703,11 +701,6 @@ if ($_GET['action'] == 'down' && $user->rights->propale->creer)
exit; exit;
} }
llxHeader('',$langs->trans('Proposal'),'Proposition');
$html = new Form($db); $html = new Form($db);
/* /*
@ -727,6 +720,11 @@ if ($_GET['propalid'] > 0)
exit; exit;
} }
if ($user->societe_id > 0 && $propal->socid <> $user->societe_id)
accessforbidden();
llxHeader('',$langs->trans('Proposal'),'Proposition');
$societe = new Societe($db); $societe = new Societe($db);
$societe->fetch($propal->socid); $societe->fetch($propal->socid);
@ -828,11 +826,11 @@ if ($_GET['propalid'] > 0)
print '</td>'; print '</td>';
if ($conf->projet->enabled) $rowspan++; if ($conf->projet->enabled) $rowspan++;
if ($conf->expedition->enabled) if ($conf->expedition->enabled)
{ {
if ($conf->global->PROPALE_ADD_SHIPPING_DATE) $rowspan++; if ($conf->global->PROPALE_ADD_SHIPPING_DATE) $rowspan++;
if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) $rowspan++; if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) $rowspan++;
} }
// Notes // Notes
print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($propal->note_public).'</td>'; print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($propal->note_public).'</td>';
@ -1720,6 +1718,8 @@ if ($conf->expedition->enabled)
} }
else else
{ {
llxHeader('',$langs->trans('Proposal'),'Proposition');
/**************************************************************************** /****************************************************************************
* * * *
* Mode Liste des propales * * Mode Liste des propales *