Fixed intervention online signature position (#30926)

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
William Mead
2024-09-13 03:11:10 +02:00
committed by GitHub
parent 72aec91064
commit 3922b855da

View File

@@ -520,17 +520,17 @@ if ($action == "importSignature") {
if (getDolGlobalString("FICHINTER_SIGNATURE_XFORIMGSTART")) {
$param['xforimgstart'] = getDolGlobalString("FICHINTER_SIGNATURE_XFORIMGSTART");
} else {
$param['xforimgstart'] = 111;
$param['xforimgstart'] = (empty($s['w']) ? 110 : $s['w'] / 2 - 2);
}
if (getDolGlobalString("FICHINTER_SIGNATURE_YFORIMGSTART")) {
$param['yforimgstart'] = getDolGlobalString("FICHINTER_SIGNATURE_YFORIMGSTART");
} else {
$param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 60);
$param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 38);
}
if (getDolGlobalString("FICHINTER_SIGNATURE_WFORIMG")) {
$param['wforimg'] = getDolGlobalString("FICHINTER_SIGNATURE_WFORIMG");
} else {
$param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 16);
$param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 20);
}
dolPrintSignatureImage($pdf, $langs, $param);
@@ -546,9 +546,9 @@ if ($action == "importSignature") {
// 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
$param['xforimgstart'] = 111;
$param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 60);
$param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 16);
$param['xforimgstart'] = (empty($s['w']) ? 110 : $s['w'] / 2 - 2);
$param['yforimgstart'] = (empty($s['h']) ? 250 : $s['h'] - 38);
$param['wforimg'] = $s['w'] - ($param['xforimgstart'] + 20);
dolPrintSignatureImage($pdf, $langs, $param);
}