prestation/Vue/Ajaxlistemedicamentspha/index.php
2025-12-05 10:42:46 +00:00

68 lines
3.6 KiB
PHP
Executable File

<div id="div_listemedicament" onkeypress="javascript:ctrlkeypress_pha(event);">
<?php
$accesAjoutPh = ($_SESSION['p_accesAjoutPh_C']==1) ;
?>
<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="10%" > Code </th>
<th style="text-align:center" > <?= _("Nom contenant...") ?> </th>
<th style="text-align:center" > <?= _("Instructions") ?> </th>
<th style="text-align:center" > <?= _("Prix") ?></th>
<th style="text-align:center" > Unit </th>
<th style="text-align:center" > <?= _("Accord") ?> </th>
<th style="text-align:center" > <?= _("Exclu") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<td> <input style="text-align:center" type="text" class="form-control" id="codeMedicament_pop" name="codeMedicament_pop" style='font-size:10pt;' readonly></td>
<td> <input type="text" class="form-control" id="libelleMedicament_pop" name="libelleMedicament_pop" readonly style='font-size:10pt;'></td>
<td colspan="5"> <input id="validpop" name="validpop" type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="Prescrire" onclick="javascript:prescrire_medicament_pha();" /></td>
</tfoot>
<tbody>
<tr>
<td colspan="2"><input type="text" class="form-control" id="nomsearch" name="nomsearch" autofocus style='font-size:10pt;'></td>
<td colspan="5"> <input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Rechercher...") ?>" onclick="javascript:afficher_pop_recherche_medicament_pha();" /></td>
</tr>
<?php foreach ($mdedicaments_pop as $mdedicament_pop):
$codeMedicament = $this->nettoyer($mdedicament_pop['codeMedicament']);
$libelleMedicament = $this->echapper($mdedicament_pop['libelleMedicament']);
$prix = $this->nettoyer($mdedicament_pop['prix']);
$ententePrealable = $this->nettoyer($mdedicament_pop['ententePrealable']);
$exclu = $this->nettoyer($mdedicament_pop['exclu']);
?>
<?php if ($exclu=="1"): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr onclick="javascript:selectionner_medicament_pop('<?=$codeMedicament?>','<?=$libelleMedicament?>')" ondblclick="javascript:prescrire_medicament_pha();" valign="top">
<?php endif; ?>
<?php if ($exclu=="1"): ?>
<td align="center"> <input type="text" class = "form-control" value="<?= $codeMedicament ?>" style='font-size:10pt;' disabled > </td>
<?php else: ?>
<td align="center"> <input type="button" class = "form-control btn btn-primary" value="<?= $codeMedicament ?>" style='font-size:10pt;' onClick="javascript:selectionner_medicament_pop('<?=$codeMedicament?>','<?=$libelleMedicament?>');prescrire_medicament_pha();"> </td>
<?php endif; ?>
<td> <?= $this->dechapper($libelleMedicament) ?> </td>
<td align="center"> <?= $this->nettoyer($mdedicament_pop['instructions']) ?> </td>
<td align="center"> <?= format_N($prix) ?> </td>
<td align="center"> <?= $this->nettoyer($mdedicament_pop['unite']) ?> </td>
<?php if ($ententePrealable=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
<?php if ($exclu=="1"): ?>
<td align='center'> <input type="checkbox" checked disabled></td>
<?php else: ?>
<td align='center'> <input type="checkbox" disabled></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>