Réécriture du code car il y avait des incompatibilités - reste un problème avec le
code39
This commit is contained in:
parent
85ffe1d32a
commit
25308b83f7
@ -39,7 +39,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
|element->commande,source->external,code->EXPEDITEUR \n
|
|element->commande,source->external,code->EXPEDITEUR \n
|
||||||
|element->commande,source->external,code->DESTINATAIRE \n
|
|element->commande,source->external,code->DESTINATAIRE \n
|
||||||
";
|
";
|
||||||
$this->type = 'pdf';
|
$pdf->type = 'pdf';
|
||||||
}
|
}
|
||||||
|
|
||||||
//*****************************
|
//*****************************
|
||||||
@ -58,14 +58,14 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$this->expe = $objExpe;
|
$this->expe = $objExpe;
|
||||||
$this->expe->fetch_commande();
|
$this->expe->fetch_commande();
|
||||||
//Creation du Client
|
//Creation du Client
|
||||||
$this->soc = new Societe($this->db);
|
$soc = new Societe($this->db);
|
||||||
$this->soc->fetch($this->expe->commande->soc_id);
|
$soc->fetch($this->expe->commande->soc_id);
|
||||||
//Creation de l expediteur
|
//Creation de l expediteur
|
||||||
$this->expediteur = $this->soc;
|
$this->expediteur = $soc;
|
||||||
//Creation du destinataire
|
//Creation du destinataire
|
||||||
$this->destinataire = new Contact($this->db);
|
$this->destinataire = new Contact($this->db);
|
||||||
// $this->expe->commande->fetch($this->commande->id);
|
// $pdf->expe->commande->fetch($pdf->commande->id);
|
||||||
//print_r($this->expe);
|
//print_r($pdf->expe);
|
||||||
$idcontact = $this->expe->commande->getIdContact('external','DESTINATAIRE');
|
$idcontact = $this->expe->commande->getIdContact('external','DESTINATAIRE');
|
||||||
$this->destinataire->fetch($idcontact[0]);
|
$this->destinataire->fetch($idcontact[0]);
|
||||||
//Creation du livreur
|
//Creation du livreur
|
||||||
@ -85,7 +85,7 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
umask(0);
|
umask(0);
|
||||||
//On tente de le creer
|
//On tente de le creer
|
||||||
if (! mkdir($dir, 0755)){
|
if (! mkdir($dir, 0755)){
|
||||||
$this->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
$pdf->error=$langs->trans("ErrorCanNotCreateDir",$dir);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -93,30 +93,30 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
if (file_exists($dir))
|
if (file_exists($dir))
|
||||||
{
|
{
|
||||||
// Initialisation Bon vierge
|
// Initialisation Bon vierge
|
||||||
$this->FPDF('l','mm','A5');
|
$pdf = new FPDF('l','mm','A5');
|
||||||
$this->Open();
|
$pdf->Open();
|
||||||
$this->AddPage();
|
$pdf->AddPage();
|
||||||
//Generation de l entete du fichier
|
//Generation de l entete du fichier
|
||||||
$this->SetTitle($this->expe->ref);
|
$pdf->SetTitle($this->expe->ref);
|
||||||
$this->SetSubject($langs->trans("Sending"));
|
$pdf->SetSubject($langs->trans("Sending"));
|
||||||
$this->SetCreator("EXPRESSIV Dolibarr ".DOL_VERSION);
|
$pdf->SetCreator("EXPRESSIV Dolibarr ".DOL_VERSION);
|
||||||
$this->SetAuthor($user->fullname);
|
$pdf->SetAuthor($user->fullname);
|
||||||
$this->SetMargins(10, 10, 10);
|
$pdf->SetMargins(10, 10, 10);
|
||||||
$this->SetAutoPageBreak(1,0);
|
$pdf->SetAutoPageBreak(1,0);
|
||||||
//Insertion de l entete
|
//Insertion de l entete
|
||||||
$this->_pagehead($pdf, $this->expe);
|
$this->_pagehead($pdf, $this->expe);
|
||||||
//Initiailisation des coordonnées
|
//Initiailisation des coordonnées
|
||||||
$tab_top = 53;
|
$tab_top = 53;
|
||||||
$tab_height = 70;
|
$tab_height = 70;
|
||||||
$this->SetFillColor(240,240,240);
|
$pdf->SetFillColor(240,240,240);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->SetFont('Arial','', 7);
|
$pdf->SetFont('Arial','', 7);
|
||||||
$this->SetXY (10, $tab_top + 5 );
|
$pdf->SetXY (10, $tab_top + 5 );
|
||||||
$iniY = $this->GetY();
|
$iniY = $pdf->GetY();
|
||||||
$curY = $this->GetY();
|
$curY = $pdf->GetY();
|
||||||
$nexY = $this->GetY();
|
$nexY = $pdf->GetY();
|
||||||
//Generation du tableau
|
//Generation du tableau
|
||||||
$this->_tableau($tab_top, $tab_height, $nexY);
|
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
||||||
//Recuperation des produits de la commande.
|
//Recuperation des produits de la commande.
|
||||||
$this->expe->commande->fetch_lignes();
|
$this->expe->commande->fetch_lignes();
|
||||||
$Produits = $this->expe->commande->lignes;
|
$Produits = $this->expe->commande->lignes;
|
||||||
@ -126,41 +126,41 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$Prod = new Product($this->db);
|
$Prod = new Product($this->db);
|
||||||
$Prod->fetch($Produits[$i]->product_id);
|
$Prod->fetch($Produits[$i]->product_id);
|
||||||
//Creation des cases à cocher
|
//Creation des cases à cocher
|
||||||
$this->rect(10+3, $curY+1, 3, 3);
|
$pdf->rect(10+3, $curY+1, 3, 3);
|
||||||
$this->rect(20+3, $curY+1, 3, 3);
|
$pdf->rect(20+3, $curY+1, 3, 3);
|
||||||
//Insertion de la reference du produit
|
//Insertion de la reference du produit
|
||||||
$this->SetXY (30, $curY );
|
$pdf->SetXY (30, $curY );
|
||||||
$this->SetFont('Arial','B', 7);
|
$pdf->SetFont('Arial','B', 7);
|
||||||
$this->MultiCell(20, 5, $Prod->ref, 0, 'L', 0);
|
$pdf->MultiCell(20, 5, $Prod->ref, 0, 'L', 0);
|
||||||
//Insertion du libelle
|
//Insertion du libelle
|
||||||
$this->SetFont('Arial','', 7);
|
$pdf->SetFont('Arial','', 7);
|
||||||
$this->SetXY (50, $curY );
|
$pdf->SetXY (50, $curY );
|
||||||
$this->MultiCell(130, 5, stripslashes($Prod->libelle), 0, 'L', 0);
|
$pdf->MultiCell(130, 5, stripslashes($Prod->libelle), 0, 'L', 0);
|
||||||
//Insertion de la quantite
|
//Insertion de la quantite
|
||||||
$this->SetFont('Arial','', 7);
|
$pdf->SetFont('Arial','', 7);
|
||||||
$this->SetXY (180, $curY );
|
$pdf->SetXY (180, $curY );
|
||||||
$this->MultiCell(20, 5, $Produits[$i]->qty, 0, 'L', 0);
|
$pdf->MultiCell(20, 5, $Produits[$i]->qty, 0, 'L', 0);
|
||||||
//Generation de la page 2
|
//Generation de la page 2
|
||||||
$curY += 4;
|
$curY += 4;
|
||||||
$nexY = $curY;
|
$nexY = $curY;
|
||||||
if ($nexY > ($tab_top+$tab_height-10) && $i < $nblignes - 1){
|
if ($nexY > ($tab_top+$tab_height-10) && $i < $nblignes - 1){
|
||||||
$this->_tableau($tab_top, $tab_height, $nexY);
|
$this->_tableau($pdf, $tab_top, $tab_height, $nexY);
|
||||||
$this->_pagefoot();
|
$this->_pagefoot($pdf);
|
||||||
$this->AliasNbPages();
|
$pdf->AliasNbPages();
|
||||||
$this->AddPage();
|
$pdf->AddPage();
|
||||||
$nexY = $iniY;
|
$nexY = $iniY;
|
||||||
$this->_pagehead($pdf, $this->expe);
|
$this->_pagehead($pdf, $this->expe);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->SetFont('Arial','', 7);
|
$pdf->SetFont('Arial','', 7);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Insertio ndu pied de page
|
//Insertio ndu pied de page
|
||||||
$this->_pagefoot($propale);
|
$this->_pagefoot($pdf);
|
||||||
$this->AliasNbPages();
|
$pdf->AliasNbPages();
|
||||||
//Cloture du pdf
|
//Cloture du pdf
|
||||||
$this->Close();
|
$pdf->Close();
|
||||||
//Ecriture du pdf
|
//Ecriture du pdf
|
||||||
$this->Output($file);
|
$pdf->Output($file);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -169,39 +169,43 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
//********************************
|
//********************************
|
||||||
// Generation du tableau
|
// Generation du tableau
|
||||||
//********************************
|
//********************************
|
||||||
function _tableau($tab_top, $tab_height, $nexY){
|
function _tableau(&$pdf, $tab_top, $tab_height, $nexY)
|
||||||
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
$langs->load("main");
|
$langs->load("main");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
$this->SetFont('Arial','B',8);
|
|
||||||
$this->SetXY(10,$tab_top);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$this->MultiCell(10,5,"LS",0,'C',1);
|
$pdf->SetXY(10,$tab_top);
|
||||||
$this->line(20, $tab_top, 20, $tab_top + $tab_height);
|
$pdf->MultiCell(10,5,"LS",0,'C',1);
|
||||||
$this->SetXY(20,$tab_top);
|
$pdf->line(20, $tab_top, 20, $tab_top + $tab_height);
|
||||||
$this->MultiCell(10,5,"LR",0,'C',1);
|
$pdf->SetXY(20,$tab_top);
|
||||||
$this->line(30, $tab_top, 30, $tab_top + $tab_height);
|
$pdf->MultiCell(10,5,"LR",0,'C',1);
|
||||||
$this->SetXY(30,$tab_top);
|
$pdf->line(30, $tab_top, 30, $tab_top + $tab_height);
|
||||||
$this->MultiCell(20,5,$langs->trans("Ref"),0,'C',1);
|
$pdf->SetXY(30,$tab_top);
|
||||||
$this->SetXY(50,$tab_top);
|
$pdf->MultiCell(20,5,$langs->trans("Ref"),0,'C',1);
|
||||||
$this->MultiCell(130,5,$langs->trans("Description"),0,'L',1);
|
$pdf->SetXY(50,$tab_top);
|
||||||
$this->SetXY(180,$tab_top);
|
$pdf->MultiCell(130,5,$langs->trans("Description"),0,'L',1);
|
||||||
$this->MultiCell(20,5,$langs->trans("Quantity"),0,'L',1);
|
$pdf->SetXY(180,$tab_top);
|
||||||
$this->Rect(10, $tab_top, 190, $tab_height);
|
$pdf->MultiCell(20,5,$langs->trans("Quantity"),0,'L',1);
|
||||||
|
$pdf->Rect(10, $tab_top, 190, $tab_height);
|
||||||
}
|
}
|
||||||
|
|
||||||
//********************************
|
//********************************
|
||||||
// Generation du Pied de page
|
// Generation du Pied de page
|
||||||
//********************************
|
//********************************
|
||||||
function _pagefoot(){
|
function _pagefoot(&$pdf)
|
||||||
$this->SetFont('Arial','',8);
|
{
|
||||||
$this->SetY(-23);
|
$pdf->SetFont('Arial','',8);
|
||||||
$this->MultiCell(100, 3, "Déclare avoir reçu les marchandises ci-dessus en bon état,", 0, 'L');
|
$pdf->SetY(-23);
|
||||||
$this->SetY(-13);
|
$pdf->MultiCell(100, 3, "Déclare avoir reçu les marchandises ci-dessus en bon état,", 0, 'L');
|
||||||
$this->MultiCell(100, 3, "A___________________________________ le ____/_____/__________" , 0, 'C');
|
$pdf->SetY(-13);
|
||||||
$this->SetXY(120,-23);
|
$pdf->MultiCell(100, 3, "A___________________________________ le ____/_____/__________" , 0, 'C');
|
||||||
$this->MultiCell(100, 3, "Nom et Signature : " , 0, 'C');
|
$pdf->SetXY(120,-23);
|
||||||
$this->SetXY(-10,-10);
|
$pdf->MultiCell(100, 3, "Nom et Signature : " , 0, 'C');
|
||||||
$this->MultiCell(10, 3, $this->PageNo().'/{nb}', 0, 'R');
|
$pdf->SetXY(-10,-10);
|
||||||
|
$pdf->MultiCell(10, 3, $pdf->PageNo().'/{nb}', 0, 'R');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -241,98 +245,98 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
//*********************Entete****************************
|
//*********************Entete****************************
|
||||||
//Nom du Document
|
//Nom du Document
|
||||||
$Yoff = 0;
|
$Yoff = 0;
|
||||||
$this->SetXY(60,7);
|
$pdf->SetXY(60,7);
|
||||||
$this->SetFont('Arial','B',14);
|
$pdf->SetFont('Arial','B',14);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->MultiCell(0, 8, "BON DE LIVRAISON", '' , 'L');
|
$pdf->MultiCell(0, 8, "BON DE LIVRAISON", '' , 'L');
|
||||||
//Num Expedition
|
//Num Expedition
|
||||||
$Yoff = $Yoff+7;
|
$Yoff = $Yoff+7;
|
||||||
$Xoff = 115;
|
$Xoff = 115;
|
||||||
// $this->rect($Xoff, $Yoff, 85, 8);
|
// $pdf->rect($Xoff, $Yoff, 85, 8);
|
||||||
$this->SetXY($Xoff,$Yoff);
|
$pdf->SetXY($Xoff,$Yoff);
|
||||||
$this->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->MultiCell(0, 8, "Num Bon de Livraison : ".$exp->ref, '' , 'L');
|
$pdf->MultiCell(0, 8, "Num Bon de Livraison : ".$exp->ref, '' , 'L');
|
||||||
$this->Code39($Xoff+43, $Yoff+1, $this->expe->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
//$this->Code39($Xoff+43, $Yoff+1, $pdf->expe->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||||
//Num Commande
|
//Num Commande
|
||||||
$Yoff = $Yoff+10;
|
$Yoff = $Yoff+10;
|
||||||
// $this->rect($Xoff, $Yoff, 85, 8);
|
// $pdf->rect($Xoff, $Yoff, 85, 8);
|
||||||
$this->SetXY($Xoff,$Yoff);
|
$pdf->SetXY($Xoff,$Yoff);
|
||||||
$this->SetFont('Arial','',8);
|
$pdf->SetFont('Arial','',8);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->MultiCell(0, 8, "Num Commande : ".$exp->commande->ref, '' , 'L');
|
$pdf->MultiCell(0, 8, "Num Commande : ".$exp->commande->ref, '' , 'L');
|
||||||
$this->Code39($Xoff+43, $Yoff+1, $exp->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
//$this->Code39($Xoff+43, $Yoff+1, $exp->commande->ref,$ext = true, $cks = false, $w = 0.4, $h = 4, $wide = true);
|
||||||
//Definition Emplacement du bloc Societe
|
//Definition Emplacement du bloc Societe
|
||||||
$blSocX=11;
|
$blSocX=11;
|
||||||
$blSocY=25;
|
$blSocY=25;
|
||||||
$blSocW=50;
|
$blSocW=50;
|
||||||
$blSocX2=$blSocW+$blSocXs;
|
$blSocX2=$blSocW+$blSocXs;
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
//Adresse Internet
|
//Adresse Internet
|
||||||
if (defined("FAC_PDF_WWW")){
|
if (defined("FAC_PDF_WWW")){
|
||||||
$this->SetXY($blSocX,$blSocY);
|
$pdf->SetXY($blSocX,$blSocY);
|
||||||
$this->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$this->MultiCell($blSocW, 3, FAC_PDF_WWW, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, FAC_PDF_WWW, '' , 'L');
|
||||||
}
|
}
|
||||||
if (defined("FAC_PDF_ADRESSE")){
|
if (defined("FAC_PDF_ADRESSE")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX,$blSocY+3);
|
$pdf->SetXY($blSocX,$blSocY+3);
|
||||||
$this->MultiCell($blSocW, 3, FAC_PDF_ADRESSE, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, FAC_PDF_ADRESSE, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("FAC_PDF_ADRESSE2")){
|
if (defined("FAC_PDF_ADRESSE2")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX,$blSocY+6);
|
$pdf->SetXY($blSocX,$blSocY+6);
|
||||||
$this->MultiCell($blSocW, 3, FAC_PDF_ADRESSE2, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, FAC_PDF_ADRESSE2, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("FAC_PDF_TEL")){
|
if (defined("FAC_PDF_TEL")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX,$blSocY+10);
|
$pdf->SetXY($blSocX,$blSocY+10);
|
||||||
$this->MultiCell($blSocW, 3, "Tel : " . FAC_PDF_TEL, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, "Tel : " . FAC_PDF_TEL, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("FAC_PDF_MEL")){
|
if (defined("FAC_PDF_MEL")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX,$blSocY+13);
|
$pdf->SetXY($blSocX,$blSocY+13);
|
||||||
$this->MultiCell(40, 3, "Email : " . FAC_PDF_MEL, '' , 'L');
|
$pdf->MultiCell(40, 3, "Email : " . FAC_PDF_MEL, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("FAC_PDF_FAX")){
|
if (defined("FAC_PDF_FAX")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX,$blSocY+16);
|
$pdf->SetXY($blSocX,$blSocY+16);
|
||||||
$this->MultiCell(40, 3, "Fax : " . FAC_PDF_FAX, '' , 'L');
|
$pdf->MultiCell(40, 3, "Fax : " . FAC_PDF_FAX, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("MAIN_INFO_SIRET")){
|
if (defined("MAIN_INFO_SIRET")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX2,$blSocY+10);
|
$pdf->SetXY($blSocX2,$blSocY+10);
|
||||||
$this->MultiCell($blSocW, 3, "SIRET : " . MAIN_INFO_SIRET, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, "SIRET : " . MAIN_INFO_SIRET, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("MAIN_INFO_APE")){
|
if (defined("MAIN_INFO_APE")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX2,$blSocY+13);
|
$pdf->SetXY($blSocX2,$blSocY+13);
|
||||||
$this->MultiCell($blSocW, 3, "APE : " . MAIN_INFO_APE, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, "APE : " . MAIN_INFO_APE, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (defined("MAIN_INFO_TVAINTRA")){
|
if (defined("MAIN_INFO_TVAINTRA")){
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->SetXY($blSocX2,$blSocY+16);
|
$pdf->SetXY($blSocX2,$blSocY+16);
|
||||||
$this->MultiCell($blSocW, 3, "ICOMM : " . MAIN_INFO_TVAINTRA, '' , 'L');
|
$pdf->MultiCell($blSocW, 3, "ICOMM : " . MAIN_INFO_TVAINTRA, '' , 'L');
|
||||||
}
|
}
|
||||||
|
|
||||||
//Date Expedition
|
//Date Expedition
|
||||||
$Yoff = $Yoff+7;
|
$Yoff = $Yoff+7;
|
||||||
$this->SetXY($blSocX,$blSocY+20);
|
$pdf->SetXY($blSocX,$blSocY+20);
|
||||||
$this->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->MultiCell(50, 8, "Date : " . strftime("%d %b %Y", $exp->date), '' , 'L');
|
$pdf->MultiCell(50, 8, "Date : " . strftime("%d %b %Y", $exp->date), '' , 'L');
|
||||||
//Date Expedition
|
//Date Expedition
|
||||||
$this->SetXY($blSocX2,$blSocY+20);
|
$pdf->SetXY($blSocX2,$blSocY+20);
|
||||||
$this->SetFont('Arial','B',8);
|
$pdf->SetFont('Arial','B',8);
|
||||||
$this->SetTextColor(0,0,0);
|
$pdf->SetTextColor(0,0,0);
|
||||||
$this->MultiCell(50, 8, "Livreur(s) : ".$this->livreur->fullname, '' , 'L');
|
$pdf->MultiCell(50, 8, "Livreur(s) : ".$livreur->fullname, '' , 'L');
|
||||||
/**********************************/
|
/**********************************/
|
||||||
//Emplacement Informations Expediteur (Client)
|
//Emplacement Informations Expediteur (Client)
|
||||||
/**********************************/
|
/**********************************/
|
||||||
@ -343,31 +347,31 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$Ydef = $Yoff;
|
$Ydef = $Yoff;
|
||||||
$blSocY = 1;
|
$blSocY = 1;
|
||||||
//Titre
|
//Titre
|
||||||
$this->SetXY($blExpX,$Yoff-3);
|
$pdf->SetXY($blExpX,$Yoff-3);
|
||||||
$this->SetFont('Arial','B',7);
|
$pdf->SetFont('Arial','B',7);
|
||||||
$this->MultiCell($blW,3, 'Expéditeur', 0, 'L');
|
$pdf->MultiCell($blW,3, 'Expéditeur', 0, 'L');
|
||||||
$this->Rect($blExpX, $Yoff, $blW, 20);
|
$pdf->Rect($blExpX, $Yoff, $blW, 20);
|
||||||
//Nom Client
|
//Nom Client
|
||||||
$this->SetXY($blExpX,$Yoff+$blSocY);
|
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||||
$this->SetFont('Arial','B',7);
|
$pdf->SetFont('Arial','B',7);
|
||||||
$this->MultiCell($blW,3, $this->expediteur->nom, 0, 'C');
|
$pdf->MultiCell($blW,3, $this->expediteur->nom, 0, 'C');
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$blSocY+=3;
|
$blSocY+=3;
|
||||||
//Adresse Client
|
//Adresse Client
|
||||||
//Gestion des Retours chariots
|
//Gestion des Retours chariots
|
||||||
$Out=split("\n",$this->expediteur->adresse);
|
$Out=split("\n",$this->expediteur->adresse);
|
||||||
for ($i=0;$i<count($Out);$i++) {
|
for ($i=0;$i<count($Out);$i++) {
|
||||||
$this->SetXY($blExpX,$Yoff+$blSocY);
|
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||||
$this->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
$pdf->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
||||||
$blSocY+=3;
|
$blSocY+=3;
|
||||||
}
|
}
|
||||||
$this->SetXY($blExpX,$Yoff+$blSocY);
|
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||||
$this->MultiCell($blW,5, $this->expediteur->cp . " " . $this->expediteur->ville, 0, 'L');
|
$pdf->MultiCell($blW,5, $this->expediteur->cp . " " . $this->expediteur->ville, 0, 'L');
|
||||||
$blSocY+=4;
|
$blSocY+=4;
|
||||||
//Tel Client
|
//Tel Client
|
||||||
$this->SetXY($blExpX,$Yoff+$blSocY);
|
$pdf->SetXY($blExpX,$Yoff+$blSocY);
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->MultiCell($blW,3, "Tel : ".$this->expediteur->tel, 0, 'L');
|
$pdf->MultiCell($blW,3, "Tel : ".$this->expediteur->tel, 0, 'L');
|
||||||
|
|
||||||
/**********************************/
|
/**********************************/
|
||||||
//Emplacement Informations Destinataire (Contact livraison)
|
//Emplacement Informations Destinataire (Contact livraison)
|
||||||
@ -377,31 +381,31 @@ Class pdf_expedition_merou extends ModelePdfExpedition
|
|||||||
$Yoff = $Ydef;
|
$Yoff = $Ydef;
|
||||||
$blSocY = 1;
|
$blSocY = 1;
|
||||||
//Titre
|
//Titre
|
||||||
$this->SetXY($blDestX,$Yoff-3);
|
$pdf->SetXY($blDestX,$Yoff-3);
|
||||||
$this->SetFont('Arial','B',7);
|
$pdf->SetFont('Arial','B',7);
|
||||||
$this->MultiCell($blW,3, 'Destinataire', 0, 'L');
|
$pdf->MultiCell($blW,3, 'Destinataire', 0, 'L');
|
||||||
$this->Rect($blDestX, $Yoff, $blW, 20);
|
$pdf->Rect($blDestX, $Yoff, $blW, 20);
|
||||||
//Nom Client
|
//Nom Client
|
||||||
$this->SetXY($blDestX,$Yoff+$blSocY);
|
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||||
$this->SetFont('Arial','B',7);
|
$pdf->SetFont('Arial','B',7);
|
||||||
$this->MultiCell($blW,3, $this->destinataire->fullname, 0, 'C');
|
$pdf->MultiCell($blW,3, $this->destinataire->fullname, 0, 'C');
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$blSocY+=3;
|
$blSocY+=3;
|
||||||
//Adresse Client
|
//Adresse Client
|
||||||
//Gestion des Retours chariots
|
//Gestion des Retours chariots
|
||||||
$Out=split("\n",$this->destinataire->address);
|
$Out=split("\n",$this->destinataire->address);
|
||||||
for ($i=0;$i<count($Out);$i++) {
|
for ($i=0;$i<count($Out);$i++) {
|
||||||
$this->SetXY($blDestX,$Yoff+$blSocY);
|
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||||
$this->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
$pdf->MultiCell($blW,5,urldecode($Out[$i]), 0, 'L');
|
||||||
$blSocY+=3;
|
$blSocY+=3;
|
||||||
}
|
}
|
||||||
$this->SetXY($blDestX,$Yoff+$blSocY);
|
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||||
$this->MultiCell($blW,5, $this->destinataire->cp . " " . $this->destinataire->ville, 0, 'L');
|
$pdf->MultiCell($blW,5, $this->destinataire->cp . " " . $this->destinataire->ville, 0, 'L');
|
||||||
$blSocY+=4;
|
$blSocY+=4;
|
||||||
//Tel Client
|
//Tel Client
|
||||||
$this->SetXY($blDestX,$Yoff+$blSocY);
|
$pdf->SetXY($blDestX,$Yoff+$blSocY);
|
||||||
$this->SetFont('Arial','',7);
|
$pdf->SetFont('Arial','',7);
|
||||||
$this->MultiCell($blW,3, "Tel : ".$this->destinataire->phone_pro, 0, 'L');
|
$pdf->MultiCell($blW,3, "Tel : ".$this->destinataire->phone_pro, 0, 'L');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user