Merge branch 'main' of https://git.ebene.ovh/ebene/production
1585
Bootstrap_new/css/theme-modern.css
Normal file
125
Controleur/ControleurAjaxeditioncarteassure_2026_02_17_06h.php
Executable file
|
|
@ -0,0 +1,125 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleurrequete.php';
|
||||||
|
require_once 'Modele/Carteassure.php';
|
||||||
|
|
||||||
|
class ControleurAjaxeditioncarteassure extends Controleur
|
||||||
|
{
|
||||||
|
private $carte;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->carte = new Carteassure();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$idPolice = $this->requete->getParametreFormulaire("idPolice");
|
||||||
|
|
||||||
|
// 1. Récupération des assurés
|
||||||
|
$assures = $this->carte->getListeEditionCarteAssure($idPolice);
|
||||||
|
|
||||||
|
// Vérification des données avant création PDF
|
||||||
|
if (empty($assures)) {
|
||||||
|
echo '<div class="alert alert-warning">'._("Aucun assuré trouvé pour les critères sélectionnés").'</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoSocietePath = $_SESSION['dossierLogo'];
|
||||||
|
// $fondPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/fond_carte.png';
|
||||||
|
|
||||||
|
if (!file_exists($_SESSION['dossierLogo'])) {
|
||||||
|
echo '<div class="alert alert-warning">'._("Le logo de la société est introuvable").'</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 1. Inclure la bibliothèque phpqrcode
|
||||||
|
// Définir le dossier de log AVANT l'include
|
||||||
|
/*
|
||||||
|
if (!defined('QR_LOG_DIR')) {
|
||||||
|
define('QR_LOG_DIR', sys_get_temp_dir() . '/');
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
include 'phpqrcode/qrlib.php';
|
||||||
|
|
||||||
|
$pdf = new FPDF_Protection('L', 'mm', array(85.6, 54));
|
||||||
|
$pdf->SetAuthor('EBENE SOLUTIONS INFORMATIQUES');
|
||||||
|
|
||||||
|
$userPassword = $_SESSION['motPassPdf'];
|
||||||
|
$ownerPassword = null;
|
||||||
|
$pdf->SetProtection(['print'], $userPassword, $ownerPassword);
|
||||||
|
|
||||||
|
$pdf->SetAutoPageBreak(false);
|
||||||
|
$pdf->SetMargins(0, 0, 0);
|
||||||
|
$pdf->SetCreator(_('Système d\'édition de cartes'));
|
||||||
|
|
||||||
|
// Vérification avant d'ajouter des pages
|
||||||
|
$nombreAssures = count($assures);
|
||||||
|
if ($nombreAssures == 0) {
|
||||||
|
echo '<div class="alert alert-warning">'._("Aucune carte à générer").'</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Définition de la colonne d'alignement pour les deux-points
|
||||||
|
$colonneAlignement = 20; // Position X commune pour l'alignement des deux-points
|
||||||
|
|
||||||
|
// Traitement de chaque assuré
|
||||||
|
$cartesGenerees = 0;
|
||||||
|
foreach ($assures as $index => $assure) {
|
||||||
|
|
||||||
|
$idCarte = $assure['beneficiaire_carte_temp'];
|
||||||
|
|
||||||
|
// Vérification des données obligatoires
|
||||||
|
if (empty($assure['nomBeneficiaire']) || empty($assure['prenomsBeneficiaire']) || !isset($assure['tauxCouverture'])) {
|
||||||
|
// Empêcher la confirmation de cette carte
|
||||||
|
$this->carte->selectionnerUnAssure($idCarte, '0');
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Ajout d'une nouvelle page pour chaque carte
|
||||||
|
$pdf->AddPage();
|
||||||
|
$cartesGenerees++;
|
||||||
|
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
require $_SESSION['dossierSociete'] . '/Tarifs/Controleur/Editioncarteassure.php';
|
||||||
|
|
||||||
|
// Vérification du nombre de pages (limite de sécurité)
|
||||||
|
if ($pdf->PageNo() >= 100) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Vérification finale du nombre de pages générées
|
||||||
|
if ($cartesGenerees == 0) {
|
||||||
|
echo '<div class="alert alert-warning">'._("Aucune carte valide n'a pu être générée").'</div>';
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// création du fichier
|
||||||
|
$uniqid = uniqid();
|
||||||
|
$to_upload="Temp/TMP_CARTES_ASSURES_$uniqid.pdf";
|
||||||
|
$fichierTemp="Temp/$uniqid.pdf";
|
||||||
|
|
||||||
|
$pdf->Output($fichierTemp,"F");
|
||||||
|
|
||||||
|
// $fichier = pdf_to_image($fichierTemp, $to_upload, $uniqid, "0"); // => Pour cnvertir en image => eviter la cibversion en Word
|
||||||
|
$fichier = $fichierTemp;
|
||||||
|
|
||||||
|
// Lien de téléchargement
|
||||||
|
$t_html = '<div id="div_export_b" class="alert alert-info d-flex align-items-center justify-content-between flex-wrap">';
|
||||||
|
$t_html .= '<small class="me-3">' . sprintf(_("%d carte(s) générée(s) sur %d assuré(s)"), $cartesGenerees, $nombreAssures) . '</small>';
|
||||||
|
$t_html .= '<div class="d-flex gap-2 mt-2">';
|
||||||
|
// Bouton PRÉVISUALISER avec icône
|
||||||
|
$t_html .= '<a href="' . $fichier . '" target="_blank" class="btn btn-info btn-lg d-flex align-items-center">';
|
||||||
|
$t_html .= '<i class="fas fa-eye me-2"></i>' . _("PRÉVISUALISER");
|
||||||
|
$t_html .= '</a>';
|
||||||
|
|
||||||
|
|
||||||
|
// Bouton CONFIRMER avec icône
|
||||||
|
$t_html .= '<button type="button" class="btn btn-danger btn-lg d-flex align-items-center" onclick="javascript:confirmer_edition_carte();">';
|
||||||
|
$t_html .= '<i class="fas fa-check-circle me-2"></i>' . _("CONFIRMER");
|
||||||
|
$t_html .= '</button>';
|
||||||
|
$t_html .= '</div>';
|
||||||
|
$t_html .= '</div>';
|
||||||
|
echo $t_html;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
27
Controleur/ControleurAjaxmotifdepassement.php
Executable file
|
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleur.php';
|
||||||
|
require_once 'Modele/Societeuser.php';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class ControleurAjaxmotifdepassement extends Controleur {
|
||||||
|
private $menuvue;
|
||||||
|
private $societeuser;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
|
||||||
|
$this->societeuser = new Societeuser();
|
||||||
|
|
||||||
|
}
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$motifs = $this->societeuser->getMotifsDepassement();
|
||||||
|
|
||||||
|
$this->genererVueAjax(array(
|
||||||
|
'motifs' => $motifs
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
155
Controleur/ControleurAjaxprixacte_copy.php
Executable file
|
|
@ -0,0 +1,155 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleur.php';
|
||||||
|
require_once 'Modele/Detailtarifacte.php';
|
||||||
|
|
||||||
|
class ControleurAjaxprixacte extends Controleur {
|
||||||
|
private $acte;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->acte = new Detailtarifacte();
|
||||||
|
}
|
||||||
|
|
||||||
|
public function index() {
|
||||||
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
||||||
|
|
||||||
|
|
||||||
|
$tm = ($_SESSION['p_tm_TP']>"0") ? $_SESSION['p_tm_TP'] : $_SESSION['p_tm_C'];
|
||||||
|
|
||||||
|
$referencementpolice = $this->acte->getReferencementPolice($_SESSION['p_idPolice_C']);
|
||||||
|
|
||||||
|
$avecReferencement = $referencementpolice['avecReferencement'];
|
||||||
|
$tauxAvecReferencement = $referencementpolice['tauxAvecReferencement'];
|
||||||
|
$tauxSansReferencement = $referencementpolice['tauxSansReferencement'];
|
||||||
|
|
||||||
|
$dateFinDelaiCarenceActe = $this->acte->getDateFinDelaiCarenceActe($codeActe);
|
||||||
|
|
||||||
|
//var_dump($dateFinDelaiCarenceActe);
|
||||||
|
//die();
|
||||||
|
|
||||||
|
$situation = $this->acte->getSituationActeBeneficiaire($codeActe);
|
||||||
|
|
||||||
|
|
||||||
|
$plafondActe = $this->acte->getplafondacte($codeActe);
|
||||||
|
$prixActeTarifPolice = $this->acte->getprixactetarifpolice($codeActe);
|
||||||
|
$prixActeTarifPrestataire = $this->acte->getprixactetarifprestataire($codeActe);
|
||||||
|
$prixActeTarifCollege = $this->acte->getprixactetarifcollege($codeActe);
|
||||||
|
$prixActeTarifPolicePrestataire = $this->acte->getprixactetarifpoliceprestataire($codeActe);
|
||||||
|
|
||||||
|
if (($plafondActe > "0") && ($plafondActe !="9999999999")) {
|
||||||
|
if ($prixActeTarifPolicePrestataire > "0") {
|
||||||
|
$prixActe = min($plafondActe,$prixActeTarifPolicePrestataire);
|
||||||
|
}else{
|
||||||
|
if ($prixActeTarifPolice > "0") {
|
||||||
|
if ($prixActeTarifPrestataire > "0") {
|
||||||
|
$prixActe = min($plafondActe,$prixActeTarifPrestataire);
|
||||||
|
}else{
|
||||||
|
$prixActe = min($plafondActe,$prixActeTarifCollege);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if ($prixActeTarifPrestataire > "0") {
|
||||||
|
$prixActe = min($plafondActe,$prixActeTarifPrestataire);
|
||||||
|
}else{
|
||||||
|
if($prixActeTarifCollege > "0"){
|
||||||
|
$prixActe = min($plafondActe,$prixActeTarifCollege);
|
||||||
|
}else{
|
||||||
|
$prixActe = $plafondActe;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if ($prixActeTarifPolicePrestataire > "0") {
|
||||||
|
$prixActe = $prixActeTarifPolicePrestataire;
|
||||||
|
}else{
|
||||||
|
if ($prixActeTarifPolice > "0") {
|
||||||
|
if ($prixActeTarifPrestataire > "0") {
|
||||||
|
$prixActe = $prixActeTarifPrestataire;
|
||||||
|
}else{
|
||||||
|
$prixActe = $prixActeTarifCollege;
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
if ($prixActeTarifPrestataire > "0") {
|
||||||
|
$prixActe = $prixActeTarifPrestataire;
|
||||||
|
}else{
|
||||||
|
$prixActe = $prixActeTarifCollege;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if($prixActeTarifPolice > "0"){
|
||||||
|
$prixBase = $prixActeTarifPolice;
|
||||||
|
if($prixActeTarifCollege > "0" && $prixActeTarifPrestataire > "0"){
|
||||||
|
$depassement = min($prixActeTarifCollege,$prixActeTarifPrestataire)-$prixBase;
|
||||||
|
}else{
|
||||||
|
$depassement = $prixActe-$prixBase;
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['prixBase'] = $prixBase;
|
||||||
|
$_SESSION['depassement'] = $depassement;
|
||||||
|
}else{
|
||||||
|
$prixBase = $prixActe;
|
||||||
|
|
||||||
|
$depassement = 0;
|
||||||
|
$_SESSION['prixBase'] = 0;
|
||||||
|
$_SESSION['depassement'] = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//$montantTm = round(($prixBase*$tm)/100);
|
||||||
|
//$aRembourser = $prixBase-$montantTm;
|
||||||
|
|
||||||
|
//var_dump($dateFinDelaiCarenceActe);
|
||||||
|
//die();
|
||||||
|
|
||||||
|
if ($situation['soldeConsommation'] <= "0" || $dateFinDelaiCarenceActe!="1970-01-01")
|
||||||
|
{
|
||||||
|
if($prixBase > $situation['soldeConsommation'])
|
||||||
|
{
|
||||||
|
$montantTm = $prixBase-$situation['soldeConsommation'];
|
||||||
|
$aRembourser = $situation['soldeConsommation'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$montantTm = $prixBase;
|
||||||
|
$aRembourser = "0";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if($situation['nbreTransaction'] > "0")
|
||||||
|
{
|
||||||
|
if($situation['soldeNbreTransaction'] <= "0")
|
||||||
|
{
|
||||||
|
if($prixBase > $situation['soldeConsommation'])
|
||||||
|
{
|
||||||
|
$montantTm = $prixBase-$situation['soldeConsommation'];
|
||||||
|
$aRembourser = $situation['soldeConsommation'];
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$montantTm = $prixBase;
|
||||||
|
$aRembourser = "0";
|
||||||
|
}
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
$montantTm = round(($prixBase*$tm)/100);
|
||||||
|
$aRembourser = $prixBase-$montantTm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$montantTm = round(($prixBase*$tm)/100);
|
||||||
|
$aRembourser = $prixBase-$montantTm;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
$delaiCarenceActe = $this->acte->getdelaicarenceacte($codeActe) ;
|
||||||
|
|
||||||
|
$this->genererVueAjax(array('prixActe' => $prixActe, 'montantTm' => $montantTm, 'aRembourser' => $aRembourser,
|
||||||
|
'delaiCarenceActe' => $delaiCarenceActe, 'prixBase' => $prixBase, 'depassement' => $depassement, 'situation' => $situation,
|
||||||
|
'dateFinDelaiCarenceActe' => $dateFinDelaiCarenceActe));
|
||||||
|
}
|
||||||
|
}
|
||||||
25
Controleur/ControleurAjaxtextefacturationgarant.php
Executable file
|
|
@ -0,0 +1,25 @@
|
||||||
|
<?php
|
||||||
|
require_once 'Framework/Controleur.php';
|
||||||
|
require_once 'Modele/Societeuser.php';
|
||||||
|
|
||||||
|
|
||||||
|
class ControleurAjaxtextefacturationgarant extends Controleur {
|
||||||
|
private $menuvue;
|
||||||
|
private $societeuser;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
|
||||||
|
$this->societeuser = new Societeuser();
|
||||||
|
|
||||||
|
}
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
$textes = $this->societeuser->getTexteFacturationGarant();
|
||||||
|
|
||||||
|
$this->genererVueAjax(array(
|
||||||
|
'textes' => $textes
|
||||||
|
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5122,9 +5122,9 @@ function enregistrer_changement_etat_beneficiaire()
|
||||||
|
|
||||||
function pop_afficher_selection_retrait()
|
function pop_afficher_selection_retrait()
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
|
|
||||||
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: $("#racineWeb").val()+"Ajaxselectionretrait/",
|
url: $("#racineWeb").val()+"Ajaxselectionretrait/",
|
||||||
|
|
@ -5142,7 +5142,7 @@ function pop_afficher_selection_retrait()
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -5616,6 +5616,8 @@ function enregistrer_changement_limite()
|
||||||
function pop_afficher_selection_limite(p_id_college_temp)
|
function pop_afficher_selection_limite(p_id_college_temp)
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
donnees = 'id_college_temp='+p_id_college_temp;
|
donnees = 'id_college_temp='+p_id_college_temp;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
|
|
@ -5628,7 +5630,7 @@ function pop_afficher_selection_limite(p_id_college_temp)
|
||||||
div_selection_assure.html(data);
|
div_selection_assure.html(data);
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -55446,9 +55448,9 @@ function change_categorie_college_temp_lien_parente()
|
||||||
|
|
||||||
function pop_afficher_selection_changementcollege()
|
function pop_afficher_selection_changementcollege()
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
|
|
||||||
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// url: $("#racineWeb").val()+"Ajaxselectionretrait/",
|
// url: $("#racineWeb").val()+"Ajaxselectionretrait/",
|
||||||
|
|
@ -55468,7 +55470,7 @@ function pop_afficher_selection_changementcollege()
|
||||||
|
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -60608,11 +60610,9 @@ function recapituler_quittance_manuelle()
|
||||||
function pop_afficher_selection_quittance_manuelle()
|
function pop_afficher_selection_quittance_manuelle()
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
var div_patienter = $('#div_patienter');
|
var div_patienter = $('#div_patienter');
|
||||||
|
|
||||||
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
|
|
||||||
div_patienter.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_patienter.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
|
||||||
|
|
@ -60628,7 +60628,7 @@ function pop_afficher_selection_quittance_manuelle()
|
||||||
div_patienter.html('');
|
div_patienter.html('');
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -79396,8 +79396,8 @@ function validation_ancien_numero()
|
||||||
function pop_afficher_selection_suspension_assure()
|
function pop_afficher_selection_suspension_assure()
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
|
|
||||||
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: $("#racineWeb").val()+"Ajaxselectionsuspensionassure/",
|
url: $("#racineWeb").val()+"Ajaxselectionsuspensionassure/",
|
||||||
|
|
@ -79415,7 +79415,7 @@ function pop_afficher_selection_suspension_assure()
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -79505,9 +79505,9 @@ function enregistrer_suspension_assure()
|
||||||
|
|
||||||
function pop_afficher_selection_remiseenvigueur_assure()
|
function pop_afficher_selection_remiseenvigueur_assure()
|
||||||
{
|
{
|
||||||
var div_selection_assure = $('#div_selection_assure');
|
var div_selection_assure = $('#div_selection_assure');
|
||||||
|
|
||||||
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
div_selection_assure.html('<div style="padding-top:80px; text-align:center; font-size:14px; color: #0088cf; "><span><i class="fa fa-spinner fa-spin fa-5x" >' + '</span></div>');
|
||||||
|
$("#btn_pop").click();
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: $("#racineWeb").val()+"Ajaxselectionremiseenvigueurassure/",
|
url: $("#racineWeb").val()+"Ajaxselectionremiseenvigueurassure/",
|
||||||
|
|
@ -79525,7 +79525,7 @@ function pop_afficher_selection_remiseenvigueur_assure()
|
||||||
}, 500);
|
}, 500);
|
||||||
},
|
},
|
||||||
complete: function() {
|
complete: function() {
|
||||||
$("#btn_pop").click();
|
// $("#btn_pop").click();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
BIN
Societes/ebene/Photos/2175230_546947.bin
Executable file
BIN
Societes/ebene/Photos/2249016_191857.bin
Executable file
BIN
Societes/ebene/Photos/ESI6926000102_941709.bin
Executable file
BIN
Societes/ebene/Photos/ESI6933000101_262415.bin
Executable file
BIN
Societes/ebene/Photos/ESI6933000102_614174.bin
Executable file
BIN
Societes/ebene/Photos/ESI6933000102_832977.bin
Executable file
BIN
Societes/ebene/Photos/ESI6933000102_832977.jpg
Executable file
|
After Width: | Height: | Size: 13 KiB |
BIN
Societes/ebene/Photos/ESI6933000103_28793.bin
Executable file
BIN
Societes/ebene/Photos/ESI6933000103_28793.jpg
Executable file
|
After Width: | Height: | Size: 12 KiB |
BIN
Societes/ebene/Photos/ESI6939000501_744100.bin
Normal file
BIN
Societes/ebene/Photos/ESI6939000502_178723.bin
Normal file
BIN
Societes/ebene/Photos/ESI6939000503_684446.bin
Normal file
BIN
Societes/ebene/Photos/ESI6940000101_243239.bin
Normal file
BIN
Societes/ebene/Photos/ESI6941000101_683864.bin
Normal file
BIN
Societes/ebene/Photos/ESI6941000201_180639.bin
Normal file
BIN
Societes/ebene/Photos/ESI6941000301_810980.bin
Normal file
141
Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_16.php
Executable file
|
|
@ -0,0 +1,141 @@
|
||||||
|
<?php
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
// Fond blanc
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
|
||||||
|
$pdf->Rect(0, 0, 85.6, 54, 'F');
|
||||||
|
|
||||||
|
// LOGO SOCIÉTÉ en haut à gauche
|
||||||
|
if (file_exists($logoSocietePath)) {
|
||||||
|
$pdf->Image($logoSocietePath, 3, 3, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : '';
|
||||||
|
|
||||||
|
if (!is_file($logoGarantPath)) {
|
||||||
|
$logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (is_file($logoGarantPath)) {
|
||||||
|
$pdf->Image($logoGarantPath, 67, 1, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// EN-TÊTE : "CARTE D'ASSURANCE"
|
||||||
|
$pdf->SetFont('Arial', 'B', 8);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->SetXY(0, 5);
|
||||||
|
// $pdf->Cell(85.6, 4, utf8_decode(_('CARTE SANTÉ')), 0, 1, 'C');
|
||||||
|
$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Informations de contact de la société
|
||||||
|
$pdf->SetFont('Arial', '', 5);
|
||||||
|
$pdf->SetXY(0, 9);
|
||||||
|
|
||||||
|
$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C');
|
||||||
|
|
||||||
|
$pdf->SetXY(0, 12);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
|
||||||
|
// Ligne séparatrice
|
||||||
|
$pdf->Line(5, 15, 80, 15);
|
||||||
|
|
||||||
|
// Section "Bénéficiaire"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 17);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Matricule - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 21);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 24);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Prénoms
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 27);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Né(e) le - si disponible
|
||||||
|
if (!empty($assure['dateNaissance'])) {
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 30);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 33);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Section "Assuré Principal"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 38);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Numéro assuré - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 42);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroAdherent'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom et Prénoms assuré
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 45);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(15, 3, ' : '.substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1);
|
||||||
|
|
||||||
|
// Photo de l'assuré (positionnée à droite) - taille réduite
|
||||||
|
// $photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto'];
|
||||||
|
$photo=$assure['lienPhoto'];
|
||||||
|
$faceRegistered=$assure['faceRegistered'];
|
||||||
|
|
||||||
|
$photoPath = $_SESSION['lienPhotoFace'].$assure['lienPhoto'];
|
||||||
|
$photoX = 57;
|
||||||
|
$photoY = 17;
|
||||||
|
|
||||||
|
if($faceRegistered=="1" && file_exists($photoPath))
|
||||||
|
{
|
||||||
|
$data = decryptImage($photoPath);
|
||||||
|
$data = base64_decode($data);
|
||||||
|
$temp = $_SESSION['lienPhotoFace'].'tmp_'.uniqid().'.jpg';
|
||||||
|
file_put_contents($temp, $data);
|
||||||
|
$pdf->Image($temp, $photoX, $photoY, 25, 25); // Réduction de 30x30 à 25x25
|
||||||
|
unlink($temp);
|
||||||
|
} else {
|
||||||
|
// Cadre pour la photo si non disponible
|
||||||
|
$pdf->Rect($photoX, $photoY, 25, 25);
|
||||||
|
$pdf->SetFont('Arial', '', 4);
|
||||||
|
$pdf->SetXY($photoX, $photoY + 12);
|
||||||
|
// $messagePhotoManquant=_('Photo non disponible');
|
||||||
|
$messagePhotoManquant="X";
|
||||||
|
$pdf->Cell(25, 3, mb_convert_encoding($messagePhotoManquant, "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nom du souscripteur en bas
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetXY(0, 49);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
158
Societes/ebene/Tarifs/Controleur/Editioncarteassure_2026_02_17_06h.php
Executable file
|
|
@ -0,0 +1,158 @@
|
||||||
|
<?php
|
||||||
|
$qrData = $assure['tagCarteQr'];
|
||||||
|
|
||||||
|
$qrFile = $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
// $qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
$qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $qrFile;
|
||||||
|
|
||||||
|
QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_H, 4, 2); // recommandé pour cartes PVC
|
||||||
|
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
// Fond blanc
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect(0, 0, 85.6, 54, 'F');
|
||||||
|
|
||||||
|
// LOGO SOCIÉTÉ en haut à gauche
|
||||||
|
if (file_exists($logoSocietePath)) {
|
||||||
|
$pdf->Image($logoSocietePath, 3, 3, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
|
||||||
|
if (!is_file($logoGarantPath)) {
|
||||||
|
$logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOGO GARANT en haut à droite
|
||||||
|
if (is_file($logoGarantPath)) {
|
||||||
|
$pdf->Image($logoGarantPath, 67, 1, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// EN-TÊTE : "CARTE D'ASSURANCE"
|
||||||
|
$pdf->SetFont('Arial', 'B', 8);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->SetXY(0, 5);
|
||||||
|
$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Informations de contact de la société
|
||||||
|
$pdf->SetFont('Arial', '', 5);
|
||||||
|
$pdf->SetXY(0, 9);
|
||||||
|
$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C');
|
||||||
|
|
||||||
|
$pdf->SetXY(0, 12);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
|
||||||
|
// Ligne séparatrice
|
||||||
|
$pdf->Line(5, 15, 80, 15);
|
||||||
|
|
||||||
|
// Section "Bénéficiaire"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 17);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Matricule - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 21);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 24);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Prénoms
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 27);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Né(e) le - si disponible
|
||||||
|
if (!empty($assure['dateNaissance'])) {
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 30);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 33);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Section "Assuré Principal"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 38);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Numéro assuré - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 42);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroAdherent'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom et Prénoms assuré
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 45);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(15, 3, ' : '.substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1);
|
||||||
|
|
||||||
|
// Photo de l'assuré (positionnée à droite) - taille réduite
|
||||||
|
$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto'];
|
||||||
|
$photoX = 57;
|
||||||
|
$photoY = 17;
|
||||||
|
|
||||||
|
// Vérifier si l'URL est accessible
|
||||||
|
$headers = @get_headers($photoPath);
|
||||||
|
|
||||||
|
if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) {
|
||||||
|
$pdf->Image($photoPath, $photoX, $photoY, 25, 25);
|
||||||
|
} else {
|
||||||
|
// Cadre pour la photo si non disponible
|
||||||
|
$pdf->Rect($photoX, $photoY, 25, 25);
|
||||||
|
$pdf->SetFont('Arial', '', 4);
|
||||||
|
$pdf->SetXY($photoX, $photoY + 12);
|
||||||
|
$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);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
?>
|
||||||
162
Societes/ebene/Tarifs/Controleur/Editioncarteassure_claude.php
Executable file
|
|
@ -0,0 +1,162 @@
|
||||||
|
<?php
|
||||||
|
// À ajouter en haut de votre fichier, avant la génération du PDF
|
||||||
|
|
||||||
|
// 1. Inclure la bibliothèque phpqrcode
|
||||||
|
include 'phpqrcode/qrlib.php';
|
||||||
|
|
||||||
|
// 2. Préparer les données pour le QR code
|
||||||
|
$qrData = "SVMx|" . base64_encode($assure['numeroBeneficiaire']) . "|" .
|
||||||
|
base64_encode($assure['numeroAdherent']) . "|" .
|
||||||
|
$assure['uuid']; // ou un identifiant unique
|
||||||
|
|
||||||
|
// 3. Générer le QR code temporaire
|
||||||
|
$qrCodePath = sys_get_temp_dir() . '/qrcode_' . $assure['numeroBeneficiaire'] . '.png';
|
||||||
|
// QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_M, 4, 2);
|
||||||
|
QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_H, 4, 2); // recommandé pour cartes PVC
|
||||||
|
|
||||||
|
// ... Votre code existant pour le PDF ...
|
||||||
|
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
// Fond blanc
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect(0, 0, 85.6, 54, 'F');
|
||||||
|
|
||||||
|
// LOGO SOCIÉTÉ en haut à gauche
|
||||||
|
if (file_exists($logoSocietePath)) {
|
||||||
|
$pdf->Image($logoSocietePath, 3, 3, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
|
||||||
|
if (!is_file($logoGarantPath)) {
|
||||||
|
$logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOGO GARANT en haut à droite
|
||||||
|
if (is_file($logoGarantPath)) {
|
||||||
|
$pdf->Image($logoGarantPath, 67, 1, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// EN-TÊTE : "CARTE D'ASSURANCE"
|
||||||
|
$pdf->SetFont('Arial', 'B', 8);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->SetXY(0, 5);
|
||||||
|
$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Informations de contact de la société
|
||||||
|
$pdf->SetFont('Arial', '', 5);
|
||||||
|
$pdf->SetXY(0, 9);
|
||||||
|
$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C');
|
||||||
|
|
||||||
|
$pdf->SetXY(0, 12);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
|
||||||
|
// Ligne séparatrice
|
||||||
|
$pdf->Line(5, 15, 80, 15);
|
||||||
|
|
||||||
|
// Section "Bénéficiaire"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 17);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Matricule - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 21);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 24);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Prénoms
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 27);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Né(e) le - si disponible
|
||||||
|
if (!empty($assure['dateNaissance'])) {
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 30);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 33);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(28, 3, ' : '.substr(mb_convert_encoding($assure['lienparente'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Section "Assuré Principal"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
$pdf->SetXY(5, 38);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Numéro assuré - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 42);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroAdherent'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom et Prénoms assuré
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 45);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(15, 3, ' : '.substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1);
|
||||||
|
|
||||||
|
// Photo de l'assuré (positionnée à droite) - taille réduite
|
||||||
|
$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto'];
|
||||||
|
$photoX = 57;
|
||||||
|
$photoY = 17;
|
||||||
|
|
||||||
|
// Vérifier si l'URL est accessible
|
||||||
|
$headers = @get_headers($photoPath);
|
||||||
|
|
||||||
|
if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) {
|
||||||
|
$pdf->Image($photoPath, $photoX, $photoY, 25, 25);
|
||||||
|
} else {
|
||||||
|
// Cadre pour la photo si non disponible
|
||||||
|
$pdf->Rect($photoX, $photoY, 25, 25);
|
||||||
|
$pdf->SetFont('Arial', '', 4);
|
||||||
|
$pdf->SetXY($photoX, $photoY + 12);
|
||||||
|
$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);
|
||||||
|
}
|
||||||
|
// ==========================================
|
||||||
|
|
||||||
|
// Nom du souscripteur en bas
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetXY(0, 49);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
?>
|
||||||
168
Societes/ebene/Tarifs/Controleur/Editioncarteassure_erreur_adiafi.php
Executable file
|
|
@ -0,0 +1,168 @@
|
||||||
|
<?php
|
||||||
|
$qrData = $assure['tagCarteQr'];
|
||||||
|
|
||||||
|
$qrFile = $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
// $qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
$qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $qrFile;
|
||||||
|
|
||||||
|
QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_H, 4, 2); // recommandé pour cartes PVC
|
||||||
|
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
// Fond blanc
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect(0, 0, 85.6, 54, 'F');
|
||||||
|
|
||||||
|
// LOGO SOCIÉTÉ en haut à gauche
|
||||||
|
if (file_exists($logoSocietePath)) {
|
||||||
|
$pdf->Image($logoSocietePath, 3, 3, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
|
||||||
|
if (!is_file($logoGarantPath)) {
|
||||||
|
$logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOGO GARANT en haut à droite
|
||||||
|
if (is_file($logoGarantPath)) {
|
||||||
|
$pdf->Image($logoGarantPath, 67, 1, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// EN-TÊTE : "CARTE D'ASSURANCE"
|
||||||
|
$pdf->SetFont('Arial', 'B', 8);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->SetXY(0, 5);
|
||||||
|
$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Informations de contact de la société
|
||||||
|
$pdf->SetFont('Arial', '', 5);
|
||||||
|
$pdf->SetXY(0, 9);
|
||||||
|
$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C');
|
||||||
|
|
||||||
|
$pdf->SetXY(0, 12);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
|
||||||
|
// Ligne séparatrice
|
||||||
|
$pdf->Line(5, 15, 80, 15);
|
||||||
|
|
||||||
|
// Section "Bénéficiaire"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
//$pdf->SetXY(5, 17);
|
||||||
|
$pdf->SetXY(13, 16);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Matricule - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
// $pdf->SetXY(5, 21);
|
||||||
|
$pdf->SetXY(5, 19);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 22);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Prénoms
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 25);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Né(e) le - si disponible
|
||||||
|
if (!empty($assure['dateNaissance'])) {
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 28);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 31);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$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 = 34; // Position Y (en bas)
|
||||||
|
$qrSize = 18; // 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);
|
||||||
|
$pdf->SetXY(28, 37);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Numéro assuré - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(25, 41);
|
||||||
|
$pdf->Cell(10, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(0, 3, ' : '.$assure['numeroAdherent'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom et Prénoms assuré
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(25, 44);
|
||||||
|
// $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(0, 3, substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1);
|
||||||
|
|
||||||
|
// Photo de l'assuré (positionnée à droite) - taille réduite
|
||||||
|
$photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto'];
|
||||||
|
$photoX = 57;
|
||||||
|
$photoY = 17;
|
||||||
|
|
||||||
|
// Vérifier si l'URL est accessible
|
||||||
|
$headers = @get_headers($photoPath);
|
||||||
|
|
||||||
|
if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) {
|
||||||
|
$pdf->Image($photoPath, $photoX, $photoY, 25, 25);
|
||||||
|
} else {
|
||||||
|
// Cadre pour la photo si non disponible
|
||||||
|
$pdf->Rect($photoX, $photoY, 25, 25);
|
||||||
|
$pdf->SetFont('Arial', '', 4);
|
||||||
|
$pdf->SetXY($photoX, $photoY + 12);
|
||||||
|
$pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nom du souscripteur en bas
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetXY(0, 49);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
?>
|
||||||
180
Societes/ebene/Tarifs/Controleur/Editioncarteassure_new_bon.php
Executable file
|
|
@ -0,0 +1,180 @@
|
||||||
|
<?php
|
||||||
|
$qrData = $assure['tagCarteQr'];
|
||||||
|
|
||||||
|
$qrFile = $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
// $qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $assure['numeroBeneficiaire'] . '_' . time() . '.png';
|
||||||
|
$qrCodePath = $_SESSION['dossierSociete'].'/qrcodes/' . $qrFile;
|
||||||
|
|
||||||
|
QRcode::png($qrData, $qrCodePath, QR_ECLEVEL_H, 4, 2); // recommandé pour cartes PVC
|
||||||
|
|
||||||
|
// kane 23/09/2025 => rendre la carte personalisable par societeuser
|
||||||
|
// Fond blanc
|
||||||
|
$pdf->SetFillColor(255, 255, 255);
|
||||||
|
$pdf->Rect(0, 0, 85.6, 54, 'F');
|
||||||
|
|
||||||
|
// LOGO SOCIÉTÉ en haut à gauche
|
||||||
|
if (file_exists($logoSocietePath)) {
|
||||||
|
$pdf->Image($logoSocietePath, 3, 3, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
$logoGarantPath = (!is_null($assure["logo_garant"])) ? $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/'.$assure["logo_garant"] : $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
|
||||||
|
if (!is_file($logoGarantPath)) {
|
||||||
|
$logoGarantPath = $_SESSION['dossierSociete'] . '/Tarifs/Img/garants/logo_garant.png';
|
||||||
|
}
|
||||||
|
|
||||||
|
// LOGO GARANT en haut à droite
|
||||||
|
if (is_file($logoGarantPath)) {
|
||||||
|
$pdf->Image($logoGarantPath, 67, 1, 15);
|
||||||
|
}
|
||||||
|
|
||||||
|
// EN-TÊTE : "CARTE D'ASSURANCE"
|
||||||
|
$pdf->SetFont('Arial', 'B', 8);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->SetXY(0, 5);
|
||||||
|
$pdf->Cell(85.6, 4, mb_convert_encoding(_('CARTE SANTÉ'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Informations de contact de la société
|
||||||
|
$pdf->SetFont('Arial', '', 5);
|
||||||
|
$pdf->SetXY(0, 9);
|
||||||
|
$pdf->MultiCell(85.6, 3, mb_convert_encoding(_('Siège social').': '. $assure['adresseGeoSociete'].' ', "ISO-8859-1", "UTF-8"), 0, 'C');
|
||||||
|
|
||||||
|
$pdf->SetXY(0, 12);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding(_('Tél.').': '.$assure['telephoneSociete'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
|
||||||
|
// Ligne séparatrice
|
||||||
|
$pdf->Line(5, 15, 80, 15);
|
||||||
|
|
||||||
|
// Section "Bénéficiaire"
|
||||||
|
$pdf->SetFont('Arial', 'BUI', 7);
|
||||||
|
//$pdf->SetXY(5, 17);
|
||||||
|
$pdf->SetXY(13, 16);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Bénéficiaire'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Matricule - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
// $pdf->SetXY(5, 21);
|
||||||
|
$pdf->SetXY(5, 19);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(25, 3, ' : '.$assure['numeroBeneficiaire'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 22);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(30, 3, ' : '.substr(mb_convert_encoding($assure['nomBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Prénoms
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 25);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.substr(mb_convert_encoding($assure['prenomsBeneficiaire'], "ISO-8859-1", "UTF-8"), 0, 20), 0, 1);
|
||||||
|
|
||||||
|
// Né(e) le - si disponible
|
||||||
|
if (!empty($assure['dateNaissance'])) {
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 28);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Né(e) le'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(25, 3, ' : '.dateLang($assure['dateNaissance'], $_SESSION['lang']), 0, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(5, 31);
|
||||||
|
$pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Statut'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$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 = 34; // Position Y (en bas)
|
||||||
|
$qrSize = 18; // 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);
|
||||||
|
$pdf->SetXY(28, 37);
|
||||||
|
$pdf->SetTextColor(33, 46, 83);
|
||||||
|
$pdf->Cell(30, 4, mb_convert_encoding(_('Assuré Principal'), "ISO-8859-1", "UTF-8"), 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Numéro assuré - en gras et rouge
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(25, 41);
|
||||||
|
$pdf->Cell(10, 3, mb_convert_encoding(_('Matricule'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetTextColor(255, 0, 0);
|
||||||
|
$pdf->Cell(0, 3, ' : '.$assure['numeroAdherent'], 0, 1);
|
||||||
|
$pdf->SetTextColor(0);
|
||||||
|
|
||||||
|
// Nom et Prénoms assuré
|
||||||
|
$pdf->SetFont('Arial', '', 6);
|
||||||
|
$pdf->SetXY(25, 44);
|
||||||
|
// $pdf->Cell($colonneAlignement - 5, 3, mb_convert_encoding(_('Nom & prénoms'), "ISO-8859-1", "UTF-8"), 0, 0);
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->Cell(0, 3, substr(mb_convert_encoding($assure['adherent'], "ISO-8859-1", "UTF-8"), 0, 15), 0, 1);
|
||||||
|
|
||||||
|
// Photo de l'assuré (positionnée à droite) - taille réduite
|
||||||
|
// $photoPath = $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Photos/'.$assure['lienPhoto'];
|
||||||
|
$photo=$assure['lienPhoto'];
|
||||||
|
$faceRegistered=$assure['faceRegistered'];
|
||||||
|
|
||||||
|
$photoPath = $_SESSION['lienPhotoFace'].$assure['lienPhoto'];
|
||||||
|
$photoX = 57;
|
||||||
|
$photoY = 17;
|
||||||
|
|
||||||
|
// Vérifier si l'URL est accessible
|
||||||
|
$headers = @get_headers($photoPath);
|
||||||
|
|
||||||
|
//if($faceRegistered=="1" && file_exists($photoPath))
|
||||||
|
// if (!empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) {
|
||||||
|
if ($faceRegistered=="1" && !empty($assure['lienPhoto']) && $headers && strpos($headers[0], '200')) {
|
||||||
|
$data = decryptImage($photoPath);
|
||||||
|
$data = base64_decode($data);
|
||||||
|
$temp = $_SESSION['lienPhotoFace'].'tmp_'.uniqid().'.jpg';
|
||||||
|
file_put_contents($temp, $data);
|
||||||
|
// $pdf->Image($photoPath, $photoX, $photoY, 25, 25);
|
||||||
|
$pdf->Image($temp, $photoX, $photoY, 25, 25); // Réduction de 30x30 à 25x25
|
||||||
|
unlink($temp);
|
||||||
|
} else {
|
||||||
|
// Cadre pour la photo si non disponible
|
||||||
|
$pdf->Rect($photoX, $photoY, 25, 25);
|
||||||
|
$pdf->SetFont('Arial', '', 4);
|
||||||
|
$pdf->SetXY($photoX, $photoY + 12);
|
||||||
|
$pdf->Cell(25, 3, mb_convert_encoding(_('Photo non disponible'), "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Nom du souscripteur en bas
|
||||||
|
$pdf->SetFont('Arial', 'B', 6);
|
||||||
|
$pdf->SetXY(0, 49);
|
||||||
|
$pdf->Cell(85.6, 3, mb_convert_encoding($assure['souscripteur'], "ISO-8859-1", "UTF-8"), 0, 1, 'C');
|
||||||
|
?>
|
||||||
BIN
Societes/ebene/qrcodes/ESI6939000101_1771308797.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309071.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309092.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309143.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309331.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309455.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309539.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309622.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309678.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771309982.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310017.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310193.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310582.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310647.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310694.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310787.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310920.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771310987.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311069.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311306.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311483.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311576.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311700.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311852.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771311967.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771312077.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771312168.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771312326.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000101_1771312393.png
Normal file
|
After Width: | Height: | Size: 685 B |
BIN
Societes/ebene/qrcodes/ESI6939000102_1771308797.png
Normal file
|
After Width: | Height: | Size: 696 B |
BIN
Societes/ebene/qrcodes/ESI6939000103_1771308797.png
Normal file
|
After Width: | Height: | Size: 681 B |
BIN
Societes/ebene/qrcodes/ESI6939000201_1771308797.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000202_1771308797.png
Normal file
|
After Width: | Height: | Size: 695 B |
BIN
Societes/ebene/qrcodes/ESI6939000203_1771308797.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
Societes/ebene/qrcodes/ESI6939000204_1771308797.png
Normal file
|
After Width: | Height: | Size: 686 B |
BIN
Societes/ebene/qrcodes/ESI6939000205_1771308797.png
Normal file
|
After Width: | Height: | Size: 701 B |
BIN
Societes/ebene/qrcodes/ESI6939000206_1771308797.png
Normal file
|
After Width: | Height: | Size: 683 B |
BIN
Societes/ebene/qrcodes/ESI6939000207_1771308797.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
Societes/ebene/qrcodes/ESI6939000208_1771308797.png
Normal file
|
After Width: | Height: | Size: 693 B |
BIN
Societes/ebene/qrcodes/ESI6939000301_1771308797.png
Normal file
|
After Width: | Height: | Size: 692 B |
BIN
Societes/ebene/qrcodes/ESI6939000302_1771308797.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6939000401_1771308797.png
Normal file
|
After Width: | Height: | Size: 679 B |
BIN
Societes/ebene/qrcodes/ESI6939000402_1771308798.png
Normal file
|
After Width: | Height: | Size: 694 B |
BIN
Societes/ebene/qrcodes/ESI6939000403_1771308798.png
Normal file
|
After Width: | Height: | Size: 704 B |
BIN
Societes/ebene/qrcodes/ESI6939000404_1771308798.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000501_1771321960.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000501_1771322069.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000501_1771322100.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000501_1771322256.png
Normal file
|
After Width: | Height: | Size: 684 B |
BIN
Societes/ebene/qrcodes/ESI6939000502_1771321960.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
Societes/ebene/qrcodes/ESI6939000502_1771322256.png
Normal file
|
After Width: | Height: | Size: 687 B |
BIN
Societes/ebene/qrcodes/ESI6939000503_1771321960.png
Normal file
|
After Width: | Height: | Size: 680 B |
BIN
Societes/ebene/qrcodes/ESI6939000503_1771322256.png
Normal file
|
After Width: | Height: | Size: 680 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771351166.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771351314.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771351360.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771351467.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771351789.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352367.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352456.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352545.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352590.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352654.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352728.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771352893.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771353094.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771353330.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771353450.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771353604.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771353804.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771354031.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771354392.png
Normal file
|
After Width: | Height: | Size: 688 B |
BIN
Societes/ebene/qrcodes/ESI6940000101_1771354529.png
Normal file
|
After Width: | Height: | Size: 688 B |