From 464619fbbb9c02f7110f31a96dad505c53d8fdd1 Mon Sep 17 00:00:00 2001 From: liedekef Date: Fri, 5 Jan 2007 12:40:45 +0000 Subject: [PATCH] Added reference to order number and added 2 forgotten lines --- .../mods/pdf/pdf_sirocco.modules.php | 10 +++++++++- .../livraison/mods/pdf/pdf_typhon.modules.php | 19 ++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/htdocs/livraison/mods/pdf/pdf_sirocco.modules.php b/htdocs/livraison/mods/pdf/pdf_sirocco.modules.php index 92f8929f2bf..df4532403dc 100644 --- a/htdocs/livraison/mods/pdf/pdf_sirocco.modules.php +++ b/htdocs/livraison/mods/pdf/pdf_sirocco.modules.php @@ -317,6 +317,8 @@ class pdf_sirocco extends ModelePDFDeliveryOrder } else { $client->fetch($delivery->socid); } + $delivery->client = $client; + $pdf->SetXY(102,42); $pdf->MultiCell(96,5, $delivery->client->nom); $pdf->SetFont('Arial','B',11); @@ -327,9 +329,15 @@ class pdf_sirocco extends ModelePDFDeliveryOrder $pdf->SetTextColor(200,0,0); $pdf->SetFont('Arial','B',12); - $pdf->Text(11, 88, $langs->transnoentities("Date")." : " . strftime("%d %b %Y", $delivery->date)); + $pdf->Text(11, 88, $langs->transnoentities("Date")." : " . dolibarr_print_date($delivery->date_valid,"%d %b %Y")); $pdf->Text(11, 94, $langs->transnoentities("DeliveryOrder")." ".$delivery->ref); + $pdf->SetFont('Arial','B',9); + $commande = new Commande ($this->db); + if ($commande->fetch($delivery->commande_id) >0) { + $pdf->Text(11, 98, $langs->transnoentities("RefOrder")." ".$commande->ref); + } + } diff --git a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php index 6632ed1f7fa..67f031727e2 100644 --- a/htdocs/livraison/mods/pdf/pdf_typhon.modules.php +++ b/htdocs/livraison/mods/pdf/pdf_typhon.modules.php @@ -670,11 +670,19 @@ class pdf_typhon extends ModelePDFDeliveryOrder $pdf->SetTextColor(0,0,60); $pdf->MultiCell(100, 4, $langs->transnoentities("DeliveryOrder")." ".$delivery->ref, '' , 'R'); $pdf->SetFont('Arial','',12); - - $posy+=6; - $pdf->SetXY(100,$posy); - $pdf->SetTextColor(0,0,60); - $pdf->MultiCell(100, 4, $langs->transnoentities("Date")." : " . dolibarr_print_date($delivery->date_valid,"%d %b %Y"), '', 'R'); + + $posy+=6; + $pdf->SetXY(100,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->MultiCell(100, 4, $langs->transnoentities("Date")." : " . dolibarr_print_date($delivery->date_valid,"%d %b %Y"), '', 'R'); + + $posy+=6; + $pdf->SetXY(100,$posy); + $pdf->SetTextColor(0,0,60); + $commande = new Commande ($this->db); + if ($commande->fetch($delivery->commande_id) >0) { + $pdf->MultiCell(100, 4, $langs->transnoentities("RefOrder")." : ".$commande->ref, '' , 'R'); + } if ($showadress) { @@ -735,6 +743,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder /* * if a delivery address is used, use that, else use the client address */ + $client = new Societe($this->db); if ($commande->adresse_livraison_id>0) { $client->fetch_adresse_livraison($commande->adresse_livraison_id); } else {