Fix: TCPDF compatibility

This commit is contained in:
Laurent Destailleur 2010-12-20 18:40:04 +00:00
parent 417441a6d6
commit 83ef770893
10 changed files with 55 additions and 56 deletions

View File

@ -265,19 +265,10 @@ class pdf_edison extends ModelePDFCommandes
// Affiche zone totaux
$tab2_top = 241;
$tab2_lh = 7;
$tab2_height = $tab2_lh * 4;
$tab2_lh = 4;
$pdf->SetFont('','', 11);
$pdf->Rect(132, $tab2_top, 68, $tab2_height);
$pdf->line(132, $tab2_top + $tab2_height - ($tab2_lh*3), 200, $tab2_top + $tab2_height - ($tab2_lh*3) );
$pdf->line(132, $tab2_top + $tab2_height - ($tab2_lh*2), 200, $tab2_top + $tab2_height - ($tab2_lh*2) );
$pdf->line(132, $tab2_top + $tab2_height - $tab2_lh, 200, $tab2_top + $tab2_height - $tab2_lh );
$pdf->line(174, $tab2_top, 174, $tab2_top + $tab2_height);
$pdf->SetXY (132, $tab2_top + 0);
$pdf->MultiCell(42, $tab2_lh, $langs->transnoentities("TotalHT"), 0, 'R', 0);
@ -469,19 +460,24 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetFont('','',11);
$pdf->Text(30,$tab_top + 5,$outputlangs->transnoentities("Designation"));
$pdf->SetXY(30,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Designation"),0,'L');
$pdf->line(132, $tab_top, 132, $tab_top + $tab_height);
$pdf->Text(134,$tab_top + 5,$outputlangs->transnoentities("VAT"));
$pdf->SetXY(134,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("VAT"));
$pdf->line(144, $tab_top, 144, $tab_top + $tab_height);
$pdf->Text(147,$tab_top + 5,$outputlangs->transnoentities("Qty"));
$pdf->SetXY(147,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Qty"));
$pdf->line(156, $tab_top, 156, $tab_top + $tab_height);
$pdf->Text(160,$tab_top + 5,$outputlangs->transnoentities("PriceU"));
$pdf->SetXY(160,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("PriceU"));
$pdf->line(174, $tab_top, 174, $tab_top + $tab_height);
$pdf->Text(187,$tab_top + 5,$outputlangs->transnoentities("Total"));
$pdf->SetXY(187,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Total"));
// $pdf->Rect(10, $tab_top, 190, $nexY - $tab_top);
$pdf->Rect(10, $tab_top, 190, $tab_height);
@ -593,8 +589,10 @@ class pdf_edison extends ModelePDFCommandes
$pdf->SetTextColor(200,0,0);
$pdf->SetFont('','B',12);
$pdf->Text(11, 88, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs));
$pdf->Text(11, 94, $outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->ref));
$pdf->SetXY(11, 88);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Date")." : " . dol_print_date($object->date,'day',false,$outputlangs), 0, 'L');
$pdf->SetXY(11, 94);
$pdf->MultiCell(100, 4, $outputlangs->transnoentities("Order")." ".$outputlangs->convToOutputCharset($object->ref), 0, 'L');
}
/**

View File

@ -566,8 +566,7 @@ class pdf_einstein extends ModelePDFCommandes
global $conf,$mysoc;
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', 9);
// Tableau total
@ -946,7 +945,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','',8);
$pdf->SetXY($posx+2,$posy-5);
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":");
$pdf->MultiCell(80,5, $outputlangs->transnoentities("BillTo").":",0,'L');
$pdf->rect($posx, $posy, 100, $hautcadre);
// Show recipient name

View File

@ -150,8 +150,9 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$pdf->SetTextColor(0,0,60);
$title=$outputlangs->transnoentities("SendingSheet");
$pdf->MultiCell(100, 4, $title, '' , 'R');
$posy+=1;
$pdf->SetFont('','B',12);
$pdf->SetFont('','',12);
$posy+=5;
$pdf->SetXY(100,$posy);
@ -192,13 +193,15 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$result=$newobject->fetch($val[$i]);
if ($result >= 0)
{
$Yoff = $Yoff+8;
$pdf->SetXY($Xoff,$Yoff);
$pdf->SetFont('','',8);
$text=$newobject->ref;
if ($newobject->ref_client) $text.=' ('.$newobject->ref_client.')';
$pdf->Text($posx, $Yoff, $outputlangs->transnoentities("RefOrder") ." : ".$outputlangs->transnoentities($text));
$pdf->Text($posx, $Yoff+4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->commande->date,"%d %b %Y",false,$outputlangs,true));
$Yoff = $Yoff+8;
$pdf->SetXY($this->page_largeur - $this->marge_droite - 60,$Yoff);
$pdf->MultiCell(60, 4, $outputlangs->transnoentities("RefOrder") ." : ".$outputlangs->transnoentities($text), 0, 'R');
$Yoff = $Yoff+4;
$pdf->SetXY($this->page_largeur - $this->marge_droite - 60,$Yoff);
$pdf->MultiCell(60, 4, $outputlangs->transnoentities("Date")." : ".dol_print_date($object->commande->date,"%d %b %Y",false,$outputlangs,true), 0, 'R');
}
}
}
@ -231,6 +234,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
$outputlangs->load("products");
$outputlangs->load("propal");
$outputlangs->load("deliveries");
$outputlangs->load("sendings");
if ($conf->expedition->dir_output)
{

View File

@ -696,8 +696,7 @@ class pdf_crabe extends ModelePDFFactures
$default_font_size = pdf_getPDFFontSize($outputlangs);
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', $default_font_size - 1);
// Tableau total

View File

@ -583,8 +583,7 @@ class pdf_oursin extends ModelePDFFactures
$langs->load("bills");
$tab2_top = $this->marges['h']+202;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', 9);
// Tableau total
@ -646,7 +645,7 @@ class pdf_oursin extends ModelePDFFactures
$index++;
$pdf->SetXY ($col1x, $tab2_top + $tab2_hl * $index);
$pdf->SetTextColor(22,137,210);
$pdf->SetFont('','B', 11);
$pdf->SetFont('','B', 10);
$pdf->MultiCell($col2x-$col1x, $tab2_hl, $outputlangs->transnoentities("TotalTTC"), 0, 'L', 0);
$pdf->SetXY ($col2x, $tab2_top + $tab2_hl * $index);
$pdf->MultiCell($largcol2, $tab2_hl, price($object->total_ttc), 0, 'R', 0);
@ -725,26 +724,37 @@ class pdf_oursin extends ModelePDFFactures
$pdf->SetFont('','B',10);
$pdf->Text($this->marges['g']+1,$tab_top + 5, $outputlangs->transnoentities("Designation"));
$pdf->SetXY($this->marges['g'],$tab_top + 2);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("Designation"), 0, 'L');
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
if ($this->franchise!=1) $pdf->Text($this->marges['g']+120, $tab_top + 5, $outputlangs->transnoentities("VAT"));
if ($this->franchise!=1)
{
$pdf->SetXY($this->marges['g']+120,$tab_top + 2);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("VAT"), 0, 'L');
}
}
$pdf->Text($this->marges['g']+135, $tab_top + 5,$outputlangs->transnoentities("PriceUHT"));
$pdf->Text($this->marges['g']+153, $tab_top + 5, $outputlangs->transnoentities("Qty"));
$pdf->SetXY($this->marges['g']+135,$tab_top + 2);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("PriceUHT"), 0, 'L');
$pdf->SetXY($this->marges['g']+153,$tab_top + 2);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("Qty"), 0, 'L');
$nblignes = sizeof($object->lines);
$rem=0;
for ($i = 0 ; $i < $nblignes ; $i++)
if ($object->lines[$i]->remise_percent)
{
$rem=1;
if ($object->lines[$i]->remise_percent)
{
$rem=1;
}
}
if ($rem==1)
{
$pdf->Text($this->marges['g']+163, $tab_top + 5,$outputlangs->transnoentities("Note"));
$pdf->SetXY($this->marges['g']+165,$tab_top + 2);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("%"), 0, 'L');
}
$pdf->Text($this->marges['g']+175, $tab_top + 5, $outputlangs->transnoentities("TotalHTShort"));
$pdf->SetXY($this->marges['g']+170,$tab_top + 2);
$pdf->MultiCell(20, 4, $outputlangs->transnoentities("TotalHTShort"), 0, 'R');
return $pdf->GetY();
}

View File

@ -245,8 +245,9 @@ class pdf_soleil extends ModelePDFFicheinter
$pdf->SetTextColor(0,0,100);
$pdf->SetFont('','B',14);
$pdf->Text(11, 94, $outputlangs->transnoentities("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref));
$pdf->SetFont('','B',12);
$pdf->SetXY(10,86);
$pdf->MultiCell(120, 4, $outputlangs->transnoentities("InterventionCard")." : ".$outputlangs->convToOutputCharset($fichinter->ref), 0, 'L');
$pdf->SetFillColor(220,220,220);
$pdf->SetTextColor(0,0,0);

View File

@ -574,8 +574,7 @@ class pdf_propale_azur extends ModelePDFPropales
global $conf,$mysoc;
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', 9);
// Tableau total

View File

@ -260,19 +260,10 @@ class pdf_propale_jaune extends ModelePDFPropales
$this->_tableau_info($pdf, $object, $bottomlasttab, $outputlangs);
$tab2_top = 254;
$tab2_lh = 7;
$tab2_height = $tab2_lh * 3;
$tab2_lh = 4;
$pdf->SetFont('','', 10);
$pdf->Rect(132, $tab2_top, 68, $tab2_height);
$pdf->line(132, $tab2_top + $tab2_height - ($tab2_lh*3), 200, $tab2_top + $tab2_height - ($tab2_lh*3) );
$pdf->line(132, $tab2_top + $tab2_height - ($tab2_lh*2), 200, $tab2_top + $tab2_height - ($tab2_lh*2) );
$pdf->line(132, $tab2_top + $tab2_height - $tab2_lh, 200, $tab2_top + $tab2_height - $tab2_lh );
$pdf->line(174, $tab2_top, 174, $tab2_top + $tab2_height);
$pdf->SetXY (132, $tab2_top + 0);
$pdf->MultiCell(42, $tab2_lh, $outputlangs->transnoentities("TotalHT"), 0, 'R', 0);

View File

@ -375,8 +375,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', 9);
$pdf->SetXY ($this->marge_gauche, $tab2_top + 0);

View File

@ -386,8 +386,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
function _tableau_tot(&$pdf, $object, $deja_regle, $posy, $outputlangs)
{
$tab2_top = $posy;
$tab2_hl = 5;
$tab2_height = $tab2_hl * 4;
$tab2_hl = 4;
$pdf->SetFont('','', 9);
$pdf->SetXY ($this->marge_gauche, $tab2_top + 0);