This commit is contained in:
Rodolphe Quiedeville 2005-04-17 15:41:05 +00:00
parent eaef6a023f
commit 919e3d9b8e
3 changed files with 15 additions and 10 deletions

View File

@ -432,7 +432,9 @@ else
print '<br /><table class="border" width="50%">'; print '<br /><table class="border" width="50%">';
print "<tr $bc[$var]><td>".$langs->trans("Sending")." PDF</td>"; print "<tr $bc[$var]><td>".$langs->trans("Sending")." PDF</td>";
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=expedition&file='.urlencode(basename($file)).'">'.basename($file).'</a></td>'; $b = ereg_replace($conf->expedition->dir_output."/","",$file);
print '<td><a href="'.DOL_URL_ROOT . '/document.php?modulepart=expedition&file='.urlencode($b).'">'.basename($file).'</a></td>';
print '<td align="right">'.filesize($file). ' bytes</td>'; print '<td align="right">'.filesize($file). ' bytes</td>';
print '<td align="right">'.strftime("%e %B %Y %H:%M:%S",filemtime($file)).'</td></tr>'; print '<td align="right">'.strftime("%e %B %Y %H:%M:%S",filemtime($file)).'</td></tr>';
print "</table>"; print "</table>";

View File

@ -21,7 +21,7 @@
* *
* L'entete du pdf est définit dans pdf_expedition.class.php * 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/modele.dorade.php";
Class pdf_expedition_dorade Class pdf_expedition_dorade
{ {
@ -37,6 +37,8 @@ Class pdf_expedition_dorade
{ {
$this->expe = $objExpe; $this->expe = $objExpe;
$this->expe->fetch_commande();
$this->pdf = new pdf_expedition(); $this->pdf = new pdf_expedition();
$this->pdf->expe = &$this->expe; $this->pdf->expe = &$this->expe;
@ -52,17 +54,18 @@ Class pdf_expedition_dorade
/* /*
* *
*/ */
$this->pdf->SetTextColor(0,0,0); $this->pdf->SetTextColor(0,0,0);
$this->pdf->SetFont('Arial','', 14); $this->pdf->SetFont('Arial','', 16);
$this->expe->fetch_lignes(); $this->expe->fetch_lignes();
for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++) for ($i = 0 ; $i < sizeof($this->expe->lignes) ; $i++)
{ {
$a = $this->pdf->tableau_top + 14 + ($i * 7); $a = $this->pdf->tableau_top + 14 + ($i * 16);
$this->pdf->Text(8, $a, $this->expe->lignes[$i]->description); $this->pdf->i25(8, ($a - 2), "000000".$this->expe->lignes[$i]->product_id, 1, 8);
$this->pdf->Text(40, $a, $this->expe->lignes[$i]->description);
$this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande); $this->pdf->Text(170, $a, $this->expe->lignes[$i]->qty_commande);

View File

@ -26,16 +26,16 @@ require_once DOL_DOCUMENT_ROOT."/expedition/mods/pdf/pdf_expedition.class.php";
Class pdf_expedition_rouget Class pdf_expedition_rouget
{ {
Function pdf_expedition_rouget($db=0, &$objExpe) 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.";
$this->expe = $objExpe;
} }
Function generate($filename) Function generate(&$objExpe, $filename)
{ {
$this->expe = $objExpe;
$this->pdf = new pdf_expedition(); $this->pdf = new pdf_expedition();
$this->pdf->expe = &$this->expe; $this->pdf->expe = &$this->expe;