219 lines
9.2 KiB
PHP
Executable File
219 lines
9.2 KiB
PHP
Executable File
<?php $this->titre = "Intersanté - Prescription Optique";
|
|
$numeroBonOptique = $optique['numeroBonOptique'];
|
|
$numeroOptique = $optique['numeroOptique'];
|
|
$facture = $optique['facture'];
|
|
$_SESSION['numeroBonOptique_C'] = $numeroBonOptique;
|
|
$_SESSION['numeroOptique_C'] = $numeroOptique;
|
|
?>
|
|
|
|
<script type="text/javascript">
|
|
|
|
</script>
|
|
|
|
<input class="sr-only" id="facture" name="facture" type="text" value= "<?= $facture ?>" >
|
|
<input class="sr-only" id="numeroBonOptique" name="numeroBonOptique" type="text" value= "<?= $numeroBonOptique ?>" >
|
|
<input class="sr-only" id="codeMedecin" name="codeMedecin" type="text" value= "<?= $optique['codeMedecin'] ?>">
|
|
|
|
<?php if ($numeroBonOptique>"0") : ?>
|
|
<legend> Informations sur la prescription Optique N° : <?= $_SESSION['numeroOptique_C'] ?> </legend>
|
|
<?php else: ?>
|
|
<legend> Nouvelle prescription Optique </legend>
|
|
<?php endif; ?>
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > Date Prescription </td>
|
|
<td width="24%" > <INPUT class="form-control" TYPE="text" value="<?= dateFr($this->nettoyer($optique['datePrescription'])) ?>" readonly style="text-align: center; font-size:10pt;" > </td>
|
|
|
|
<td width="10%" align="center"> Médecin </td>
|
|
<td>
|
|
<?php if ($numeroBonOptique>"0" or $facture=="1") : ?>
|
|
<INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($optique['medecinPrescription']) ?>" readonly style='font-size:10pt;'>
|
|
<?php else: ?>
|
|
<!-- <button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRechercheMedecin" style='font-size:10pt;' ><span id="nomMedecin" name="nomMedecin"> Rechercher Médecin... / Search Doctor... </span></button> -->
|
|
<button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popRechercheMedecin" style='font-size:10pt;' ><span id="nomMedecin" name="nomMedecin"> <?= $this->nettoyer($optique['medecinPrescription']) ?> </span></button>
|
|
<?php endif; ?>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
<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 ($numeroBonOptique>"0") : ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > N° Ordonnance </td>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOptique ?>" 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: ?>
|
|
<?php if ($nbVerres_0=="0"): ?>
|
|
<!-- <td> <button type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popAjoutVerre" style='font-size:10pt;' >Ajouter des verres... / Add glasses... </button> </td> -->
|
|
<td> <button disabled type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popAjoutVerre" style='font-size:10pt;' >Ajouter des verres... / Add glasses... </button> </td>
|
|
<?php else: ?>
|
|
<td> <button disabled type="button" class="form-control btn btn-primary" data-bs-toggle="modal" data-bs-target="#popAjoutVerre" style='font-size:10pt;' >Ajouter des verres... / Add glasses... </button> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td width="10%" > N° Ordonnance </td>
|
|
<?php if ($facture=="1"): ?>
|
|
<td width="24%" > <input class="form-control" style="text-align: center; font-size:10pt; background-color:blue;color:white;" type="number" id="numeroBon" name="numeroBon" value="<?= $numeroBonOptique ?>" 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="ajaxinfosbonoptique();" 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>
|
|
|
|
<div id="verres">
|
|
<?php if ($numeroBonOptique>"0") : ?>
|
|
<legend> Verres prescrits </legend>
|
|
<?php $nbVerres = 0; ?>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th > Libellé </th>
|
|
<th width="5%" style="text-align:center"> Suppr </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($detailoptiques as $detailoptique):
|
|
$idOptique=$this->nettoyer($detailoptique['id']);
|
|
$livre=$this->nettoyer($detailoptique['livre']);
|
|
$nbVerres++;
|
|
?>
|
|
<tr valign="top">
|
|
<td> <?= $this->nettoyer($detailoptique['libelleOptique']) ?> </td>
|
|
|
|
<?php if ($facture=="1"): ?>
|
|
<td> </td>
|
|
<?php else: ?>
|
|
<?php if ($livre!="1") : ?>
|
|
<td> <input class = "form-control btn btn-danger" type="button" value="X" onClick="javascript:supprimer_optique('<?= $idOptique ?>');"> </td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
|
|
<input class="sr-only" type="text" id="nbVerres" name="nbVerres" value="<?= $nbVerres ?>" >
|
|
|
|
<div class="modal fade" id="popAjoutVerre" 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 des verres / Add glasses </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="OPT">
|
|
|
|
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
|
<tbody>
|
|
<tr>
|
|
<td>
|
|
<div id="listeacte">
|
|
<SELECT class="form-control" id="codeOptique" NAME="codeOptique" required style='font-size:10pt;' required autofocus >
|
|
<?php liste_options($acte,""); ?>
|
|
</SELECT>
|
|
</div>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td colspan="3"><input id="btn_enreg" name="btn_enreg" class = "form-control btn btn-primary" type="button" value="Enregistrer / Save" onClick="enregistrerverre();" style='font-size:10pt;' ></td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
</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>
|
|
|
|
<div class="modal fade" id="popRechercheMedecin" 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>
|
|
<h4 class="modal-title">Rechercher un Médecin... / Search a Doctor...</h4>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<div id="div_listemedecins" onkeypress="javascript:ctrlkeypress_medecin(event);">
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center" width="15%" > Code </th>
|
|
<th width="50%" style="text-align:center" >Nom contenant... / Name containing...</th>
|
|
<th style="text-align:center" > Spécialité / Speciality</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<tr>
|
|
<td><input type="text" class="form-control" id="noOrdreMedecin" name="noOrdreMedecin" autofocus style='font-size:10pt;' ></td>
|
|
<td><input type="text" class="form-control" id="nomsearch" name="nomsearch" autofocus style='font-size:10pt;' ></td>
|
|
<td><input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="Rechercher... / Search..." onclick="javascript:afficher_pop_recherche_medecin();" /></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button id="close_pop" name="close_pop" type="button" class="btn btn-default" data-bs-dismiss="modal">Fermer / Close</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|