From 15c040b33d4d4cd75371c844e88b234e055ec567 Mon Sep 17 00:00:00 2001 From: Rodolphe Quiedeville Date: Sat, 16 Apr 2005 17:52:05 +0000 Subject: [PATCH] Nouveau fichier --- .../pdf/pdf_expedition_rouget.modules.php | 75 +++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php diff --git a/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php new file mode 100644 index 00000000000..06455a1a9f1 --- /dev/null +++ b/htdocs/expedition/mods/pdf/pdf_expedition_rouget.modules.php @@ -0,0 +1,75 @@ + + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * or see http://www.gnu.org/ + * + * $Id$ + * $Source$ + * + * L'entete du pdf est définit dans pdf_expedition.class.php + */ +require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition.class.php"; + +Class pdf_expedition_rouget +{ + + Function pdf_expedition_rouget($db=0, &$objExpe) + { + $this->db = $db; + $this->name = "rouget"; + $this->description = "Modèle simple."; + $this->expe = $objExpe; + } + + Function generate($filename) + { + + $this->pdf = new pdf_expedition(); + $this->pdf->expe = &$this->expe; + + $this->pdf->Open(); + $this->pdf->AliasNbPages(); + $this->pdf->AddPage(); + + $this->pdf->SetTitle($objExpe->ref); + $this->pdf->SetSubject("Proposition commerciale"); + $this->pdf->SetCreator("Dolibarr ".DOL_VERSION); + //$this->pdf->SetAuthor($user->fullname); + + /* + * + */ + + $this->pdf->SetTextColor(0,0,0); + $this->pdf->SetFont('Arial','', 14); + + $this->expe->fetch_lignes(); + + for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++) + { + $a = $this->pdf->tableau_top + 14 + ($i * 7); + + $this->pdf->Text(8, $a, $this->expe->lignes[$i]->description); + + $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande); + + $this->pdf->Text(194, $a, $this->expe->lignes[$i]->qty_expedition); + } + + $this->pdf->Output($filename); + } +} +?>