This commit is contained in:
KONE SOREL 2026-01-12 19:11:14 +00:00
parent 5699daf3e9
commit 949736e04c
8 changed files with 560 additions and 0 deletions

View File

@ -0,0 +1,72 @@
<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Facture.php';
class ControleurAjaxfactureconspop extends Controleur {
private $facture;
public function __construct() {
$this->facture = new Facture();
}
public function index()
{
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$_SESSION['idFacture_C'] = $idFacture;
$facture = $this->facture->consulterfacturefacture($idFacture) ;
$this->genererVueAjax(array('facture' => $facture));
}
public function feuillemaladie()
{
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$feuillemaladie = $this->facture->consulterfacturefeuillemaladie($idFacture) ;
$diagnostics = $this->facture->consulterfacturediagnostics($idFacture);
$this->genererVueAjax(array('feuillemaladie' => $feuillemaladie, 'diagnostics' => $diagnostics));
}
public function prestationactes()
{
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$prestations = $this->facture->consulterfactureprestationactes($idFacture) ;
$this->genererVueAjax(array('prestations' => $prestations));
}
public function medicaments()
{
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$medicaments = $this->facture->consulterfacturemedicaments($idFacture) ;
$this->genererVueAjax(array('medicaments' => $medicaments));
}
public function geds()
{
unset($_FILES['fichier_upload']);
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$geds = $this->facture->getgedfacture($idFacture);
$this->genererVueAjax(array('geds' => $geds));
}
public function verres()
{
$idFacture = $this->requete->getParametreFormulaire("idFacture");
$verres = $this->facture->consulterfactureverres($idFacture) ;
$this->genererVueAjax(array('verres' => $verres));
}
}

View File

@ -3877,3 +3877,48 @@ function liste_mouvemements_assures_client()
}
});
}
function consulter_facture_pop(idFacture)
{
$("#div_facture_detail").html('');
$("#div_consulter_facture_pop").html(`
<div class="d-flex flex-column align-items-center justify-content-center" style="padding-top:80px;">
<div class="spinner-border text-primary" role="status" style="width:3rem; height:3rem;">
<span class="visually-hidden">Loading...</span>
</div>
<span class="mt-3 fs-5 fw-bold">
Veuillez patienter... / Please wait...
</span>
</div>
`);
donnees = 'idFacture='+idFacture;
if(isNaN(idFacture))
{
v_msg="Valeur numérique exigée!";
v_msgEng="Numeric value required!";
alert_ebene(v_msg, v_msgEng);
$("#idFacture").val("0");
$("#idFacture").focus();
return;
}
$.ajax({
url: $("#racineWeb").val()+"Ajaxfactureconspop/",
type: 'POST',
data: donnees,
success: function(data) {
$("#div_consulter_facture_pop").html(data);
},
error: function(data) {
},
complete: function() {
$('#btn_pop_consulter_facture').click();
}
});
}

View File

@ -0,0 +1,134 @@
<div id="div_facture_detail">
<?php
$actVisible = $_SESSION['actVisible'];
$codeTypeAffection = $this->nettoyer($feuillemaladie['codeTypeAffection']);
$codeAffection = $this->nettoyer($feuillemaladie['codeAffection']);
if (est_anglophone())
{
$libelleAffection = $this->nettoyer($feuillemaladie['libelleAffectionEng']);
$raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultationEng']);
}
else
{
$libelleAffection = $this->nettoyer($feuillemaladie['libelleAffection']);
$raisonconsultation = $this->nettoyer($feuillemaladie['raisonconsultation']);
}
$AffectionVisible = $_SESSION['AffectionVisible'];
if($AffectionVisible!="1")
{
$libelleAffection = $codeAffection;
}
?>
<input style='text-align:center; font-size:11pt; background-color:green;color:white;' class="form-control" type="text" value="<?= _("Informations sur la consultation") ?>" disabled >
<table class="table table-responsive table-condensed" style="font-size:7pt;">
<tbody>
<tr>
<td width="7%"> <?= _("No Feuille") ?> </td>
<td width="13%"> <INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroFeuilleMaladie']) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("Date Cons") ?> </td>
<td width="10%" ><INPUT style="font-size:7pt;" class="form-control" value="<?= dateLang($this->nettoyer($feuillemaladie['dateConsultation'])) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("Prestataire") ?> </td>
<td width="25%" ><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['prestataire']) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("Médecin") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['medecinConsultation']) ?>" readonly></td>
</tr>
<tr>
<td > <?= _("Bon Cons") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonConsultation']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Bon Phar") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonOrdonnance']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Bon Hospit") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonHospitalisation']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Bon Opt") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonOptique']) ?>" readonly></td>
</tr>
<tr>
<td > <?= _("Bon Exam") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonExamen']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Bon Kine") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroBonKine']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Chambre") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($feuillemaladie['numeroChambre']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Rais Cons") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $raisonconsultation ?>" readonly></td>
</tr>
<tr>
<td> <?= _("Affection") ?> </td>
<td colspan="7">
<INPUT style='font-size:10pt; text-align:center;' class="form-control" TYPE="text" value="<?= $libelleAffection ?>" readonly >
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th rowspan="2" width="15%" style="text-align:center"> Date </th>
<th rowspan="2" style="text-align:center"> Diagnostic </th>
<th rowspan="2" width="15%" style="text-align:center"> User </th>
<th colspan="2" style='text-align:center'> <?= _("Suppression") ?> </th>
</tr>
<tr>
<th style="text-align:center"> User </th>
<th style="text-align:center"> Date </th>
</tr>
</thead>
<tbody>
<?php foreach ($diagnostics as $diagnostic):
$idDiagnostic = $this->nettoyer($diagnostic['id']);
$supprime = $this->nettoyer($diagnostic['supprime']);
$codeAffection = $this->nettoyer($diagnostic['codeAffection']);
if (est_anglophone())
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffectionEng'])." => ".$codeAffection;
}
else
{
$libelleAffection = $this->nettoyer($diagnostic['libelleAffection'])." => ".$codeAffection;
}
$AffectionVisible = $_SESSION['AffectionVisible'];
if($AffectionVisible!="1")
{
$libelleAffection = $codeAffection;
}
?>
<?php if($supprime=='1'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'><?= dateheureLang($this->nettoyer($diagnostic['dateSysteme'])) ?></td>
<td align='center'> <?= $libelleAffection ?> </td>
<td align='center'> <?= $this->nettoyer($diagnostic['codeUtilisateur']) ?> </td>
<td align='center'> <?= $this->nettoyer($diagnostic['userSuppression']) ?> </td>
<td align='center'><?= dateheureLang($this->nettoyer($diagnostic['heueSuppression'])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -0,0 +1,29 @@
<div id="div_facture_detail">
<div id="div_ged">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
<thead>
<th width="20%" style='text-align:center'> Date </th>
<th style='text-align:center'> <?= _("Document GED") ?> </th>
<th width="10%" style='text-align:center'> <?= _("Télécharger") ?> </th>
</thead>
<tbody>
<?php foreach ($geds as $ged):
$idGed=$this->nettoyer($ged['idGed']);
$cheminFichier = $this->nettoyer($ged['cheminFichier']);
?>
<tr valign="top">
<td align='center'><?= dateheureLang($this->nettoyer($ged['dateSysteme'])) ?></td>
<td align='center'><?= $this->nettoyer($ged['nomOrigine']) ?></td>
<td align="center">
<a style="font-size:10pt;" href="<?= $cheminFichier ?>" target="_blank" > <?= _("Télécharger") ?> </a>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>

View File

@ -0,0 +1,127 @@
<div id="div_consulter_facture_pop">
<table class="table table-responsive table-condensed" style="font-size:7pt;">
<tbody>
<tr>
<td width="7%"> <?= _("ID Facture") ?> </td>
<td width="13%"> <INPUT style="font-size:7pt;" class="form-control" id="idFacture" name="idFacture" value="<?= $this->nettoyer($facture['idFacture']) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("No Bénéf") ?> </td>
<td width="10%" ><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['numeroBeneficiaire']) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("Bénéficiaire") ?> </td>
<td width="25%" ><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['beneficiaire']) ?>" readonly></td>
<td width="7%" style='text-align:center'> <?= _("Adhérent") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['adherent']) ?>" readonly></td>
</tr>
<tr>
<td > <?= _("Police") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['numeroPolice']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Catégorie") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['codeProduit']) ?>" readonly></td>
<td style='text-align:center'> E-mail / Tel </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['emailAdherent']) ?> / <?= $this->nettoyer($facture['telAdherent']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Client") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['souscripteur']) ?>" readonly></td>
</tr>
<tr>
<td > Date </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= dateheureLang($this->nettoyer($facture['dateSysteme'])) ?>" readonly></td>
<td style='text-align:center'> User </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['codeUtilisateur']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Prestataire") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['prestataire']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Etat") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['etatfacture']) ?>" readonly></td>
</tr>
<tr>
<td> <?= _("Frais") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['fraisReel'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("T M") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantTm'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("A Remb") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantArembourser'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("Dépas") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['fraisExclu'])) ?>" readonly></td>
</tr>
<tr>
<td> <?= _("Retenu") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['fraisRetenu'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("Forcé") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantForce'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("Redressé") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantRedresse'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("A payer") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantApayer'])) ?>" readonly></td>
</tr>
<tr>
<td > <?= _("T P") ?> </td>
<?php if ($facture['tiersPayant']=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
<td style='text-align:center'> <?= _("Gest Conf") ?> </td>
<?php if ($facture['gc']=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
<td style='text-align:center'> <?= _("No Décpte") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['numeroDecompte']) ?>" readonly></td>
<td style='text-align:center'> <?= _("No Lot") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['numeroLotDecompte']) ?>" readonly></td>
</tr>
<tr>
<td > <?= _("Vérif") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= $this->nettoyer($facture['userControle']) ?>" readonly></td>
<td style='text-align:center'> <?= _("Date Décpte") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= dateLang($this->nettoyer($facture['dateDecompte'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("Date Rgt") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= dateheureLang($this->nettoyer($facture['heureReglement'])) ?>" readonly></td>
<td style='text-align:center'> <?= _("Réglé") ?> </td>
<td><INPUT style="font-size:7pt;" class="form-control" value="<?= format_N($this->nettoyer($facture['montantPaye'])) ?>" readonly></td>
</tr>
</tbody>
</table>
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td> <button type="button" style="font-size:10pt;" class="form-control btn btn-info" onclick="javascript:consulterfacturefeuillemaladie_pop();" > <?= _("Feuille Maladie...") ?> </button> </td>
<td> <button type="button" style="font-size:10pt;" class="form-control btn btn-info" onclick="javascript:consulterfactureprestationactes_pop();" > <?= _("Prestations...") ?> </button> </td>
<td> <button type="button" style="font-size:10pt;" class="form-control btn btn-info" onclick="javascript:consulterfacturemedicaments_pop();" > <?= _("Medicaments...") ?> </button> </td>
<td> <button type="button" style="font-size:10pt;" class="form-control btn btn-info" onclick="javascript:consulterfactureverres_pop();" > <?= _("Verres...") ?> </button> </td>
<td> <button type="button" style="font-size:10pt;" class="form-control btn btn-info" onclick="javascript:consulterfactureged_pop();" > <?= _("GED...") ?> </button> </td>
</tr>
</tbody>
</table>
</div>

View File

@ -0,0 +1,52 @@
<div id="div_facture_detail">
<?php
$actVisible = $_SESSION['actVisible'];
?>
<input style='text-align:center; font-size:11pt; background-color:blue;color:white;' class="form-control" type="text" value="<?= _("Les Médicaments Livrés") ?>" disabled >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="12%" style="text-align:center"> Date </th>
<th style="text-align:center"> <?= _("Médicament") ?> </th>
<th width="8%" style="text-align:center"> <?= _("Valeur") ?> </th>
<th style="text-align:center"> <?= _("Qtité") ?> </th>
<th width="8%" style="text-align:center"> <?= _("Frais") ?> </th>
<th width="5%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="8%" style="text-align:center"> <?= _("A Remb") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($medicaments as $medicament):
$ententePrealable=$this->nettoyer($medicament['ententePrealable']);
$libelleMedicament = $this->nettoyer($medicament['libelleMedicament']);
$codeMedicament = $this->nettoyer($medicament['codeMedicament']);
if($actVisible!="1")
{
$libelleMedicament = $codeMedicament;
}
?>
<?php if($ententePrealable=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'> <?= dateheureLang($this->nettoyer($medicament['dateSysteme'])) ?> </td>
<td align='center'> <?= $libelleMedicament?> </td>
<td align='center'> <?= format_N($this->nettoyer($medicament['valeurActe'])) ?></td>
<td align='center'> <?= $this->nettoyer($medicament['quantite']) ?></td>
<td align='center'> <?= format_N($this->nettoyer($medicament['fraisReel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($medicament['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($medicament['montantArembourser'])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -0,0 +1,66 @@
<div id="div_facture_detail" style="font-size:7pt;">
<?php
$actVisible = $_SESSION['actVisible'];
?>
<input style='text-align:center; font-size:11pt; background-color:blue;color:white;' class="form-control" type="text" value="<?= _("Les prestations de la facture") ?>" disabled >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="12%" style="text-align:center"> Date </th>
<th colspan="2" style="text-align:center"> <?= _("Acte") ?> </th>
<th width="8%" style="text-align:center"> <?= _("Valeur") ?> </th>
<th style="text-align:center"> <?= _("Qtité") ?> </th>
<th width="8%" style="text-align:center"> <?= _("Frais") ?> </th>
<th width="5%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="8%" style="text-align:center"> <?= _("A Remb") ?> </th>
<th style="text-align:center"> Val </th>
</tr>
</thead>
<tbody>
<?php foreach ($prestations as $prestation):
$codeTypePrestation = $this->nettoyer($prestation['codeTypePrestation']);
$ententePrealable = $this->nettoyer($prestation['ententePrealable']);
$autorisation = $this->nettoyer($prestation['autorisation']);
$codeActe = $this->nettoyer($prestation['codeActe']);
if (est_anglophone())
{
$libelleActe = $this->nettoyer($prestation['libelleActeEng']);
}
else
{
$libelleActe = $this->nettoyer($prestation['libelleActe']);
}
if($actVisible!="1")
{
$libelleActe = $codeActe;
}
?>
<?php if($ententePrealable=='2' || $autorisation=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1' || $autorisation=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9' || $autorisation=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'> <?= dateheureLang($this->nettoyer($prestation['dateSysteme'])) ?> </td>
<td width="5%" align='center'> <?= $codeTypePrestation ?> </td>
<td align='center'> <?= $libelleActe ?> </td>
<td align='center'> <?= format_N($this->nettoyer($prestation['valeurActe'])) ?></td>
<td align='center'> <?= $this->nettoyer($prestation['quantite']) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
<td align='center'> <?= $this->nettoyer($prestation['valide']) ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>

View File

@ -0,0 +1,35 @@
<div id="div_facture_detail">
<?php
$actVisible = $_SESSION['actVisible'];
?>
<input style='text-align:center; font-size:11pt; background-color:blue;color:white;' class="form-control" type="text" value="<?= _("Les Verres Livrés") ?>" disabled >
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:7pt;">
<thead>
<tr>
<th width="15%" style="text-align:center"> Date </th>
<th style="text-align:center"> <?= _("Verres") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($verres as $verre):
$libelleVerre = $this->nettoyer($verre['libelleVerre']);
$codeOptique = $this->nettoyer($verre['codeOptique']);
if($actVisible!="1")
{
$libelleVerre = $codeOptique;
}
?>
<tr valign="top">
<td align='center'> <?= dateheureLang($this->nettoyer($verre['dateSysteme'])) ?> </td>
<td align='center'> <?= $libelleVerre?> </td>
<td align='center'> <?= format_N($this->nettoyer($verre['valeurActe'])) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>