From bb6b3db0ac8016e47ee1a104e3b8d952349c8a91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 16 Sep 2017 00:49:00 +0200 Subject: [PATCH] FIX Position of signature on strato template Conflicts: htdocs/core/modules/contract/doc/pdf_strato.modules.php --- .../contract/doc/pdf_strato.modules.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/htdocs/core/modules/contract/doc/pdf_strato.modules.php b/htdocs/core/modules/contract/doc/pdf_strato.modules.php index c06882fa121..77904beac0b 100644 --- a/htdocs/core/modules/contract/doc/pdf_strato.modules.php +++ b/htdocs/core/modules/contract/doc/pdf_strato.modules.php @@ -463,17 +463,20 @@ class pdf_strato extends ModelePDFContract if (empty($hidebottom)) { - $pdf->SetXY(20,230); - $pdf->MultiCell(66,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0); + $posmiddle = $this->marge_gauche + round(($this->page_largeur - $this->marge_gauche - $this->marge_droite)/2); + $posy = $tab_top + $tab_height + 3 + 3; - $pdf->SetXY(20,235); - $pdf->MultiCell(80,25, '', 1); + $pdf->SetXY($this->marge_gauche, $posy); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->emetteur->name),0,'L',0); - $pdf->SetXY(110,230); - $pdf->MultiCell(80,5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0); + $pdf->SetXY($this->marge_gauche, $posy + 5); + $pdf->MultiCell($posmiddle - $this->marge_gauche - 5, 20, '', 1); - $pdf->SetXY(110,235); - $pdf->MultiCell(80,25, '', 1); + $pdf->SetXY($posmiddle + 5, $posy); + $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 5, $outputlangs->transnoentities("ContactNameAndSignature", $this->recipient->name),0,'L',0); + + $pdf->SetXY($posmiddle + 5, $posy + 5); + $pdf->MultiCell($this->page_largeur-$this->marge_droite - $posmiddle - 5, 20, '', 1); } }