FIX - Pos propal sign page number starting from the end (#30243)

* FIX - Pos propal sign page number starting from the end

* Update onlineSign.php

---------

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
Anthony Berton
2024-07-04 21:34:43 +02:00
committed by GitHub
parent 9585e97018
commit 7ca87d9874

View File

@@ -181,8 +181,12 @@ if ($action == "importSignature") {
$s = $pdf->getTemplatesize($tppl);
$pdf->AddPage($s['h'] > $s['w'] ? 'P' : 'L');
$pdf->useTemplate($tppl);
$propalsignonspecificpage = getDolGlobalInt("PROPAL_SIGNATURE_ON_SPECIFIC_PAGE");
if ($propalsignonspecificpage < 0) {
$propalsignonspecificpage = $pagecount - abs($propalsignonspecificpage);
}
if (getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES") || getDolGlobalInt("PROPAL_SIGNATURE_ON_SPECIFIC_PAGE") == $i) {
if (getDolGlobalString("PROPAL_SIGNATURE_ON_ALL_PAGES") || $propalsignonspecificpage == $i) {
// A signature image file is 720 x 180 (ratio 1/4) but we use only the size into PDF
// TODO Get position of box from PDF template