prestation/Vue/Ajaxlistemedicamentsubstitue/index.php
2025-12-01 18:54:33 +00:00

24 lines
654 B
PHP

<?php
if(!empty($medicaments)) {
?>
<ul id="element-list">
<?php
foreach($medicaments as $v) {
$tab = explode(" <==> ",$v["libelle"]);
//var_dump($tab[2]);
if ($tab[2] == "Non garanti"){
$style = "background-color: red; color:white";
}elseif (isset($tab[4]) && $tab[4] == "Demander Accord"){
$style = "background-color: yellow;";
}else{
$style = "background-color: white;";
}
?>
<li style="<?php echo $style; ?>" onClick="selectElementSubtitue('<?= $v["libelle"]; ?>',<?= $ligne ?>,<?= $quantite ?>,<?= $tM ?>,'<?= $v["code"] ?>','<?= $codeMedicament ?>');"><?= $v["libelle"]; ?></li>
<?php } ?>
</ul>
<?php } ?>