248 lines
11 KiB
PHP
248 lines
11 KiB
PHP
<?php $this->titre = "Intersanté - Hospitalisation";
|
|
$numeroBonHospitalisation = $feuillemaladie['numeroBonHospitalisation'];
|
|
$facture = $feuillemaladie['facture'];
|
|
$dateFinHospit = $feuillemaladie['dateFinHospit'];
|
|
$dateDebutHospit = $feuillemaladie['dateDebutHospit'];
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<input class="sr-only" id="facture" name="facture" type="text" value= "<?= $facture ?>" >
|
|
<input class="sr-only" id="dateFinHospit" name="dateFinHospit" type="text" value= "<?= $dateFinHospit ?>" >
|
|
<input class="sr-only" id="numeroBonHospitalisation" name="numeroBonHospitalisation" type="text" value= "<?= $numeroBonHospitalisation ?>" >
|
|
|
|
<legend> Hospitalisation / Hospitalization </legend>
|
|
|
|
<div id="infosbon">
|
|
<input class="sr-only" type="text" id="codeEtatBon" name="codeEtatBon" value="">
|
|
<input class="sr-only" type="text" id="numeroBonSave" name="numeroBonSave" value="0">
|
|
|
|
<?php if ($numeroBonHospitalisation>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > Bon Hospit. </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonHospitalisation ?>" readonly > </td>
|
|
|
|
<td width="10%" > </td>
|
|
<?php if ($facture=="1"): ?>
|
|
<td align='center' class="alert alert-danger"> Dejà facturée ! / Already charged ! </td>
|
|
<?php else: ?>
|
|
<td> <button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popAjoutChambre" style='font-size:10pt;' > Ajouter une chambre... / Add a room... </button> </td>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > Numéro Bon </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonHospitalisation ?>" readonly > </td>
|
|
<?php else: ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt;" type="number" id="numeroBon" name="numeroBon" required
|
|
onChange="ajaxinfosbonhospitalisation();" onkeypress="javascript:ctrlkeypress_numeroBon(event);" autofocus ></td>
|
|
<?php endif; ?>
|
|
|
|
|
|
<td width="10%" > </td>
|
|
<td><input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="Enregistrer / Save" disabled style='font-size:10pt;' ></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|
|
|
|
<?php if (isset($msgErreur)): ?>
|
|
<div id ="msgErreur" class="alert alert-danger">
|
|
<H3><?= $msgErreur ?></H3>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<div id ="div_wait">
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div id="div_chambre">
|
|
<?php if ($numeroBonHospitalisation>"0") : ?>
|
|
<legend> Chambres occupées / Occupied Rooms </legend>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
|
|
<thead>
|
|
<tr>
|
|
<th> Libellé </th>
|
|
<th width="7%" style="text-align:center"> Prix </th>
|
|
<th width="7%" style="text-align:center"> Début </th>
|
|
<th width="7%" style="text-align:center"> Fin </th>
|
|
<th width="5%" style="text-align:center"> Durée </th>
|
|
<th width="7%" style="text-align:center"> Total </th>
|
|
<th width="7%" style="text-align:center"> T. Mod. </th>
|
|
<th width="7%" style="text-align:center"> A Remb. </th>
|
|
<th width="5%" style="text-align:center"> Suppr </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> Total</td>
|
|
<td align='center'><?= $this->nettoyer($totalchambres['duree']) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['fraisReel'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['montantTm'])) ?></td>
|
|
<td align='center'><?= format_N($this->nettoyer($totalchambres['montantArembourser'])) ?></td>
|
|
<td> </td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
<?php foreach ($chambres as $chambre):
|
|
$idChambre=$this->nettoyer($chambre['id']);
|
|
$ententePrealable=$this->nettoyer($chambre['ententePrealable']);
|
|
$autorisation=$this->nettoyer($chambre['autorisation']);
|
|
?>
|
|
<?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> <?= $this->nettoyer($chambre['libelleChambre']) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['valeurActe'])) ?> </td>
|
|
<td align='center'> <?= dateFr($this->nettoyer($chambre['debut'])) ?> </td>
|
|
<td align='center'> <?= dateFr($this->nettoyer($chambre['fin'])) ?> </td>
|
|
<td align='center'> <?= $this->nettoyer($chambre['quantite']) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['fraisReel'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['montantTm'])) ?> </td>
|
|
<td align='center'> <?= format_N($this->nettoyer($chambre['montantArembourser'])) ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_chambre('<?= $idChambre ?>');"> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="9" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<div class="modal fade" id="popAjoutChambre" 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-bs-dismiss="modal">Fermer / Close</button>
|
|
<h3 class="modal-title"> Ajouter une chambre / Add a room </h3>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_ajout_chambre">
|
|
<form id="frmchambre" name="frmchambre" method="post" >
|
|
|
|
<input class="sr-only" type="text" id="codeTypePrestation" name="codeTypePrestation" value="HOSP">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%" >Ticket Mod (%)</td>
|
|
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="number" id="tauxCouverture" name="tauxCouverture" value="<?= $_SESSION['tm_C'] ?>" readonly ></td>
|
|
|
|
<td width="15%" align="center"> Chambre </td>
|
|
<td colspan="3">
|
|
<div id="listeacte">
|
|
<SELECT class="form-control" id="codeActe" NAME="codeActe" required onChange="ajaxprixchambre();" style='font-size:10pt;' required autofocus >
|
|
<?php liste_options($acte,""); ?>
|
|
</SELECT>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> Début </td>
|
|
<td > <INPUT onChange="claculerfinchambre();" style='font-size:10pt;' class="form-control datepicker" TYPE="text" id="debut" NAME="debut" Value="<?= dateFr($dateDebutHospit) ?>" required style='font-size:10pt;' ></td>
|
|
|
|
<td align="center"> Durée </td>
|
|
<td width="15%" >
|
|
<input class="form-control" type="number" id="quantite" name="quantite" value="1" style="text-align: center; font-size:10pt;'"
|
|
onBlur="ajax_changer_duree_chambre();" >
|
|
</td>
|
|
|
|
<td width="15%" align="center" > Fin </td>
|
|
<td width="20%" > <INPUT style='font-size:10pt;' class="form-control datepicker" TYPE="text" id="fin" NAME="fin" value="<?= dateCouranteLang($_SESSION['lang']) ?>" required disabled > </td>
|
|
|
|
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
|
|
<div id="infosacte" style='font-size:10pt;'>
|
|
<input class="sr-only" type="number" id="prixActe" name="prixActe" value="0">
|
|
<input class="sr-only" type="number" id="valeurActe" name="valeurActe" value="0">
|
|
<input class="sr-only" type="number" id="montantTm" name="montantTm" value="0">
|
|
<input class="sr-only" type="number" id="aRembourser" name="aRembourser" value="0">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%" > Prix Chambre </td>
|
|
<td width="20%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly> </td>
|
|
|
|
<td width="15%" align="center"> Total Chambre </td>
|
|
<td width="15%" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
|
|
<td width="15%" align="center"> Montant TM </td>
|
|
<td width="20%" align="center" > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> A rembourser </td>
|
|
<td > <input class="form-control" style="background-color: rgb(190,190,190);text-align: center; font-size:10pt;'" type="text" value="0" readonly ></td>
|
|
|
|
<td colspan="2"> </td>
|
|
|
|
<td align="center"> N° Chambre </td>
|
|
<td> <input id="numeroChambre" name="numeroChambre" class="form-control" style="text-align: center; font-size:10pt;'" type="text"></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td> </td>
|
|
<td colspan="5"><input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="Enregistrer / Save" style='font-size:10pt;' disabled ></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button type="button" class="btn btn-default" data-bs-dismiss="modal">Fermer / Close</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
<div id="div_fraisExclu">
|
|
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
|
|
</div>
|
|
|
|
<div id="div_test">
|
|
|
|
</div>
|
|
</div>
|