prestation/Vue/Ajaxdetailpharmacien/tableaulivre.php
2025-12-01 18:54:33 +00:00

95 lines
4.5 KiB
PHP

<?php $nbLivre = 0; ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
<thead>
<tr>
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirermedicament_pha_tous();" style='font-size:9pt;' > </th>
<th width="45%" > <?= _("A Livrer") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Forme") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Valeur") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Saisi") ?> </th>
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5" style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prescription['prixManuelLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
</tr>
</tfoot>
<tbody>
<?php foreach ($detaillivres as $detaillivre):
$idLivre=$this->nettoyer($detaillivre['id']);
$substituable = $this->nettoyer($detaillivre['substituable']);
$substitue = $this->nettoyer($detaillivre['substitue']);
$ajPharmacie = $this->nettoyer($detaillivre['ajPharmacie']);
$typeSysteme = $this->nettoyer($detaillivre['typeSysteme']);
$ententePrealable3=$this->nettoyer($detaillivre['ententePrealable']);
$pharmacieInterne = $this->nettoyer($detaillivre['pharmacieInterne']);
$nbLivre++;
$forme = $this->nettoyer($detaillivre['forme']);
if (est_anglophone()){$forme = $this->nettoyer($detaillivre['formeEng']);}
?>
<?php if($ententePrealable3=='2' || $ententePrealable3=='3'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable3=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable3=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'> <input type="button" value=" - " onClick="javascript:retirermedicament_pha('<?= $idLivre ?>');"></td>
<td> <?= $this->nettoyer($detaillivre['libelleMedicament']) ?> </td>
<td align='center'> <?= $forme ?> </td>
<?php if($pharmacieInterne=="1") : ?>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['valeurActe']) ?>"
onBlur="ajax_maj_prix_medicament_pha('<?=$idLivre?>', this.value, this);">
</td>
<?php else: ?>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?> </td>
<?php endif; ?>
<?php if($ajPharmacie=="1") : ?>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['quantite']) ?>"
onBlur="ajax_maj_qte_medicament_pha('<?=$idLivre?>', this.value, this);">
</td>
<?php else: ?>
<td align='center'>
<input type="text" id="quantite<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt; ' value=<?= format_N($this->nettoyer($detaillivre['quantite'])) ?> disabled>
</td>
<?php endif; ?>
<td align='center'>
<input type="text" id="prixManuel<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt;' value=<?= str_replace(' ','',format_N($this->nettoyer($detaillivre['prixManuel']))) ?>
onChange="maj_prixmanuel('<?=$idLivre?>', '<?=$nbLivre?>', this.value, this);tableaulivre_pha();" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</td>
<td align='center'>
<input type="text" id="montantTm<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt; ' value=<?= str_replace(' ','',format_N($this->nettoyer($detaillivre['montantTm']))) ?> disabled>
</td>
<td align='center'>
<input type="text" id="montantArembourser<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt;' value=<?= str_replace(' ','',format_N($this->nettoyer($detaillivre['montantArembourser']))) ?> disabled>
</td>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="8" height="5"></td>
</tr>
</tbody>
</table>