From 0cd2bf0989c890b6bc1c3348b6a119152dd78386 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 8 Aug 2011 12:22:52 +0000 Subject: [PATCH] Fix: Forget to remove view after moving it into prospect area home page. --- htdocs/comm/index.php | 84 ++----------------------------------------- 1 file changed, 2 insertions(+), 82 deletions(-) diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 9d042b1ae2a..7af6a2934fb 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -21,7 +21,7 @@ * \file htdocs/comm/index.php * \ingroup commercial * \brief Home page of commercial area - * \version $Id: index.php,v 1.171 2011/08/03 00:46:26 eldy Exp $ + * \version $Id: index.php,v 1.172 2011/08/08 12:22:52 eldy Exp $ */ require("../main.inc.php"); @@ -272,86 +272,6 @@ $NBMAX=3; $max=3; -/* - * Last modified proposals - */ - -if ($conf->propal->enabled && $user->rights->propale->lire) -{ - $sql = "SELECT s.nom as name, s.rowid as socid, s.client, s.canvas, p.rowid as propalid, p.total_ht, p.ref, p.fk_statut, p.datep as dp"; - $sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; - $sql.= ", ".MAIN_DB_PREFIX."propal as p"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; - $sql.= " WHERE p.fk_soc = s.rowid"; - $sql.= " AND p.entity = ".$conf->entity; - //$sql.= " AND p.fk_statut > 1"; - if (!$user->rights->societe->client->voir && !$socid) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; - if ($socid) $sql.= " AND s.rowid = ".$socid; - $sql.= " ORDER BY p.datep DESC"; - $sql.= $db->plimit($NBMAX, 0); - - $resql=$db->query($sql); - if ($resql) - { - $num = $db->num_rows($resql); - - $i = 0; - print ''; - print ''; - $var=False; - while ($i < $num) - { - $objp = $db->fetch_object($resql); - print ''; - - // Ref - print ''; - - print ''; - print ''."\n"; - print ''."\n"; - print ''."\n"; - print ''."\n"; - $i++; - $var=!$var; - } - - print "
'.$langs->trans("LastModifiedProposals",$NBMAX).'
'; - - $propalstatic->id=$objp->propalid; - $propalstatic->ref=$objp->ref; - - print ''; - print ''; - print ''; - print '
'; - print $propalstatic->getNomUrl(1); - print ''; - // TODO se baser sur datep ou fin_validite ? - if (($objp->fk_statut <= 1) && ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay))) print img_warning($langs->trans("Late")); - print ''; - $filename=dol_sanitizeFileName($objp->ref); - $filedir=$conf->propale->dir_output . '/' . dol_sanitizeFileName($objp->ref); - $urlsource=$_SERVER['PHP_SELF'].'?id='.$objp->propalid; - $formfile->show_documents('propal',$filename,$filedir,$urlsource,'','','',1,'',1); - print '
'; - - print '
'; - $companystatic->id=$objp->socid; - $companystatic->name=$objp->name; - $companystatic->client=$objp->client; - $companystatic->canvas=$objp->canvas; - print $companystatic->getNomUrl(1,'customer',44); - print ''; - print dol_print_date($db->jdate($objp->dp),'day').''.price($objp->total_ht).''.$propalstatic->LibStatut($objp->fk_statut,3).'

"; - $db->free($resql); - } - else - { - dol_print_error($db,''); - } -} - /* * Last modified customers or prospects */ @@ -631,5 +551,5 @@ print ''; $db->close(); -llxFooter('$Date: 2011/08/03 00:46:26 $ - $Revision: 1.171 $'); +llxFooter('$Date: 2011/08/08 12:22:52 $ - $Revision: 1.172 $'); ?> \ No newline at end of file