Fix: Better compatibility of PDF with all languages

This commit is contained in:
Laurent Destailleur 2011-01-03 09:50:07 +00:00
parent e5eb018054
commit 6f43536432
7 changed files with 28 additions and 25 deletions

View File

@ -271,7 +271,7 @@ class pdf_edison extends ModelePDFCommandes
$tab2_top = 241;
$tab2_lh = 4;
$pdf->SetFont('','', $default_font_size + 1);
$pdf->SetFont('','', $default_font_size);
$pdf->SetXY (132, $tab2_top + 0);
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalHT"), 0, 'R', 0);
@ -467,23 +467,26 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY(30,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Designation"),0,'L');
$pdf->MultiCell(20,4,$outputlangs->transnoentities("Designation"),0,'L');
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
$pdf->SetXY(134,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("VAT"));
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
$pdf->SetXY(133,$tab_top + 2);
$pdf->MultiCell(12,4,$outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
$pdf->SetXY(147,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Qty"));
$pdf->SetXY(145,$tab_top + 2);
$pdf->MultiCell(12,4,$outputlangs->transnoentities("Qty"),'','C');
$pdf->line(156, $tab_top, 156, $tab_top + $tab_height);
$pdf->SetXY(160,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("PriceU"));
$pdf->SetXY(157,$tab_top + 2);
$pdf->MultiCell(16,4,$outputlangs->transnoentities("PriceUHT"),'','C');
$pdf->line(174, $tab_top, 174, $tab_top + $tab_height);
$pdf->SetXY(187,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Total"));
$pdf->SetXY(175,$tab_top + 2);
$pdf->MultiCell(30,4,$outputlangs->transnoentities("TotalHT"),'','C');
// $pdf->Rect(10, $tab_top, 190, $nexY - $tab_top);
$pdf->Rect(10, $tab_top, 190, $tab_height);

View File

@ -788,7 +788,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxup-1, $tab_top+1);
$pdf->MultiCell(18,2, $outputlangs->transnoentities("PriceUHT"),'','C');
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
@ -798,7 +798,7 @@ class pdf_einstein extends ModelePDFCommandes
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
$pdf->MultiCell(14,2, $outputlangs->transnoentities("ReductionShort"),'','C');
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
}
if ($this->atleastonediscount)
@ -806,7 +806,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
}
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
$pdf->MultiCell(28,2, $outputlangs->transnoentities("TotalHT"),'','C');
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
}

View File

@ -949,7 +949,7 @@ class pdf_crabe extends ModelePDFFactures
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
$pdf->MultiCell($this->postotalht-$this->posxdiscount,2, $outputlangs->transnoentities("ReductionShort"),'','C');
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
}
if ($this->atleastonediscount)
@ -957,7 +957,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
}
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
$pdf->MultiCell(26,2, $outputlangs->transnoentities("TotalHT"),'','C');
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
}

View File

@ -208,11 +208,11 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
$pdf->SetXY (145, $curY );
$pdf->MultiCell(10, 3, $object->lines[$i]->qty_shipped, 0, 'C');
// \TODO Field not yet saved in database
// TODO Field not yet saved in database
//$pdf->SetXY (156, $curY );
//$pdf->MultiCell(20, 3, price($object->lines[$i]->price), 0, 'R', 0);
// \TODO Field not yet saved in database
// TODO Field not yet saved in database
//$pdf->SetXY (174, $curY );
//$total = price($object->lines[$i]->price * $object->lines[$i]->qty_shipped);
//$pdf->MultiCell(26, 3, $total, 0, 'R', 0);

View File

@ -813,7 +813,7 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxup-1, $tab_top+1);
$pdf->MultiCell(20,2, $outputlangs->transnoentities("PriceUHT"),'','C');
$pdf->MultiCell($this->posxqty-$this->posxup-1,2, $outputlangs->transnoentities("PriceUHT"),'','C');
$pdf->line($this->posxqty-1, $tab_top, $this->posxqty-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxqty-1, $tab_top+1);
@ -823,7 +823,7 @@ class pdf_propale_azur extends ModelePDFPropales
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+1);
$pdf->MultiCell(14,2, $outputlangs->transnoentities("ReductionShort"),'','C');
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
}
if ($this->atleastonediscount)
@ -831,7 +831,7 @@ class pdf_propale_azur extends ModelePDFPropales
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
}
$pdf->SetXY ($this->postotalht-1, $tab_top+1);
$pdf->MultiCell(28,2, $outputlangs->transnoentities("TotalHT"),'','C');
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHT"),'','C');
}

View File

@ -530,7 +530,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2);
$pdf->MultiCell($this->postotalht-$this->posxdiscount,2, $outputlangs->transnoentities("ReductionShort"),'','C');
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
}
if ($this->atleastonediscount)
@ -538,7 +538,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
}
$pdf->SetXY ($this->postotalht-1, $tab_top+2);
$pdf->MultiCell(26,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
}

View File

@ -530,7 +530,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2);
$pdf->MultiCell($this->postotalht-$this->posxdiscount,2, $outputlangs->transnoentities("ReductionShort"),'','C');
$pdf->MultiCell($this->postotalht-$this->posxdiscount+1,2, $outputlangs->transnoentities("ReductionShort"),'','C');
}
if ($this->atleastonediscount)
@ -538,7 +538,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$pdf->line($this->postotalht, $tab_top, $this->postotalht, $tab_top + $tab_height);
}
$pdf->SetXY ($this->postotalht-1, $tab_top+2);
$pdf->MultiCell(26,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
$pdf->MultiCell(30,2, $outputlangs->transnoentities("TotalHTShort"),'','C');
}