[ Index ]
 

Code source de Dolibarr 2.0.1

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/htdocs/projet/ -> propal.php (source)

   1  <?php
   2  /* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   * Copyright (C) 2004-2005 Laurent Destailleur  <eldy@users.sourceforge.net>
   4   *
   5   * This program is free software; you can redistribute it and/or modify
   6   * it under the terms of the GNU General Public License as published by
   7   * the Free Software Foundation; either version 2 of the License, or
   8   * (at your option) any later version.
   9   *
  10   * This program is distributed in the hope that it will be useful,
  11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13   * GNU General Public License for more details.
  14   *
  15   * You should have received a copy of the GNU General Public License
  16   * along with this program; if not, write to the Free Software
  17   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  18   *
  19   * $Id: propal.php,v 1.14 2005/10/02 19:48:55 eldy Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/projet/propal.php,v $
  21   *
  22   */
  23  
  24  /**
  25          \file       htdocs/projet/propal.php
  26          \ingroup    projet propale
  27          \brief      Page des propositions commerciales par projet
  28          \version    $Revision: 1.14 $
  29  */
  30  
  31  require ("./pre.inc.php");
  32  require_once (DOL_DOCUMENT_ROOT."/propal.class.php");
  33  require_once (DOL_DOCUMENT_ROOT."/facture.class.php");
  34  require_once (DOL_DOCUMENT_ROOT."/commande/commande.class.php");
  35  
  36  $langs->load("projects");
  37  $langs->load("companies");
  38  $langs->load("propal");
  39  
  40  
  41  llxHeader("","../");
  42  
  43  $projet = new Project($db);
  44  $projet->fetch($_GET["id"]);
  45  
  46  $h=0;
  47  $head[$h][0] = DOL_URL_ROOT.'/projet/fiche.php?id='.$projet->id;
  48  $head[$h][1] = $langs->trans("Project");
  49  $h++;
  50  
  51  if ($conf->propal->enabled) {
  52    $langs->load("propal");
  53    $head[$h][0] = DOL_URL_ROOT.'/projet/propal.php?id='.$projet->id;
  54    $head[$h][1] = $langs->trans("Proposals");
  55    $hselected=$h;
  56    $h++;
  57  }  
  58  
  59  if ($conf->commande->enabled) {
  60    $langs->load("orders");
  61    $head[$h][0] = DOL_URL_ROOT.'/projet/commandes.php?id='.$projet->id;
  62    $head[$h][1] = $langs->trans("Orders");
  63    $h++;
  64  }
  65  
  66  if ($conf->facture->enabled) {
  67    $langs->load("bills");
  68    $head[$h][0] = DOL_URL_ROOT.'/projet/facture.php?id='.$projet->id;
  69    $head[$h][1] = $langs->trans("Bills");
  70    $h++;
  71  }
  72   
  73  dolibarr_fiche_head($head, $hselected, $langs->trans("Project").": ".$projet->ref);
  74  
  75  
  76  $propales = array();
  77  
  78  $projet->societe->fetch($projet->societe->id);
  79  
  80  print '<table class="border" width="100%">';
  81  print '<tr><td>'.$langs->trans("Company").'</td><td><a href="'.DOL_URL_ROOT.'/comm/fiche.php?socid='.$projet->societe->id.'">'.$projet->societe->nom.'</a></td></tr>';
  82  print '<tr><td>'.$langs->trans("Ref").'</td><td>'.$projet->ref.'</td></tr>';
  83  print '<tr><td>'.$langs->trans("Label").'</td><td>'.$projet->title.'</td></tr>';      
  84  print '</table>';
  85  
  86  $propales = $projet->get_propal_list();
  87  
  88  if (sizeof($propales)>0 && is_array($propales))
  89  {
  90      print '<br>';
  91      
  92      print_titre('Listes des propositions commerciales associées au projet');
  93      print '<table class="noborder" width="100%">';
  94      
  95      print '<tr class="liste_titre">';
  96      print '<td width="15%">'.$langs->trans("Ref").'</td><td width="25%">'.$langs->trans("Date").'</td><td align="right">'.$langs->trans("Amount").'</td><td>&nbsp;</td></tr>';
  97      
  98      for ($i = 0; $i<sizeof($propales);$i++)
  99      {
 100          $propale = new Propal($db);
 101          $propale->fetch($propales[$i]);
 102      
 103          $var=!$var;
 104          print "<tr $bc[$var]>";
 105          print "<td><a href=\"../comm/propal.php?propalid=$propale->id\">$propale->ref</a></td>\n";
 106      
 107          print '<td>'.dolibarr_print_date($propale->datep).'</td>';
 108      
 109          print '<td align="right">'.price($propale->price).'</td><td>&nbsp;</td></tr>';
 110          $total = $total + $propale->price;
 111      }
 112      
 113      print '<tr class="liste_total"><td colspan="2">'.$i.' '.$langs->trans("Proposal").'</td>';
 114      print '<td align="right">'.$langs->trans("TotalHT").': '.price($total).'</td>';
 115      print '<td align="left">'.$langs->trans("Currency".$conf->monnaie).'</td></tr></table>';
 116  }
 117  
 118  print '</div>';
 119  
 120  // Juste pour éviter bug IE qui réorganise mal div précédents si celui-ci absent
 121  print '<div class="tabsAction">';
 122  print '</div>';
 123  
 124  $db->close();
 125  
 126  llxFooter('$Date: 2005/10/02 19:48:55 $ - $Revision: 1.14 $');
 127  ?>


Généré le : Mon Nov 26 12:29:37 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics