diff --git a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php index f51a0e91bc4..b7866212b79 100644 --- a/htdocs/core/modules/commande/doc/pdf_einstein.modules.php +++ b/htdocs/core/modules/commande/doc/pdf_einstein.modules.php @@ -103,13 +103,16 @@ class pdf_einstein extends ModelePDFCommandes // Define position of columns $this->posxdesc=$this->marge_gauche+1; - $this->posxtva=111; + $this->posxtva=112; $this->posxup=126; $this->posxqty=145; $this->posxdiscount=162; $this->postotalht=174; + if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + $this->posxpicture=$this->posxtva - 16; // width of images if ($this->page_largeur < 210) // To work with US executive format { + $this->posxpicture-=20; $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; @@ -332,18 +335,18 @@ class pdf_einstein extends ModelePDFCommandes { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); + $pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R'); } // Unit price before discount $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); + $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); // Enough for 6 chars + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); // Enough for 6 chars // Discount on line if ($object->lines[$i]->remise_percent) diff --git a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php index 9435efde392..7c8f7307255 100755 --- a/htdocs/core/modules/facture/doc/pdf_crabe.modules.php +++ b/htdocs/core/modules/facture/doc/pdf_crabe.modules.php @@ -103,13 +103,16 @@ class pdf_crabe extends ModelePDFFactures // Define position of columns $this->posxdesc=$this->marge_gauche+1; - $this->posxtva=111; + $this->posxtva=112; $this->posxup=126; $this->posxqty=145; $this->posxdiscount=162; $this->postotalht=174; + if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + $this->posxpicture=$this->posxtva - 16; // width of images if ($this->page_largeur < 210) // To work with US executive format { + $this->posxpicture-=20; $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; @@ -335,18 +338,18 @@ class pdf_crabe extends ModelePDFFactures { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); + $pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R'); } // Unit price before discount $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); + $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); // Enough for 6 chars + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); // Enough for 6 chars // Discount on line if ($object->lines[$i]->remise_percent) diff --git a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php index ab353169727..2daef285bce 100644 --- a/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php +++ b/htdocs/core/modules/livraison/pdf/pdf_typhon.modules.php @@ -97,8 +97,8 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Define position of columns $this->posxdesc=$this->marge_gauche+1; - $this->posxcomm=111; - //$this->posxtva=111; + $this->posxcomm=112; + //$this->posxtva=112; //$this->posxup=126; $this->posxqty=174; //$this->posxdiscount=162; @@ -432,6 +432,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder // Pied de page $this->_pagefoot($pdf,$object,$outputlangs); + if (method_exists($pdf,'AliasNbPages')) $pdf->AliasNbPages(); // Check product remaining to be delivered @@ -635,13 +636,13 @@ class pdf_typhon extends ModelePDFDeliveryOrder pdf_watermark($pdf,$outputlangs,$this->page_hauteur,$this->page_largeur,'mm',$conf->global->COMMANDE_DRAFT_WATERMARK); } - $pdf->SetTextColor(0,0,60); - $pdf->SetFont('','B', $default_font_size + 3); - - $posy=$this->marge_haute; - $posx=$this->page_largeur-$this->marge_droite-100; - - $pdf->SetXY($this->marge_gauche,$posy); + $pdf->SetTextColor(0,0,60); + $pdf->SetFont('','B', $default_font_size + 3); + + $posy=$this->marge_haute; + $posx=$this->page_largeur-$this->marge_droite-100; + + $pdf->SetXY($this->marge_gauche,$posy); // Logo $logo=$conf->mycompany->dir_output.'/logos/'.$this->emetteur->logo; diff --git a/htdocs/core/modules/propale/doc/pdf_azur.modules.php b/htdocs/core/modules/propale/doc/pdf_azur.modules.php index 491665dddd8..e16a0da6a7c 100644 --- a/htdocs/core/modules/propale/doc/pdf_azur.modules.php +++ b/htdocs/core/modules/propale/doc/pdf_azur.modules.php @@ -102,14 +102,16 @@ class pdf_azur extends ModelePDFPropales // Define position of columns $this->posxdesc=$this->marge_gauche+1; - $this->posxpicture=95; - $this->posxtva=111; + $this->posxtva=112; $this->posxup=126; $this->posxqty=145; $this->posxdiscount=162; $this->postotalht=174; + if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + $this->posxpicture=$this->posxtva - 16; // width of images if ($this->page_largeur < 210) // To work with US executive format { + $this->posxpicture-=20; $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; @@ -273,8 +275,8 @@ class pdf_azur extends ModelePDFPropales $pdf->SetTextColor(0,0,0); // Define size of image if we need it - $imglinesize=array(); $realpath=''; - if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITH_PICTURE)) + $imglinesize=array(); $realpath=''; + if (! empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { if ($object->lines[$i]->fk_product) { @@ -329,7 +331,7 @@ class pdf_azur extends ModelePDFPropales $curX = $this->posxdesc-1; $pdf->startTransaction(); - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITH_PICTURE)) + if (empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc); } @@ -345,13 +347,13 @@ class pdf_azur extends ModelePDFPropales $pageposafter=$pageposbefore; //print $pageposafter.'-'.$pageposbefore;exit; $pdf->setPageOrientation('', 1, $heightforfooter); // The only function to edit the bottom margin of current page to set it. - if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITH_PICTURE)) - { - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc); - } - else - { - pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc); + if (empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) + { + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxtva-$curX,3,$curX,$curY,$hideref,$hidedesc); + } + else + { + pdf_writelinedesc($pdf,$object,$i,$outputlangs,$this->posxpicture-$curX,3,$curX,$curY,$hideref,$hidedesc); } $pageposafter=$pdf->getPage(); @@ -396,18 +398,18 @@ class pdf_azur extends ModelePDFPropales { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); + $pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R'); } // Unit price before discount $up_excl_tax = pdf_getlineupexcltax($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, $up_excl_tax, 0, 'R', 0); + $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, $up_excl_tax, 0, 'R', 0); // Quantity $qty = pdf_getlineqty($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $qty, 0, 'R'); // Enough for 6 chars + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $qty, 0, 'R'); // Enough for 6 chars // Discount on line if ($object->lines[$i]->remise_percent) @@ -1076,7 +1078,7 @@ class pdf_azur extends ModelePDFPropales $pdf->MultiCell(108,2, $outputlangs->transnoentities("Designation"),'','L'); } - if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITH_PICTURE)) + if (! empty($conf->global->MAIN_GENERATE_PROPOSALS_WITH_PICTURE)) { $pdf->line($this->posxpicture-1, $tab_top, $this->posxpicture-1, $tab_top + $tab_height); if (empty($hidetop)) diff --git a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php index 523354adb23..ccc3ed8c17b 100755 --- a/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php +++ b/htdocs/core/modules/supplier_invoice/pdf/pdf_canelle.modules.php @@ -99,13 +99,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices // Defini position des colonnes $this->posxdesc=$this->marge_gauche+1; - $this->posxtva=111; + $this->posxtva=112; $this->posxup=126; $this->posxqty=145; $this->posxdiscount=162; $this->postotalht=174; + //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + $this->posxpicture=$this->posxtva - 16; // width of images if ($this->page_largeur < 210) // To work with US executive format { + $this->posxpicture-=20; $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; @@ -296,16 +299,16 @@ class pdf_canelle extends ModelePDFSuppliersInvoices { $vat_rate = pdf_getlinevatrate($object, $i, $outputlangs, $hidedetails); $pdf->SetXY($this->posxtva, $curY); - $pdf->MultiCell($this->posxup-$this->posxtva-1, 3, $vat_rate, 0, 'R'); + $pdf->MultiCell($this->posxup-$this->posxtva-0.8, 3, $vat_rate, 0, 'R'); } // Unit price before discount $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0); + $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, price($object->lines[$i]->pu_ht), 0, 'R', 0); // Quantity $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $object->lines[$i]->qty, 0, 'R'); + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $object->lines[$i]->qty, 0, 'R'); // Discount on line $pdf->SetXY($this->posxdiscount, $curY); diff --git a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php index e120856d532..715f7cb678f 100644 --- a/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php +++ b/htdocs/core/modules/supplier_order/pdf/pdf_muscadet.modules.php @@ -104,13 +104,16 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Defini position des colonnes $this->posxdesc=$this->marge_gauche+1; - $this->posxtva=111; + $this->posxtva=112; $this->posxup=126; $this->posxqty=145; $this->posxdiscount=162; $this->postotalht=174; + //if (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) $this->posxtva=$this->posxup; + $this->posxpicture=$this->posxtva - 16; // width of images if ($this->page_largeur < 210) // To work with US executive format { + $this->posxpicture-=20; $this->posxtva-=20; $this->posxup-=20; $this->posxqty-=20; @@ -341,11 +344,11 @@ class pdf_muscadet extends ModelePDFSuppliersOrders // Unit price before discount $pdf->SetXY($this->posxup, $curY); - $pdf->MultiCell($this->posxqty-$this->posxup-1, 3, price($object->lines[$i]->subprice), 0, 'R', 0); + $pdf->MultiCell($this->posxqty-$this->posxup-0.8, 3, price($object->lines[$i]->subprice), 0, 'R', 0); // Quantity $pdf->SetXY($this->posxqty, $curY); - $pdf->MultiCell($this->posxdiscount-$this->posxqty-1, 3, $object->lines[$i]->qty, 0, 'R'); + $pdf->MultiCell($this->posxdiscount-$this->posxqty-0.8, 3, $object->lines[$i]->qty, 0, 'R'); // Discount on line $pdf->SetXY($this->posxdiscount, $curY);