355 lines
18 KiB
PHP
355 lines
18 KiB
PHP
<?php
|
|
$this->titre = "INTER-SANTE - Fiche Bénéficiaire";
|
|
$datejour = $this->datejour;
|
|
$estcouvert = ($_SESSION['p_dateEcheancePolice_C']>=$datejour);
|
|
$_SESSION['p_nbTentative'] = "0";
|
|
$age = $beneficiaire['ageBeneficiaire'];
|
|
$estidentifiable = ($age>6);
|
|
$estsubstitue = ($_SESSION['p_idSubstitut_C']>0);
|
|
$college_couvert = $_SESSION['p_college_couvert_C'];
|
|
$derogation_en_cours = $_SESSION['p_derogation_en_cours_C'];
|
|
$dateSortieBeneficiaire = $this->nettoyer($beneficiaire['dateSortieBeneficiaire']);
|
|
|
|
$estsorti = false;
|
|
// maj 15/10/2018 => si dateSortie < dateJour => on n'est pas couvert
|
|
if($dateSortieBeneficiaire>"2000-01-01")
|
|
{
|
|
$estsorti = ($dateSortieBeneficiaire<=$datejour);
|
|
$estcouvert = ($estcouvert && ($dateSortieBeneficiaire>$datejour));
|
|
}
|
|
|
|
$dateEffetCouvert = $_SESSION['p_dateEffetCouvert'];
|
|
|
|
$derogation_finger_en_cours = $_SESSION['p_derogation_finger_en_cours_C'];
|
|
$derogationFingerPrestataire = $_SESSION['p_derogationFingerPrestataire'];
|
|
|
|
$controlerPlafondAdherent = ($_SESSION['p_controlerPlafondAdherent']>0);
|
|
$controlerPlafondBeneficiaire = ($_SESSION['p_controlerPlafondBeneficiaire']>0);
|
|
|
|
$derogationFingerPermanent = ($_SESSION['p_derogationFingerPermanent']>0);
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<INPUT class="sr-only datepicker" TYPE="text" id="debutMoisDecompte" NAME="debutMoisDecompte" value="<?= dateLang($_SESSION['p_debutMoisDecompte']) ?>" readonly>
|
|
<INPUT class="sr-only datepicker" TYPE="text" id="finMoisDecompte" name="finMoisDecompte">
|
|
|
|
<INPUT class="sr-only" TYPE="text" id="etatbeneficiaire_C" name="etatbeneficiaire_C" value="<?= $_SESSION['p_etatbeneficiaire_C'] ?>">
|
|
<INPUT class="sr-only" TYPE="text" id="dateEntreeBeneficiaire" NAME="dateEntreeBeneficiaire" value="<?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire'])) ?>">
|
|
<INPUT class="sr-only" TYPE="text" id="tm" NAME="tm" value="<?= $beneficiaire['tm'] ?>">
|
|
<INPUT class="sr-only" TYPE="text" id="age" NAME="age" value="<?= $age ?>">
|
|
<button class="sr-only" id="btn_popdate_reelle" name="btn_popdate_reelle" type="button" data-toggle="modal" data-target="#popdate_reelle" > </button>
|
|
|
|
<legend><?= _("Bénéficiaire") . " : " . $beneficiaire['numeroBeneficiaire'] . " => " . _("Date Effet") . " : " . dateLang($this->nettoyer($beneficiaire['dateEffetBeneficiaire']), $_SESSION['p_lang']) ?></legend>
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%"> <?= _("Nom Bénéf") ?> </td>
|
|
<td width="24%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="nomBeneficiaire" NAME="nomBeneficiaire" value="<?= $beneficiaire['nomBeneficiaire'] ?>" readonly ></td>
|
|
|
|
<td width="10%" align="center"> <?= _("Prénoms") ?> </td>
|
|
<td width="24%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="prenomsBeneficiaire" NAME="prenomsBeneficiaire" value="<?= $beneficiaire['prenomsBeneficiaire'] ?>" readonly ></td>
|
|
|
|
<td width="10%" align="center"> <?= _("Couverture") ?> </td>
|
|
<?php if ($estcouvert) : ?>
|
|
<td width="22%" align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire']), $_SESSION['p_lang']).' - '.dateLang($_SESSION['p_dateEcheancePolice_C'], $_SESSION['p_lang']) ?> </td>
|
|
<?php else: ?>
|
|
<td width="22%" align="center" style='font-size:10pt; background-color:red;color:white;'> <?= dateLang($this->nettoyer($beneficiaire['dateEntreeBeneficiaire']), $_SESSION['p_lang']).' - '.dateLang($_SESSION['p_dateEcheancePolice_C'], $_SESSION['p_lang']) ?> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> <?= _("No Fam") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" value="<?= $beneficiaire['numeroAdherent'] ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Lien Parenté") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="lienparente" name="lienparente" value="<?= $beneficiaire['lienparente'] ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Naissance") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="dateNaissance" NAME="dateNaissance" value="<?= dateLang($this->nettoyer($beneficiaire['dateNaissance']), $_SESSION['p_lang']).' => '.$beneficiaire['ageBeneficiaire'].' ans' ?>" readonly></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td>Sex</td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="sexe" name="sexe" value="<?= $beneficiaire['sexe'] ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Groupe Sang") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="codeGroupeSanguin" name="codeGroupeSanguin" value="<?= $beneficiaire['codeGroupeSanguin'] ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Etat") ?> </td>
|
|
|
|
<?php if ($dateEffetCouvert=="0") : ?>
|
|
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Non renouvelé") ?> </td>
|
|
<?php else: ?>
|
|
<?php if ($estcouvert) : ?>
|
|
<?php if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US"): ?>
|
|
<?php if ($beneficiaire['codeEtatBeneficiaire']=="V"): ?>
|
|
<td align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $beneficiaire['etatbeneficiaireEng'] ?> </td>
|
|
<?php else: ?>
|
|
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $beneficiaire['etatbeneficiaireEng'] ?> </td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php if ($beneficiaire['codeEtatBeneficiaire']=="V"): ?>
|
|
<td align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $beneficiaire['etatbeneficiaire'] ?> </td>
|
|
<?php else: ?>
|
|
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= $beneficiaire['etatbeneficiaire'] ?> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
|
<?php if ($estsorti): ?>
|
|
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Retiré") ?> </td>
|
|
<?php else: ?>
|
|
<td align="center" style='font-size:10pt; background-color:red;color:white;'> <?= _("Expiré") ?> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
</tr>
|
|
<tr>
|
|
<td> <?= _("Sortie") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="dateSortieBeneficiaire" NAME="dateSortieBeneficiaire" value="<?= dateLang($this->nettoyer($beneficiaire['dateSortieBeneficiaire'])) ?>" readonly></td>
|
|
|
|
<td align="center"> <?= _("T M") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" value="<?= $_SESSION['p_tm_C'].' %' ?>" readonly></td>
|
|
|
|
<td align="center"> <?= _("Client") ?> </td>
|
|
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="nomClient" NAME="nomClient" value="<?= $beneficiaire['nomClient'] ?>" readonly ></td>
|
|
</tr>
|
|
|
|
<?php if($controlerPlafondAdherent): ?>
|
|
<tr>
|
|
<td> <?= _("Plafond Famille") ?> </td>
|
|
<td><INPUT style='text-align:center; background-color:blue;color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_adherent['plafondAdherent']) ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Consommations") ?> </td>
|
|
<td><INPUT style='text-align:center; background-color:rgba(255, 0, 127);color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_adherent['consommationAdherent']) ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Solde") ?> </td>
|
|
<td> <INPUT style='text-align:center; background-color:green;color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_adherent['soldeAdherent']) ?>" readonly ></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
<?php if($controlerPlafondBeneficiaire): ?>
|
|
<tr>
|
|
<td> <?= _("Plafond Individuel") ?> </td>
|
|
<td><INPUT style='text-align:center; background-color:blue;color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_beneficiaire['plafondBeneficiaire']) ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Consommations") ?> </td>
|
|
<td><INPUT style='text-align:center; background-color:rgba(255, 0, 127);color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_beneficiaire['consommationBeneficiaire']) ?>" readonly ></td>
|
|
|
|
<td align="center"> <?= _("Solde") ?> </td>
|
|
<td><INPUT style='text-align:center; background-color:green;color:white; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($limite_beneficiaire['soldeBeneficiaire']) ?>" readonly ></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> <?= _("Exercice") ?> </th>
|
|
<th style="text-align:center"> <?= _("Garantie") ?> </th>
|
|
<th style="text-align:center"> <?= _("Limites") ?> </th>
|
|
<th style="text-align:center"> <?= _("Consommations") ?> </th>
|
|
<th style="text-align:center"> <?= _("Solde") ?> </th>
|
|
<th style="text-align:center"> <?= _("Par tête?") ?> </th>
|
|
<th style="text-align:center"> <?= _("Parent") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<?php foreach ($garantieadherents as $garantieadherent):
|
|
$champApplication = $this->nettoyer($garantieadherent['champApplication']);
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'> <?= $this->nettoyer($garantieadherent['exercieReference'])?> </td>
|
|
<td align='center'> <?= $this->nettoyer($garantieadherent['garantie'])?> </td>
|
|
<td align='center'><?= format_N($this->nettoyer($garantieadherent['plafond'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($garantieadherent['consommation'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($garantieadherent['solde'])) ?></td>
|
|
|
|
<?php if($champApplication=='1'): ?>
|
|
<td align='center'> <input type="checkbox" checked value="<?php echo $champApplication ; ?>" disabled ></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" value="<?php echo $champApplication ; ?>" disabled ></td>
|
|
<?php endif; ?>
|
|
<td align='center'> <?= $this->nettoyer($garantieadherent['garantieparentaffichage'])?> </td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="content">
|
|
|
|
<?php if ($college_couvert<"1" && $derogation_en_cours<"1") : ?>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:30px; padding:5px;" >
|
|
<H4><?= _("Cette personne n'a pas accès à") . " " . $_SESSION['p_prestataire_C'] ?></H4>
|
|
</div>
|
|
<?php else: ?>
|
|
|
|
<?php include 'flexcode/include/global.php'; ?>
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<?php if($derogationFingerPermanent): ?>
|
|
<td align="center" >
|
|
<H2 style="background-color:yellow;">
|
|
<marquee behavior="scroll" direction="left" scrollamount="20"> <?= _("Dérogation Permanente FingerPrint Activée; Veuillez cliquer sur CONSULTATION!") ?> </marquee>
|
|
</H2>
|
|
</td>
|
|
|
|
<?php elseif ($estidentifiable) : ?>
|
|
<?php if ($_SESSION['p_finger_id_C']==0) : ?>
|
|
<td align="center" width="40%">
|
|
<a onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');" >
|
|
<img src="Bootstrap/images/image_empreinte.jpg">
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<INPUT class="form-control btn btn-danger" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');"
|
|
value="<?= _("Enrôler...") ?>">
|
|
</td>
|
|
<?php else: ?>
|
|
|
|
<td align="center" width="40%">
|
|
<a onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');" >
|
|
<img src="Bootstrap/images/image_empreinte.jpg">
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<INPUT class="form-control btn btn-primary" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');"
|
|
value="<?= _("Vérifier Identité...") ?>">
|
|
</td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php if ($estsubstitue) : ?>
|
|
<?php if ($_SESSION['p_finger_id_C']==0) : ?>
|
|
<td align="center" width="40%">
|
|
<a onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');" >
|
|
<img src="Bootstrap/images/image_empreinte.jpg">
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<INPUT class="form-control btn btn-danger" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');"
|
|
value="<?= _("Enrôler substitut") . "... : ".trim($_SESSION['p_substitutnonassure_C']) ?>">
|
|
|
|
</td>
|
|
<?php else: ?>
|
|
|
|
<td align="center" width="40%">
|
|
<a onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');" >
|
|
<img src="Bootstrap/images/image_empreinte.jpg">
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<INPUT class="form-control btn btn-primary" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=<?= $_SESSION['p_finger_id_C'] ?>');"
|
|
value="<?= _("Vérifier Identité du substitut") . "... : ".trim($_SESSION['p_substitutnonassure_C']) ?>">
|
|
</td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<td align="center" width="40%">
|
|
<a onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=-1');" >
|
|
<img src="Bootstrap/images/image_empreinte.jpg">
|
|
</a>
|
|
</td>
|
|
|
|
<td>
|
|
<INPUT class="form-control btn btn-primary" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=-1');"
|
|
value="<?= _("Voir les substituts...") ?>">
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<?php if ($estidentifiable==false) : ?>
|
|
<INPUT class="form-control btn btn-primary" style='font-size:10pt;' TYPE="button"
|
|
onclick="javascript:load('flexcode/user.php?action=index&user_id=<?= $_SESSION['p_user_id_C'] ?>&user_name=<?= trim($_SESSION['p_beneficiaire_C']) ?>&finger=-1');"
|
|
value="<?= _("Voir les substituts...") ?>">
|
|
<?php endif; ?>
|
|
|
|
<?php endif; ?>
|
|
|
|
<?php if ($derogationFingerPrestataire>0 && !$derogationFingerPermanent): ?>
|
|
<H3>
|
|
<marquee behavior="scroll" direction="left" scrollamount="20"> <?= _("Dérogation Permanente FingerPrint Activée; Veuillez cliquer sur CONSULTATION!") ?> </marquee>
|
|
</H3>
|
|
<?php else: ?>
|
|
<?php if ($derogation_finger_en_cours>0 && !$derogationFingerPermanent): ?>
|
|
<div class="alert alert-success" style="height:30px; padding:5px;">
|
|
<H4> <?= _("No de dérogation défaut FingerPrint") . " : " . $derogation_finger_en_cours ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php if ($beneficiaire['lienPhoto']<=' '): ?>
|
|
<INPUT style="text-align: center" class="form-control" TYPE="text" value="<?= _("Aucune photo") ?>" readonly>
|
|
<?php endif; ?>
|
|
|
|
<div id="div_err">
|
|
<INPUT class="sr-only" TYPE="text" id="nbTentative" name="nbTentative" value="0">
|
|
</div>
|
|
|
|
<div id="loadingDiv" style="display: none">
|
|
<div class="ajax-mask"><div class="loading"><img src="Bootstrap/images/loading-spinner-grey.gif"/> <?= _("Veuillez patienter...") ?> </span></div></div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="modal fade" id="popdate_reelle" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop" name="btn_close_pop" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"> <?= _("Date Effective") ?> </h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_date_reelle">
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td> <?= _("Date Effective") ?> </td>
|
|
<td width="30%" colspan="3"> <INPUT style='text-align:center; font-size:11pt;' class="form-control datepicker" TYPE="text" id="dateFactureReelle" NAME="dateFactureReelle" value="" required> </td>
|
|
|
|
<td> </td>
|
|
<td> <input class = "form-control btn btn-primary" type="button" value="<?= _("Valider...") ?>" onClick="javascript:consultation_assureur();" style='font-size:11pt;' > </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|