[ 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/telephonie/pdf/ -> pdfdetail_standard.modeles.php (source)

   1  <?PHP
   2  /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
   3   *
   4   * This program is free software; you can redistribute it and/or modify
   5   * it under the terms of the GNU General Public License as published by
   6   * the Free Software Foundation; either version 2 of the License, or
   7   * (at your option) any later version.
   8   *
   9   * This program is distributed in the hope that it will be useful,
  10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12   * GNU General Public License for more details.
  13   *
  14   * You should have received a copy of the GNU General Public License
  15   * along with this program; if not, write to the Free Software
  16   * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17   * or see http://www.gnu.org/
  18   *
  19   * $Id: pdfdetail_standard.modeles.php,v 1.4 2005/04/08 08:49:20 rodolphe Exp $
  20   * $Source: /cvsroot/dolibarr/dolibarr/htdocs/telephonie/pdf/pdfdetail_standard.modeles.php,v $
  21   *
  22   */
  23  
  24  /*!
  25    \file       htdocs/telephonie/pdf/pdfdetail_standard_modeles.pdf
  26    \ingroup    telephonie
  27    \brief      Fichier de modèle pdf pour les factures détaillées
  28    \version    $Revision: 1.4 $
  29  */
  30  
  31  class pdfdetail_standard_modeles extends FPDF {
  32  
  33    var $client_nom;
  34  
  35    /*
  36     * Header
  37     */
  38  
  39    function Header()
  40    {
  41      $this->SetXY(10,5);
  42      
  43      // 400x186
  44  
  45      $logo_file = DOL_DOCUMENT_ROOT."/../documents/logo.jpg";
  46  
  47      if (file_exists($logo_file))
  48      {
  49        $this->Image($logo_file, 10, 5, 60, 27.9, 'JPG');
  50      }
  51  
  52      $this->SetTextColor(0,90,200);
  53      $this->SetFont('Arial','',10);
  54      $this->SetXY(11,31);
  55      $this->MultiCell(89, 4, "Facture détaillée : ".$this->fac->ref);
  56  
  57      $this->SetX(11);
  58      $this->MultiCell(89, 4, "Ligne : " . $this->ligne);
  59  
  60      $this->SetX(11);
  61  
  62      $libelle = "Du ".strftime("%d/%m/%Y",$this->factel->get_comm_min_date($this->year.$this->month));
  63      $libelle .= " au ".strftime("%d/%m/%Y",$this->factel->get_comm_max_date($this->year.$this->month));
  64      $this->MultiCell(89, 4, $libelle, 0);
  65  
  66      $this->SetX(11);
  67      $this->MultiCell(80, 4, "Page : ". $this->PageNo() ."/{nb}", 0);
  68  
  69      // Clients spéciaux
  70  
  71      if ($this->ligne_ville)
  72        {
  73      $this->SetX(11);
  74      $this->MultiCell(80, 4, "Agence : ". $this->ligne_ville, 0);
  75        }
  76  
  77      $this->rect(10, 30, 95, 23);
  78      
  79      $this->SetTextColor(0,0,0);
  80      $this->SetFont('Arial','',10);
  81  
  82      $this->SetXY(107, 31);
  83  
  84      $this->MultiCell(66,4, $this->client_nom);
  85  
  86      $this->SetX(107);
  87      $this->MultiCell(86,4, $this->client_adresse . "\n" . $this->client_cp . " " . $this->client_ville);
  88  
  89      $this->rect(105, 30, 95, 23);
  90  
  91      /*
  92       * On positionne le curseur pour la liste
  93       */        
  94      $this->SetXY(10,$this->tab_top + 6);
  95      $this->colonne = 1;
  96      $this->inc = 0;
  97    }
  98  
  99    /* 
 100     * Footer
 101     */
 102  
 103    function Footer()
 104    {
 105  
 106      if ($this->FirstPage == 1)
 107        {
 108      $this->FirstPage = 0;
 109        }
 110      else
 111        {
 112  
 113      $this->SetFont('Arial','',8);
 114      
 115      $this->Text(11, $this->tab_top + 3,'Date');
 116      $this->Text(106, $this->tab_top + 3,'Date');
 117      
 118      $w = 33;
 119      
 120      $this->Text($w+1, $this->tab_top + 3,'Numéro');
 121      $this->Text($w+96, $this->tab_top + 3,'Numéro');
 122      
 123      $w = 47;
 124      
 125      $this->Text($w+1, $this->tab_top + 3,'Destination');
 126      $this->Text($w+96, $this->tab_top + 3,'Destination');
 127      
 128      $w = 86;
 129      
 130      $this->Text($w+1, $this->tab_top + 3,'Durée');
 131      $this->Text($w+96, $this->tab_top + 3,'Durée');
 132      
 133      $w = 98;
 134      
 135      $this->Text($w+1, $this->tab_top + 3,'HT');
 136      $this->Text($w+96, $this->tab_top + 3,'HT');
 137      
 138      $this->line(10, $this->tab_top + 4, 200, $this->tab_top + 4 );
 139  
 140      /* Ligne Médiane */
 141  
 142      $this->line(105, $this->tab_top, 105, $this->tab_top + $this->tab_height);
 143      
 144        }
 145  
 146      $this->Rect(10, $this->tab_top, 190, $this->tab_height);
 147  
 148    }
 149  }
 150  ?>


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