Fixed: Plantage "Fatal error: Cannot redeclare class pdf_expedition..."
This commit is contained in:
parent
eac9d46bfd
commit
2f0de6e983
@ -1,73 +0,0 @@
|
|||||||
<?PHP
|
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
|
||||||
*
|
|
||||||
* 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$
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/fpdf/DolibarrPdfBarCode.class.php';
|
|
||||||
|
|
||||||
Class pdf_expedition extends DolibarrPdfBarCode
|
|
||||||
{
|
|
||||||
|
|
||||||
function Header()
|
|
||||||
{
|
|
||||||
$this->rect(5, 5, 200, 30);
|
|
||||||
|
|
||||||
$this->Code39(8, 8, $this->expe->ref);
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 14);
|
|
||||||
$this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref);
|
|
||||||
$this->Text(105, 18, "Date : " . strftime("%a %e %b %Y", $this->expe->date));
|
|
||||||
$this->Text(105, 26, "Page : ". $this->PageNo() ."/{nb}", 0);
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
$this->rect(5, 40, 200, 30);
|
|
||||||
|
|
||||||
$this->Code39(8, 44, $this->expe->commande->ref);
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 14);
|
|
||||||
$this->Text(105, 48, "Numéro de Commande : ".$this->expe->commande->ref);
|
|
||||||
$this->Text(105, 54, "Date de la commande : " . strftime("%e %b %Y", $this->expe->commande->date));
|
|
||||||
|
|
||||||
//
|
|
||||||
|
|
||||||
$this->rect(5, 80, 200, 210);
|
|
||||||
|
|
||||||
$this->tableau_top = 80;
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 12);
|
|
||||||
$a = $this->tableau_top + 5;
|
|
||||||
$this->Text(8, $a, "Référence");
|
|
||||||
|
|
||||||
$this->Text(40, $a, "Description");
|
|
||||||
|
|
||||||
$this->Text(174, $a, "Quantitée");
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 8);
|
|
||||||
$this->Text(166, $a+4, "Commandée");
|
|
||||||
$this->Text(190, $a+4, "Livrée");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
?>
|
|
||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -23,34 +24,10 @@
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/fpdf/DolibarrPdfBarCode.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/fpdf/DolibarrPdfBarCode.class.php';
|
||||||
|
|
||||||
Class pdf_expedition extends DolibarrPdfBarCode
|
Class ModelePdfExpedition extends DolibarrPdfBarCode
|
||||||
{
|
{
|
||||||
|
|
||||||
function Header()
|
|
||||||
{
|
|
||||||
$this->rect(5, 5, 200, 30);
|
|
||||||
|
|
||||||
$this->Code39(8, 8, $this->expe->ref);
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 14);
|
|
||||||
$this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref);
|
|
||||||
$this->Text(105, 18, "Date : " . strftime("%d %b %Y", $this->expe->date));
|
|
||||||
$this->Text(105, 24, "Page : ". $this->PageNo() ."/{nb}", 0);
|
|
||||||
|
|
||||||
|
|
||||||
$this->rect(5, 40, 200, 250);
|
|
||||||
|
|
||||||
$this->tableau_top = 40;
|
|
||||||
|
|
||||||
$this->SetFont('Arial','', 10);
|
|
||||||
$a = $this->tableau_top + 5;
|
|
||||||
$this->Text(10, $a, "Produit");
|
|
||||||
$this->Text(166, $a, "Quantitée");
|
|
||||||
$this->Text(166, $a+4, "Commandée");
|
|
||||||
$this->Text(190, $a, "Livrée");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,22 +19,65 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $Source$
|
||||||
*
|
|
||||||
* L'entete du pdf est définit dans pdf_expedition.class.php
|
|
||||||
*/
|
*/
|
||||||
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/modele.dorade.php";
|
|
||||||
|
|
||||||
Class pdf_expedition_dorade
|
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition.class.php";
|
||||||
|
|
||||||
|
|
||||||
|
Class pdf_expedition_dorade extends ModelePdfExpedition
|
||||||
{
|
{
|
||||||
|
|
||||||
Function pdf_expedition_dorade($db=0)
|
function pdf_expedition_dorade($db=0)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "dorade";
|
$this->name = "dorade";
|
||||||
$this->description = "Modèle identique au rouget utilisé pour debug uniquement.";
|
$this->description = "Modèle identique au rouget utilisé pour debug uniquement.";
|
||||||
}
|
}
|
||||||
|
|
||||||
Function generate(&$objExpe, $filename)
|
|
||||||
|
function Header()
|
||||||
|
{
|
||||||
|
$this->rect(5, 5, 200, 30);
|
||||||
|
|
||||||
|
$this->Code39(8, 8, $this->expe->ref);
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 14);
|
||||||
|
$this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref);
|
||||||
|
$this->Text(105, 18, "Date : " . strftime("%a %e %b %Y", $this->expe->date));
|
||||||
|
$this->Text(105, 26, "Page : ". $this->PageNo() ."/{nb}", 0);
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
$this->rect(5, 40, 200, 30);
|
||||||
|
|
||||||
|
$this->Code39(8, 44, $this->expe->commande->ref);
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 14);
|
||||||
|
$this->Text(105, 48, "Numéro de Commande : ".$this->expe->commande->ref);
|
||||||
|
$this->Text(105, 54, "Date de la commande : " . strftime("%e %b %Y", $this->expe->commande->date));
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
|
$this->rect(5, 80, 200, 210);
|
||||||
|
|
||||||
|
$this->tableau_top = 80;
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 12);
|
||||||
|
$a = $this->tableau_top + 5;
|
||||||
|
$this->Text(8, $a, "Référence");
|
||||||
|
|
||||||
|
$this->Text(40, $a, "Description");
|
||||||
|
|
||||||
|
$this->Text(174, $a, "Quantitée");
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 8);
|
||||||
|
$this->Text(166, $a+4, "Commandée");
|
||||||
|
$this->Text(190, $a+4, "Livrée");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function generate(&$objExpe, $filename)
|
||||||
{
|
{
|
||||||
$this->expe = $objExpe;
|
$this->expe = $objExpe;
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
<?PHP
|
<?php
|
||||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||||
|
* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -18,22 +19,47 @@
|
|||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* $Source$
|
* $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";
|
require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition.class.php";
|
||||||
|
|
||||||
Class pdf_expedition_rouget
|
|
||||||
|
Class pdf_expedition_rouget extends ModelePdfExpedition
|
||||||
{
|
{
|
||||||
|
|
||||||
Function pdf_expedition_rouget($db=0)
|
function pdf_expedition_rouget($db=0)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
$this->name = "rouget";
|
$this->name = "rouget";
|
||||||
$this->description = "Modèle simple.";
|
$this->description = "Modèle simple.";
|
||||||
}
|
}
|
||||||
|
|
||||||
Function generate(&$objExpe, $filename)
|
function Header()
|
||||||
|
{
|
||||||
|
$this->rect(5, 5, 200, 30);
|
||||||
|
|
||||||
|
$this->Code39(8, 8, $this->expe->ref);
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 14);
|
||||||
|
$this->Text(105, 12, "Bordereau d'expédition : ".$this->expe->ref);
|
||||||
|
$this->Text(105, 18, "Date : " . strftime("%d %b %Y", $this->expe->date));
|
||||||
|
$this->Text(105, 24, "Page : ". $this->PageNo() ."/{nb}", 0);
|
||||||
|
|
||||||
|
|
||||||
|
$this->rect(5, 40, 200, 250);
|
||||||
|
|
||||||
|
$this->tableau_top = 40;
|
||||||
|
|
||||||
|
$this->SetFont('Arial','', 10);
|
||||||
|
$a = $this->tableau_top + 5;
|
||||||
|
$this->Text(10, $a, "Produit");
|
||||||
|
$this->Text(166, $a, "Quantitée");
|
||||||
|
$this->Text(166, $a+4, "Commandée");
|
||||||
|
$this->Text(190, $a, "Livrée");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
function generate(&$objExpe, $filename)
|
||||||
{
|
{
|
||||||
$this->expe = $objExpe;
|
$this->expe = $objExpe;
|
||||||
|
|
||||||
@ -72,4 +98,5 @@ Class pdf_expedition_rouget
|
|||||||
$this->pdf->Output($filename);
|
$this->pdf->Output($filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user