| [ 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 * Copyright (C) 2005 Regis Houssin <regis.houssin@cap-networks.com> 5 * 6 * This program is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * This program is distributed in the hope that it will be useful, 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 * GNU General Public License for more details. 15 * 16 * You should have received a copy of the GNU General Public License 17 * along with this program; if not, write to the Free Software 18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 19 * or see http://www.gnu.org/ 20 * 21 * $Id: pdf_expedition_dorade.modules.php,v 1.5 2005/07/10 08:45:02 hregis Exp $ 22 * $Source: /cvsroot/dolibarr/dolibarr/htdocs/expedition/mods/pdf/pdf_expedition_dorade.modules.php,v $ 23 */ 24 25 require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/ModelePdfExpedition.class.php"; 26 27 28 Class pdf_expedition_dorade extends ModelePdfExpedition 29 { 30 31 function pdf_expedition_dorade($db=0) 32 { 33 $this->db = $db; 34 $this->name = "dorade"; 35 $this->description = "Modèle identique au rouget utilisé pour debug uniquement."; 36 } 37 38 39 function Header() 40 { 41 $this->rect(5, 5, 200, 30); 42 43 $this->Code39(8, 8, $this->expe->ref); 44 45 $this->SetFont('Arial','', 14); 46 $this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref); 47 $this->Text(105, 18, "Date : " . strftime("%a %e %b %Y", $this->expe->date)); 48 $this->Text(105, 26, "Page : ". $this->PageNo() ."/{nb}", 0); 49 50 51 // 52 53 $this->rect(5, 40, 200, 30); 54 55 $this->Code39(8, 44, $this->expe->commande->ref); 56 57 $this->SetFont('Arial','', 14); 58 $this->Text(105, 48, "Numéro de Commande : ".$this->expe->commande->ref); 59 $this->Text(105, 54, "Date de la commande : " . strftime("%e %b %Y", $this->expe->commande->date)); 60 61 // 62 63 $this->rect(5, 80, 200, 210); 64 65 $this->tableau_top = 80; 66 67 $this->SetFont('Arial','', 12); 68 $a = $this->tableau_top + 5; 69 $this->Text(8, $a, "Référence"); 70 71 $this->Text(40, $a, "Description"); 72 73 $this->Text(174, $a, "Quantitée"); 74 75 $this->SetFont('Arial','', 8); 76 $this->Text(166, $a+4, "Commandée"); 77 $this->Text(190, $a+4, "Livrée"); 78 79 } 80 81 function generate(&$objExpe, $filename) 82 { 83 $this->expe = $objExpe; 84 85 $this->expe->fetch_commande(); 86 87 $this->pdf = new ModelePdfExpedition(); 88 $this->pdf->expe = &$this->expe; 89 90 $this->pdf->Open(); 91 $this->pdf->AliasNbPages(); 92 $this->pdf->AddPage(); 93 94 $this->pdf->SetTitle($objExpe->ref); 95 $this->pdf->SetSubject("Bordereau d'expedition"); 96 $this->pdf->SetCreator("Dolibarr ".DOL_VERSION); 97 //$this->pdf->SetAuthor($user->fullname); 98 99 /* 100 * 101 */ 102 $this->pdf->SetTextColor(0,0,0); 103 $this->pdf->SetFont('Arial','', 16); 104 105 $this->expe->fetch_lignes(); 106 107 for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++) 108 { 109 $a = $this->pdf->tableau_top + 14 + ($i * 16); 110 111 $this->pdf->i25(8, ($a - 2), "000000".$this->expe->lignes[$i]->product_id, 1, 8); 112 113 $this->pdf->Text(40, $a, $this->expe->lignes[$i]->description); 114 115 $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande); 116 117 $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition); 118 } 119 120 $this->pdf->Output($filename); 121 } 122 } 123 ?>
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 |
|