383 lines
16 KiB
PHP
383 lines
16 KiB
PHP
<?php
|
|
$this->titre = "INTER-SANTE - Séances";
|
|
|
|
$numeroBonKine = $_SESSION['p_numeroBonKine_C'];
|
|
$numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C'] ;
|
|
$numeroBonSeance = "0";
|
|
$nbRestantOld = "0";
|
|
$ententePrealable = "0";
|
|
|
|
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
|
|
|
|
$badcodeGestionBon = "1";
|
|
$tab_gestion_bon = array("0", "1", "2");
|
|
if (in_array($codeGestionBon, $tab_gestion_bon))
|
|
{
|
|
$badcodeGestionBon = "0";
|
|
}
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<input class="sr-only" type="text" id="badcodeGestionBon" name="badcodeGestionBon" value= "<?= $badcodeGestionBon ?>" >
|
|
<input class="sr-only" type="text" id="codeGestionBon" name="codeGestionBon" Value="<?= $codeGestionBon ?>" >
|
|
<input class="sr-only" type="text" id="nbBonsCons" name="nbBonsCons" Value="<?= $nbBonsCons ?>" >
|
|
|
|
<?php if($numeroBonKine=="-1") : ?>
|
|
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "">
|
|
<div id="seance" onkeypress="javascript:ctrlkeypressordsea(event);">
|
|
|
|
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "0" >
|
|
|
|
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
|
|
<input class="sr-only" type="text" id="facture" name="facture" >
|
|
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" >
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
|
|
<tbody>
|
|
<tr>
|
|
<td width="20%" align="center"> <?= _("No Ordonnance") ?> </td>
|
|
<td width="20%">
|
|
<INPUT style='text-align:center; font-size:12pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
|
|
onChange="javascript:chercher_ordonnance_sea(this.value);" autofocus required >
|
|
</td>
|
|
|
|
<td > </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="ordonnance">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<?php else: ?>
|
|
|
|
<?php if ($numeroPrescriptionKine>" ") : ?>
|
|
|
|
<?php
|
|
$facture = $this->nettoyer($prescription['facture']);
|
|
$nbRestantOld = $this->nettoyer($prescription['nbRestantOld']);
|
|
$codeActeSeance = $this->nettoyer($prescription['codeActeSeance']);
|
|
$numeroBonSeance = $this->nettoyer($prescription['numeroBonSeance']);
|
|
$ententePrealable = $this->nettoyer($prescription['ententePrealable']);
|
|
|
|
$agePrescription = $this->nettoyer($prescription['agePrescription']);
|
|
$bonCaduc = $this->nettoyer($prescription['bonCaduc']);
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleActePrescription = $this->nettoyer($prescription['libelleActePrescriptionEng']);
|
|
}
|
|
else
|
|
{
|
|
$libelleActePrescription = $this->nettoyer($prescription['libelleActePrescription']);
|
|
}
|
|
?>
|
|
|
|
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "<?= $bonCaduc ?>" >
|
|
|
|
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "<?= $codeActeSeance ?>">
|
|
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
|
|
|
|
<input class="sr-only" type="text" id="facture" name="facture" value="<?= $facture ?>" >
|
|
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" value="<?= $nbRestantOld ?>" >
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:9pt;' >
|
|
<tbody>
|
|
<tr>
|
|
<td width="7%" > <?= _("Ordon") ?> </td>
|
|
<td width="10%">
|
|
<INPUT style='text-align:center; font-size:11pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
|
|
value="<?= $numeroBonKine ?>" onChange="javascript:chercher_ordonnance_sea(this.value);"
|
|
autofocus required >
|
|
</td>
|
|
|
|
|
|
<td width="10%" align="center" > Date Prescr </td>
|
|
<td width="10%" > <INPUT class="form-control" TYPE="text" value="<?= dateLang($this->nettoyer($prescription['datePrescription'])) ?>" readonly style="text-align: center; font-size:9pt;" > </td>
|
|
|
|
<td width="7%" align="center"> <?= _("Médecin") ?> </td>
|
|
<td> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['medecinPrescription']) ?>" readonly style='font-size:9pt;'> </td>
|
|
|
|
<td width="7%" align="center"> <?= _("Tél Méd") ?> </td>
|
|
<td width="15%"> <INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['telephoneMedecin']) ?>" readonly style='font-size:9pt;'> </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div class="alert alert-danger" style="height:40px" style="height:30px; padding:5px;" >
|
|
<H4><?= _("Prescrit à : ").$this->nettoyer($prescription['prestatairePrescription']) ?></H4>
|
|
</div>
|
|
|
|
<div id ="div_wait">
|
|
</div>
|
|
|
|
<div id="ordonnance">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > Prescription </td>
|
|
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<td colspan="5" style='background-color: yellow;'> <?= $libelleActePrescription ?> </td>
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<td colspan="5" style='background-color: #00ff00;'> <?= $libelleActePrescription ?> </td>
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<td colspan="5" style='background-color: red;color:white;'> <?= $libelleActePrescription ?> </td>
|
|
<?php else: ?>
|
|
<td colspan="5"> <?= $libelleActePrescription ?> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
|
|
|
|
<tr>
|
|
<td> <?= _("Nb Prescrits") ?> </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="nbSeance" name="nbSeance" value="<?= $this->nettoyer($prescription['nbSeance']) ?>" readonly > </td>
|
|
|
|
<td width="10%" align="center"> <?= _("Nb Effectués") ?> </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="nbLivreOld" name="nbLivreOld" value="<?= $this->nettoyer($prescription['nbLivreOld']) ?>" readonly > </td>
|
|
|
|
<td width="10%" align="center"> <?= _("Nb Restant") ?> </td>
|
|
<td > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="nbRestant" name="nbRestant" value="<?= $this->nettoyer($prescription['nbRestantOld']) ?>" readonly > </td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<?php if($ententePrealable<2): ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> <?= _("Séances Effectuées") ?> </th>
|
|
<th style="text-align:center"> Date </th>
|
|
<th style="text-align:center"> <?= _("Qté") ?> </th>
|
|
<th style="text-align:center"> <?= _("Prestataire") ?> </th>
|
|
<th style="text-align:center"> <?= _("Bon Séance") ?> </th>
|
|
|
|
<th style="text-align:center"> <?= _("Valeur") ?> </th>
|
|
<th style="text-align:center"> <?= _("Frais") ?> </th>
|
|
<th style="text-align:center"> <?= _("T M") ?> </th>
|
|
<th style="text-align:center"> <?= _("A Remb") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailseances as $detailseance):
|
|
$idSeance=$this->nettoyer($detailseance['id']);
|
|
$ententePrealable = $this->nettoyer($detailseance['ententePrealable']);
|
|
$codePrestataire = $this->nettoyer($detailseance['codePrestataire']);
|
|
$typeSysteme = $this->nettoyer($detailseance['typeSysteme']);
|
|
$idFacture = $this->nettoyer($detailseance['idFacture']);
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleActeSeance = $this->nettoyer($detailseance['libelleActeSeanceEng']);
|
|
}
|
|
else
|
|
{
|
|
$libelleActeSeance = $this->nettoyer($detailseance['libelleActeSeance']);
|
|
}
|
|
?>
|
|
<?php if($ententePrealable=='2'): ?>
|
|
<tr style="background-color: yellow;" >
|
|
<?php elseif($ententePrealable=='1'): ?>
|
|
<tr style="background-color: #00ff00;" >
|
|
<?php elseif($ententePrealable=='9' || $typeSysteme=='1'): ?>
|
|
<tr valign="top" style="background-color: red;color:white;">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
|
|
<td align="center"> <?= $libelleActeSeance ?> </td>
|
|
<td align="center"> <?= dateheureLang($this->nettoyer($detailseance['dateSysteme'])) ?> </td>
|
|
<td align="center"> <?= $this->nettoyer($detailseance['quantite']) ?> </td>
|
|
<td align="center"> <?= $this->nettoyer($detailseance['prestataireSeance']) ?> </td>
|
|
<td align="center"> <?= $this->nettoyer($detailseance['numeroBonSeance']) ?> </td>
|
|
|
|
<?php if($codePrestataire==$_SESSION['p_codePrestataire_C']): ?>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailseance['valeurActe'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailseance['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailseance['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($detailseance['montantArembourser'])) ?> </td>
|
|
<?php else: ?>
|
|
<td colspan="4"> </td>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php else: ?>
|
|
|
|
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "0" >
|
|
|
|
<input class="sr-only" id="codeActeSeance" name="codeActeSeance" type="text" value= "">
|
|
<div id="laboratoire" onkeypress="javascript:ctrlkeypressordsea(event);">
|
|
<div id="prestation" onkeypress="javascript:ctrlkeypressordsea(event);">
|
|
<input class="sr-only" type="text" id="facture" name="facture" >
|
|
<input class="sr-only" type="number" id="nbRestantOld" name="nbRestantOld" >
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
|
|
<tbody>
|
|
<tr>
|
|
<td width="20%" align="center"> <?= _("No Ordonnance") ?> </td>
|
|
<td width="20%">
|
|
<INPUT style='text-align:center; font-size:12pt;' class="form-control" TYPE="text" id="numeroBonKine" name="numeroBonKine"
|
|
onChange="javascript:chercher_ordonnance_sea(this.value);" autofocus required >
|
|
</td>
|
|
|
|
<td > </td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
<div id="ordonnance">
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="alert alert-danger" style="height:30px; padding:5px;" >
|
|
<H4><?= "Ordonnance ".$numeroBonKine." introuvable !" ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
|
|
<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>
|
|
|
|
|
|
<!-- pour sélctionner un nouveau bon -->
|
|
|
|
<div class="modal fade" id="popInitSession" role="dialog">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
|
|
<div class="modal-header">
|
|
<button id="btn_close_pop_session" name="btn_close_pop_session" type="button" class="close" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
<h4 class="modal-title"><?= _("Attribuer un bon...") ?> </h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="20%" > <?= _("Bons Disponibles") ?> </td>
|
|
<td width="30%" > <input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $nbBonsCons ?>" readonly > </td>
|
|
|
|
<td width="15%" align="center" > <?= _("Gestion") ?> </td>
|
|
<td>
|
|
<?php if($badcodeGestionBon=="1") : ?>
|
|
<input class="form-control" style="text-align: center; font-size:10pt; background-color: red;color:white;" Value="<?= _("INCONNU") ?>" readonly >
|
|
<?php else: ?>
|
|
<input class="form-control" style="text-align: center; font-size:10pt;" Value="<?= $typeGestionbon ?>" readonly >
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="infosbon">
|
|
<?php if ($badcodeGestionBon=="1") : ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("REVOIR LE TYPE DE GESTION DES BONS") ?> </H4>
|
|
</div>
|
|
<?php else: ?>
|
|
|
|
<?php if($codeGestionBon!="0"): ?>
|
|
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="1">
|
|
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="1">
|
|
<input class="sr-only" type="text" id="numeroBon" name="numeroBon" value="1">
|
|
|
|
<?php if($codeGestionBon=="1" && $nbBonsCons<1): ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
<?php else: ?>
|
|
<input id="btn_enreg_bon_kine" name="btn_enreg_bon_kine" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="javascript:enregistrerbonsseancekine();" style='font-size:10pt;' >
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="">
|
|
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="0">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<?php if($nbBonsCons<1): ?>
|
|
<tr>
|
|
<input class="sr-only" type="number" id="numeroBon" name="numeroBon" required >
|
|
<td>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> <?= _("STOCK DE BON EPUISE") ?> </H4>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
<?php else: ?>
|
|
<tr>
|
|
<td width="20%" > <?= _("Numéro Bon") ?> </td>
|
|
<td width="30%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required
|
|
onChange="javascript:ajaxinfosbonseancekine();" onkeypress="javascript:ctrlkeypress_numeroBon(event);" ></td>
|
|
|
|
<td width="15%" > </td>
|
|
<td><input id="btn_enreg_bon_kine" name="btn_enreg_bon_kine" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" disabled style='font-size:10pt;' ></td>
|
|
</tr>
|
|
<?php endif; ?>
|
|
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($msgErreur)): ?>
|
|
<div id ="msgErreur" class="alert alert-danger" style="height:30px; padding:5px;" >
|
|
<H4><?= $msgErreur ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop_acte" name="close_pop_acte" type="button" class="btn btn-default" data-dismiss="modal"> <?= _("Fermer") ?> </button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php if($ententePrealable<2): ?>
|
|
<div id="div_facturation_seance">
|
|
<input class="sr-only" type="number" id="fraisRetenuSeance" name="fraisRetenuSeance" value="0" >
|
|
|
|
<?php if($nbRestantOld>"0") : ?>
|
|
<?php if($this->nettoyer($prescription['bonCaduc'])=="0" or $modeSaisieFacture==1) : ?>
|
|
<button type="button" class="form-control btn btn-primary" data-toggle="modal" data-target="#popInitSession" style='font-size:10pt;' > <?= _("Initier séances...") ?></button>
|
|
<?php else: ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
|
|
<H4> Age => <?= $this->nettoyer($prescription['agePrescription']) . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<?php if ($numeroPrescriptionKine>"0") : ?>
|
|
<div class="alert alert-danger" style="height:30px; padding:5px;" >
|
|
<H4><?= _("Séances terminées!") ?></H4>
|
|
</div>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<input class="sr-only" type="text" id="ententePrealableSea" name="ententePrealableSea" Value="<?= $ententePrealable ?>" >
|