Merge branch 'main' of git.ebene.ovh:ebene/radiantrh

This commit is contained in:
KANE LAZENI 2026-01-05 17:10:10 +00:00
commit 9487cd3a8e
3 changed files with 134 additions and 130 deletions

View File

@ -407,7 +407,7 @@ window.addEventListener('resize', () => {
* ou un bouton de sélection dans une liste de polices.
*/
function selectionner_police(id, no) {
debugger;
// Mise à jour de l'ID de la police dans le champ caché prévu pour le traitement serveur
$("#idPolice_C").val(id);
@ -425,7 +425,7 @@ function selectionner_police(id, no) {
* Utilisée généralement avant d'afficher le détail d'un contrat.
*/
function afficher_police_id(idPolice) {
debugger;
// Récupération de l'ID depuis le champ caché
//const idPolice = $("#idPolice_C").val();
@ -444,7 +444,7 @@ function afficher_police_id(idPolice) {
* @param {string|number} idPolice - L'identifiant de la police à mettre en session.
*/
function ajax_context_police_afficher(idPolice) {
debugger;
const racine = $("#racineWeb").val() || "/";
@ -482,7 +482,7 @@ function ajax_context_police_afficher(idPolice) {
* Charge la liste des quittances pour une police sur une période donnée.
*/
function afficher_quittances_police_periode() {
debugger;
// 1. Récupération des paramètres
const racine = $("#racineWeb").val() || "/";
@ -1174,7 +1174,7 @@ function changer_avenant_incorporation()
}
function get_age(td2) {
debugger;
// Vérifie si td2 est déjà un objet Date
if (!(td2 instanceof Date)) {
td2 = new Date(td2); // Convertit une chaîne ou un timestamp en Date
@ -1193,7 +1193,7 @@ function get_age(td2) {
function controle_age(dater, codeLienParente)
{
debugger;
age = get_age(dater);
$("#agepersonne").val("Âge : "+age);
@ -1613,7 +1613,7 @@ function selectionner_adherent(id,no)
function afficher_adherent()
{
debugger;
if ($("#numeroAdherent_C" ).val()>"")
{
@ -3442,3 +3442,17 @@ function exporter_liste_assures_date()
});
}
function retour_recherche_assure()
{
idPolice=$("#idPolice_C" ).val();
if (idPolice>"")
{
window.location.assign($("#racineWeb" ).val()+"Listeadherent/");
}else{
window.location.assign($("#racineWeb" ).val()+"Accueil/");
}
}

View File

@ -1,134 +1,124 @@
<?php
// $this->titre = "INTER-SANTE - Import assurés";
?>
<div class="container-fluid py-4 animate__animated animate__fadeIn">
<div id="div_fichepolice">
<div class="card shadow-sm border-0 mb-4 bg-light">
<div class="card-body">
<div class="row g-3 align-items-center">
<div class="col-md-4">
<h6 class="text-muted small fw-bold mb-1 text-uppercase"><?= _("Client / Souscripteur") ?></h6>
<div class="h5 mb-0 fw-bold text-primary"><?= $_SESSION['nomClient_C'] ?></div>
</div>
<div class="col-md-3">
<h6 class="text-muted small fw-bold mb-1 text-uppercase"><?= _("Police N°") ?></h6>
<div class="h5 mb-0 fw-bold"><?= $this->nettoyer($police['numeroPolice']) ?></div>
</div>
<div class="col-md-2 text-center border-start">
<h6 class="text-muted small fw-bold mb-1 text-uppercase"><?= _("État") ?></h6>
<span class="badge bg-success px-3"><?= $this->nettoyer($police['etatPolice']) ?></span>
</div>
<div class="col-md-3 text-end border-start">
<h6 class="text-muted small fw-bold mb-1 text-uppercase"><?= _("Période") ?></h6>
<div class="small fw-bold">Du <?= dateLang($this->nettoyer($police['dateEffet'])) ?></div>
<div class="small fw-bold">Au <?= dateLang($this->nettoyer($police['dateEcheance'])) ?></div>
</div>
</div>
</div>
</div>
<fieldset style='font-size:10pt;'>
<legend> <?= _("Informations Police => Importation des assurés à partir d'un fichier Excel") ?> </legend>
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<div class="card shadow-sm border-0 mb-4">
<div class="card-header bg-white py-3">
<h5 class="card-title mb-0 fw-bold"><i class="fas fa-file-import me-2 text-info"></i><?= _("Processus d'importation des assurés") ?></h5>
</div>
<div class="card-body">
<div class="row g-4 text-center">
<div class="col-md-3">
<div class="p-3 border rounded h-100 bg-white shadow-sm hover-elevate">
<div class="badge bg-primary rounded-circle mb-3 fs-5" style="width:40px; height:40px; line-height:28px;">1</div>
<p class="small fw-bold mb-3"><?= _("Modèle Excel") ?></p>
<button class="btn btn-outline-primary btn-sm w-100" onclick="javascript:exporter_modele_assure();">
<i class="fas fa-download me-1"></i> <?= _("Télécharger") ?>
</button>
</div>
</div>
<tr>
<td width="10%"> <?= _("Client") ?> </td>
<td width="24%" ><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="nomClient" name="nomClient" value="<?= $_SESSION['nomClient_C'] ?>" readonly></td>
<div class="col-md-3">
<div class="p-3 border rounded h-100 <?= ($fichierimport['etape2']=='1') ? 'bg-success-subtle border-success' : 'bg-white shadow-sm' ?>">
<div class="badge <?= ($fichierimport['etape2']=='1') ? 'bg-success' : 'bg-secondary' ?> rounded-circle mb-3 fs-5" style="width:40px; height:40px; line-height:28px;">
<?= ($fichierimport['etape2']=='1') ? '<i class="fas fa-check"></i>' : '2' ?>
</div>
<p class="small fw-bold mb-3"><?= _("Charger le fichier") ?></p>
<button class="btn <?= ($fichierimport['etape2']=='1') ? 'btn-success' : 'btn-primary' ?> btn-sm w-100" onclick="javascript:charger_fichier_modele_assure();">
<i class="fas fa-upload me-1"></i> <?= _("Choisir fichier") ?>
</button>
</div>
</div>
<td width="10%" align="center"> <?= _("No Police") ?> </td>
<td width="24%"><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="numeroPolice" NAME="numeroPolice" value="<?= $this->nettoyer($police['numeroPolice']) ?>" readonly></td>
<div class="col-md-3">
<div class="p-3 border rounded h-100 <?= ($fichierimport['etape3']=='1') ? 'bg-success-subtle border-success' : 'bg-white shadow-sm' ?>">
<div class="badge <?= ($fichierimport['etape3']=='1') ? 'bg-success' : 'bg-secondary' ?> rounded-circle mb-3 fs-5" style="width:40px; height:40px; line-height:28px;">
<?= ($fichierimport['etape3']=='1') ? '<i class="fas fa-check"></i>' : '3' ?>
</div>
<p class="small fw-bold mb-3"><?= _("Avenant lié") ?></p>
<button class="btn btn-primary btn-sm w-100" onclick="javascript:init_importer_modele_assure();" <?= ($fichierimport['etape2']!='1') ? 'disabled' : '' ?>>
<i class="fas fa-list-alt me-1"></i> <?= _("Lier Avenant") ?>
</button>
</div>
</div>
<td width="10%" align="center">Type</td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="typeContrat" NAME="typeContrat" value="<?= $this->nettoyer($police['typeContrat']) ?>" readonly></td>
</tr>
<tr>
<td> <?= _("Courtier") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="apporteurOld" NAME="apporteurOld" value="<?= $this->nettoyer($police['apporteur']) ?>" readonly></td>
<div class="col-md-3">
<div class="p-3 border rounded h-100 bg-white shadow-sm">
<div class="badge bg-secondary rounded-circle mb-3 fs-5" style="width:40px; height:40px; line-height:28px;">4</div>
<p class="small fw-bold mb-3"><?= _("Traitement final") ?></p>
<button class="btn btn-warning btn-sm w-100 fw-bold" onclick="javascript:traiter_lignes_importees();" <?= ($fichierimport['etape3']!='1') ? 'disabled' : '' ?>>
<i class="fas fa-cogs me-1"></i> <?= _("Lancer l'import") ?>
</button>
</div>
</div>
</div>
</div>
</div>
<td align="center"> <?= _("Tx Comm(%)") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="tauxCommissionOld" NAME="tauxCommissionOld" value="<?= $this->nettoyer($police['tauxCommission']) ?>" readonly></td>
<td align="center"> <?= _("Rachat TM") ?> </td>
<td>
<?php if ($police['rachatTm']=="1"): ?>
<INPUT class="form-control" TYPE="text" id="rachattmOld" NAME="rachattmOld" value="<?= _("Oui") ?>" readonly>
<?php else: ?>
<INPUT class="form-control" TYPE="text" id="rachattmOld" NAME="rachattmOld" value="<?= _("Non") ?>" readonly>
<?php endif; ?>
</td>
</tr>
<?php if($fichierimport['nomOrigine'] > ""): ?>
<div class="alert alert-info d-flex align-items-center shadow-sm" role="alert">
<i class="fas fa-file-excel fa-2x me-3"></i>
<div>
<div class="small text-muted"><?= _("Fichier actuellement chargé :") ?></div>
<strong class="text-uppercase"><?= $this->nettoyer($fichierimport['nomOrigine']) ?></strong>
</div>
</div>
<?php endif; ?>
<tr>
<td> <?= _("Etat") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="etatPolice" NAME="etatPolice" value="<?= $this->nettoyer($police['etatPolice']) ?>" readonly></td>
<div id="div_form_upload" class="card shadow-sm border-0 mb-4 animate__animated animate__fadeInUp" style="display: none">
<div class="card-body bg-light">
<form enctype="multipart/form-data" action="Importassure" method="post">
<div class="row align-items-end g-3">
<div class="col-md-8">
<label class="form-label fw-bold small text-muted"><?= _("Sélectionnez le document Excel (.xlsx, .xls)") ?></label>
<input class="form-control" name="fichier_upload" type="file" id="fichier_upload" required />
</div>
<div class="col-md-4">
<button type="submit" name="submit" class="btn btn-primary w-100">
<i class="fas fa-cloud-upload-alt me-2"></i><?= _("Envoyer sur le serveur") ?>
</button>
</div>
</div>
</form>
</div>
</div>
<td align="center"> <?= _("Effet") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" id="dateEffet" NAME="dateEffet" TYPE="text" value="<?= dateLang($this->nettoyer($police['dateEffet'])) ?>" readonly></td>
<td align="center"> <?= _("Echéance") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="dateEcheance" NAME="dateEcheance" value="<?= dateLang($this->nettoyer($police['dateEcheance'])) ?>" readonly></td>
</tr>
<?php if((isset($msgErreur)) && ($msgErreur > " ")) : ?>
<div class="alert alert-warning border-0 shadow-sm text-center fw-bold fs-5 py-3">
<i class="fas fa-exclamation-circle me-2"></i> <?= $msgErreur ?>
</div>
<?php endif; ?>
<tr>
<td> <?= _("Dernier Avenant") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="typeAvenant" NAME="typeAvenant" value="<?= $this->nettoyer($police['typeAvenant']) ?>" readonly></td>
<td align="center"> <?= _("No Avenant") ?> </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="numeroAvenant" NAME="numeroAvenant" value="<?= $this->nettoyer($police['numeroAvenant']) ?>" readonly></td>
<td align="center"> <?= (isset($_SESSION['composanteprime']['Taxes'])) ? _($_SESSION['composanteprime']['Taxes']) : _("Taxes") ?> (%) </td>
<td><INPUT style='font-size:10pt;' class="form-control" TYPE="text" id="tauxTaxe" NAME="tauxTaxe" value="<?= $this->nettoyer($police['tauxTaxe']) ?>" readonly></td>
</tr>
</tbody>
</table>
</fieldset>
</div>
<legend> Actions </legend>
<table class="table table-responsive table-condensed" style='font-size:10pt;' >
<tbody>
<tr>
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:exporter_modele_assure();"> <?= _("1 => Obtenir Fichier Modèle") ?> </button> </td>
<td></td>
<input type="hidden" id="cheminFichier" name="cheminFichier" value="<?= $this->nettoyer($fichierimport['cheminFichier']) ?>">
<div id="div_exporter_liste_assures" class="d-none"></div>
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:charger_fichier_modele_assure();"> <?= _("2 => Charger Fichier Renseigné") ?> </button> </td>
<td>
<?php if($fichierimport['etape2']=='1'): ?>
<input id="etape2" NAME="etape2" style='width: 28px; height: 28px;' type="checkbox" checked value="<?php echo $fichierimport['etape2'] ; ?>" disabled >
<?php else: ?>
<input id="etape2" NAME="etape2" style='width: 28px; height: 28px;' type="checkbox" value="<?php echo $fichierimport['etape2'] ; ?>" disabled >
<?php endif; ?>
</td>
<td></td>
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:init_importer_modele_assure();"> <?= _("3 => Choisir Avenant") ?> </button> </td>
<td>
<?php if($fichierimport['etape3']=='1'): ?>
<input id="etape3" NAME="etape3" style='width: 28px; height: 28px;' type="checkbox" checked value="<?php echo $fichierimport['etape3'] ; ?>" disabled >
<?php else: ?>
<input id="etape3" NAME="etape3" style='width: 28px; height: 28px;' type="checkbox" value="<?php echo $fichierimport['etape3'] ; ?>" disabled >
<?php endif; ?>
</td>
<td></td>
<td> <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:traiter_lignes_importees();"> <?= _("4 => Traiter Importations") ?> </button> </td>
</tr>
</tbody>
</table>
<div id="div_exporter_liste_assures"> </div>
<div id="div_form_upload" style="display: none">
<form enctype="multipart/form-data" action="Importassure" method="post">
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
<tbody>
<tr>
<td> <?= _("Document") ?> </td>
<td> <input style="font-size: 15px; height: 40px" class="form-control btn btn-info" name="fichier_upload" type="file" id="fichier_upload" /> </td>
<td> </td>
<td> <input style='font-size:10pt;' class="form-control btn btn-primary" type="submit" name="submit" value="<?= _("Envoyer") ?>" /> </td>
</tr>
</tbody>
</table>
</form>
</div>
<?php if((isset($msgErreur)) && ($msgErreur>" ")) : ?>
<INPUT style='font-size:14pt; color:green; text-align:center;' class="form-control" type="text" value="<?= $msgErreur ?>" readonly >
<?php endif; ?>
<INPUT style='font-size:14pt; color:green; text-align:center;' class="form-control" type="text" value="<?= _('FICHIER A UTILISER').' => '.$this->nettoyer($fichierimport['nomOrigine']) ?>" readonly disabled >
<input class="sr-only" type="text" id="cheminFichier" name="cheminFichier" value="<?= $this->nettoyer($fichierimport['cheminFichier']) ?>">
<div id="div_erreur_excel" >
<input class="sr-only" type="text" id="succes_impot_execl" name="succes_impot_execl" value="0">
</div>
<style>
.hover-elevate:hover { transform: translateY(-3px); transition: 0.3s; }
.bg-success-subtle { background-color: #d1e7dd !important; }
.badge { display: inline-flex; align-items: center; justify-content: center; }
</style>

View File

@ -638,7 +638,7 @@ $photoAssureCrypte = $_SESSION['photoAssureCrypte'];
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<!-- Application Scripts -->
<script src="/Js/fonctions.js?ver=2026.01.05.17"></script>
<script src="/Js/fonctions.js?ver=2026.01.05.20"></script>
<script type="text/javascript">
raffraichier_gabarit();