Fix: Some fix in PDF position

This commit is contained in:
Laurent Destailleur
2010-12-31 10:29:44 +00:00
parent abf9a4a80a
commit fcc9d4094c
12 changed files with 49 additions and 27 deletions

View File

@@ -1480,7 +1480,14 @@ class CommandeFournisseur extends Commande
$line->desc=$langs->trans("Description")." ".$xnbp;
$line->qty=1;
$line->subprice=100;
$line->tva_tx=19.6;
$line->price=100;
$line->tva_tx=19.6;
$line->localtax1_tx=0;
$line->localtax2_tx=0;
$line->remise_percent=10;
$line->total_ht=90;
$line->total_ttc=107.64; // 90 * 1.196
$line->total_tva=17.64;
$line->ref_fourn='SUPPLIER_REF_'.$xnbp;
$prodid = rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];

View File

@@ -1043,7 +1043,13 @@ class FactureFournisseur extends Facture
$line->qty=1;
$line->subprice=100;
$line->price=100;
$line->tva_tx=19.6;
$line->tva_tx=19.6;
$line->localtax1_tx=0;
$line->localtax2_tx=0;
$line->remise_percent=10;
$line->total_ht=90;
$line->total_ttc=107.64; // 90 * 1.196
$line->total_tva=17.64;
$prodid = rand(1, $num_prods);
$line->fk_product=$prodids[$prodid];
$line->product_type=0;

View File

@@ -464,7 +464,7 @@ class pdf_edison extends ModelePDFCommandes
$langs->load("bills");
$default_font_size = pdf_getPDFFontSize($outputlangs);
$pdf->SetFont('','', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY(30,$tab_top + 2);
$pdf->MultiCell(0,4,$outputlangs->transnoentities("Designation"),0,'L');

View File

@@ -782,8 +782,8 @@ class pdf_einstein extends ModelePDFCommandes
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxtva-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);

View File

@@ -933,8 +933,8 @@ class pdf_crabe extends ModelePDFFactures
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxtva-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);

View File

@@ -734,19 +734,18 @@ class pdf_oursin extends ModelePDFFactures
$pdf->line( $this->marges['g'], $tab_top+8, 210-$this->marges['d'], $tab_top+8 );
$pdf->line( $this->marges['g'], $tab_top + $tab_height, 210-$this->marges['d'], $tab_top + $tab_height );
$pdf->SetFont('','B', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY($this->marges['g'],$tab_top + 1);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("Designation"), 0, 'L');
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
if ($this->franchise!=1)
{
$pdf->SetXY($this->marges['g']+120,$tab_top + 1);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("VAT"), 0, 'L');
}
$pdf->SetXY($this->marges['g']+120,$tab_top + 1);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("VAT"), 0, 'L');
}
$pdf->SetXY($this->marges['g']+135,$tab_top + 1);
$pdf->SetXY($this->marges['g']+135,$tab_top + 1);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("PriceUHT"), 0, 'L');
$pdf->SetXY($this->marges['g']+153,$tab_top + 1);
$pdf->MultiCell(0, 4, $outputlangs->transnoentities("Qty"), 0, 'L');

View File

@@ -313,7 +313,7 @@ class pdf_sirocco extends ModelePDFDeliveryOrder
function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs)
{
$default_font_size = pdf_getPDFFontSize($outputlangs);
$pdf->SetFont('','', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY(30, $tab_top+1);
$pdf->MultiCell(60, 2, $outputlangs->transnoentities("Designation"), 0, 'L');

View File

@@ -450,7 +450,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6);
$pdf->SetTextColor(0,0,0);
$pdf->SetFont('','', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY ($this->posxdesc-1, $tab_top+1);
$pdf->MultiCell(80,2, $outputlangs->transnoentities("Designation"),'','L');

View File

@@ -807,8 +807,8 @@ class pdf_propale_azur extends ModelePDFPropales
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxtva-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->SetXY ($this->posxtva-3, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);

View File

@@ -458,7 +458,7 @@ class pdf_propale_jaune extends ModelePDFPropales
$pdf->SetXY($this->page_largeur - $this->marge_droite - ($pdf->GetStringWidth($titre) + 3), $tab_top - 4);
$pdf->MultiCell(($pdf->GetStringWidth($titre) + 3), 2, $titre);
$pdf->SetFont('','', $default_font_size + 1);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY(10,$tab_top);
$pdf->MultiCell(20,10,$outputlangs->transnoentities("Ref"),0,'L',1);

View File

@@ -188,7 +188,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->SetMargins($this->marge_gauche, $this->marge_haute, $this->marge_droite); // Left, Top, Right
$pdf->SetAutoPageBreak(1,0);
// New page
// Positionne $this->atleastonediscount si on a au moins une remise
for ($i = 0 ; $i < $nblignes ; $i++)
{
if ($object->lines[$i]->remise_percent)
{
$this->atleastonediscount++;
}
}
// New page
$pdf->AddPage();
$pagenb++;
$this->_pagehead($pdf, $object, 1, $outputlangs);
@@ -496,7 +505,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
// line prend une position y en 3eme param
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6);
$pdf->SetFont('','', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
@@ -504,8 +513,8 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxtva-1, $tab_top+2);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->SetXY ($this->posxtva-3, $tab_top+2);
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
@@ -517,6 +526,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->MultiCell($this->posxdiscount-$this->posxqty-1,2, $outputlangs->transnoentities("Qty"),'','C');
$pdf->line($this->posxdiscount-1, $tab_top, $this->posxdiscount-1, $tab_top + $tab_height);
if ($this->atleastonediscount)
{
$pdf->SetXY ($this->posxdiscount-1, $tab_top+2);

View File

@@ -506,7 +506,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// line prend une position y en 3eme param
$pdf->line($this->marge_gauche, $tab_top+6, $this->page_largeur-$this->marge_droite, $tab_top+6);
$pdf->SetFont('','', $default_font_size);
$pdf->SetFont('','', $default_font_size - 1);
$pdf->SetXY ($this->posxdesc-1, $tab_top+2);
$pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L');
@@ -514,8 +514,8 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
$pdf->SetXY ($this->posxtva-1, $tab_top+2);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->SetXY ($this->posxtva-3, $tab_top+2);
$pdf->MultiCell($this->posxup-$this->posxtva+3,2, $outputlangs->transnoentities("VAT"),'','C');
}
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);