| [ Index ] |
|
Code source de Dolibarr 2.0.1 |
1 <?php 2 /* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> 3 * Copyright (C) 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 * or see http://www.gnu.org/ 19 * 20 * $Id: pdf_expedition_rouget.modules.php,v 1.6 2005/07/10 08:45:02 hregis Exp $ 21 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php,v $ 22 */ 23 24 require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/ModelePdfExpedition.class.php"; 25 26 27 Class pdf_expedition_rouget extends ModelePdfExpedition 28 { 29 30 function pdf_expedition_rouget($db=0) 31 { 32 $this->db = $db; 33 $this->name = "rouget"; 34 $this->description = "Modèle simple."; 35 } 36 37 function Header() 38 { 39 $this->rect(5, 5, 200, 30); 40 41 $this->Code39(8, 8, $this->expe->ref); 42 43 $this->SetFont('Arial','', 14); 44 $this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref); 45 $this->Text(105, 18, "Date : " . strftime("%d %b %Y", $this->expe->date)); 46 $this->Text(105, 24, "Page : ". $this->PageNo() ."/{nb}", 0); 47 48 49 $this->rect(5, 40, 200, 250); 50 51 $this->tableau_top = 40; 52 53 $this->SetFont('Arial','', 10); 54 $a = $this->tableau_top + 5; 55 $this->Text(10, $a, "Produit"); 56 $this->Text(166, $a, "Quantitée"); 57 $this->Text(166, $a+4, "Commandée"); 58 $this->Text(190, $a, "Livrée"); 59 60 } 61 62 function generate(&$objExpe, $filename) 63 { 64 $this->expe = $objExpe; 65 66 $this->pdf = new ModelePdfExpedition(); 67 $this->pdf->expe = &$this->expe; 68 69 $this->pdf->Open(); 70 $this->pdf->AliasNbPages(); 71 $this->pdf->AddPage(); 72 73 $this->pdf->SetTitle($objExpe->ref); 74 $this->pdf->SetSubject("Proposition commerciale"); 75 $this->pdf->SetCreator("Dolibarr ".DOL_VERSION); 76 //$this->pdf->SetAuthor($user->fullname); 77 78 /* 79 * 80 */ 81 82 $this->pdf->SetTextColor(0,0,0); 83 $this->pdf->SetFont('Arial','', 14); 84 85 $this->expe->fetch_lignes(); 86 87 for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++) 88 { 89 $a = $this->pdf->tableau_top + 14 + ($i * 7); 90 91 $this->pdf->Text(8, $a, $this->expe->lignes[$i]->description); 92 93 $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande); 94 95 $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition); 96 } 97 98 $this->pdf->Output($filename); 99 } 100 } 101 102 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
| Généré le : Mon Nov 26 12:29:37 2007 | par Balluche grâce à PHPXref 0.7 |
|