diff --git a/Societes/ebene/Tarifs/Controleur/Editioncarteassure.php b/Societes/ebene/Tarifs/Controleur/Editioncarteassure.php index 29638e98..e1158f31 100755 --- a/Societes/ebene/Tarifs/Controleur/Editioncarteassure.php +++ b/Societes/ebene/Tarifs/Controleur/Editioncarteassure.php @@ -92,6 +92,34 @@ $pdf->SetFont('Arial', 'B', 6); $pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1); /* kane 17/02/2026 à 06h => recherche meilleure place QR code*/ + +// ============ AJOUT DU QR CODE ============ +// Position : en bas à droite de la carte +// Position : en bas à gauche de la carte +if (file_exists($qrCodePath)) { + /* + $qrX = 60; // Position X (à droite) + $qrY = 43; // Position Y (en bas) + $qrSize = 10; // Taille du QR code (10mm) + */ + + $qrX = 5; // Position X (à droite) + $qrY = 38; // Position Y (en bas) + $qrSize = 20; // Taille du QR code (10mm) + + $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); + + /* + // Supprimer le fichier temporaire après utilisation + @unlink($qrCodePath); + */ + // Enregistrer le qrCodePath dans la BDD + // $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrCodePath); + $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrFile); +} +// ========================================== + + /* // Section "Assuré Principal" $pdf->SetFont('Arial', 'BUI', 7); @@ -135,25 +163,6 @@ if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) { $pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C'); } -// ============ AJOUT DU QR CODE ============ -// Position : en bas à droite de la carte -if (file_exists($qrCodePath)) { - $qrX = 60; // Position X (à droite) - $qrY = 43; // Position Y (en bas) - $qrSize = 10; // Taille du QR code (10mm) - - $pdf->Image($qrCodePath, $qrX, $qrY, $qrSize, $qrSize); - - /* - // Supprimer le fichier temporaire après utilisation - @unlink($qrCodePath); - */ - // Enregistrer le qrCodePath dans la BDD - // $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrCodePath); - $this->carte->enregistrerqrcodeath($assure['idBeneficiaire'], $qrFile); -} -// ========================================== - // Nom du souscripteur en bas $pdf->SetFont('Arial', 'B', 6); $pdf->SetXY(0, 49);