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

293 lines
13 KiB
PHP
Executable File

<?php
$numeroBonExamen = $prescription['numeroBonExamen'];
$facture = $prescription['facture'];
$actVisible = $_SESSION['p_actVisible'];
?>
<div id="livraison">
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td align="center" style="font-weight: bold;" width="10%"> <?= _("Réclamé") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold;"> </td>
<td align="center" style="font-weight: bold;"> <?= _("Part Assuré") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['montantTmLivre']+$prescription['depassementLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold; color:red;"> </td>
<td align="center" style="font-weight: bold;"> <?= _("A Rembourser") ?> </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisRetenuLivre'])) ?>" readonly style="text-align: center; font-size:14pt; font-weight:bold;"> </td>
</tr>
</tbody>
</table>
</div>
<div id="div_statutacte">
</div>
<div id="div_messages">
</div>
<div id="non_livre">
<div >
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Liste des examens à facturer") ?>" readonly >
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:11pt;'>
<thead>
<tr>
<?php if($facture=="0") : ?>
<th width="5%" style="text-align:center" >
<?php if($actVisible=="1"): ?>
<input class="form-control btn btn-primary" type="button" value=" + + " onClick="javascript:ajouterexamen_lab_tous();" style='font-size:9pt;' >
<?php else: ?>
<input class="form-control btn btn-primary" type="button" value=" + + " disabled style='font-size:9pt;' >
<?php endif; ?>
</th>
<th width="35%" > <?= _("Examens à facturer") ?> </th>
<?php else: ?>
<th width="40%" > <?= _("Examens à facturer") ?> </th>
<?php endif; ?>
<th width="10%" style="text-align:center"> <?= _("Garantie") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Total") ?> </th>
<!--
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Remb") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Dépass") ?> </th>
-->
<th width ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($detailnonlivres as $detailnonlivre):
$idNonLivre=$this->nettoyer($detailnonlivre['id']);
$valeurActe = $this->nettoyer($detailnonlivre['valeurActe']);
$ententePrealable = $this->nettoyer($detailnonlivre['ententePrealable']);
$codeActe = $this->nettoyer($detailnonlivre['codeActe']);
$libelleActe = $this->nettoyer($detailnonlivre['libelleActe']);
$codeGarantie = $this->nettoyer($detailnonlivre['codeGarantie']);
$tarif = $this->nettoyer($detailnonlivre['tarif']);
?>
<tr valign="top">
<?php if($facture=="0") : ?>
<?php if($valeurActe=="0") : ?>
<td width="5%" align='center'> </td>
<?php else: ?>
<?php if($ententePrealable=='2'): ?>
<td align='center' style="background-color: yellow;" > W </td>
<?php elseif($ententePrealable=='1'): ?>
<td align='center' style="background-color: #00ff00;" >
<?php if($actVisible=="1"): ?>
<input type="button" value=" + " onClick="javascript:ajouterexamen_lab('<?= $idNonLivre ?>', '<?= $ententePrealable ?>', '<?= $codeActe ?>', '<?= $codeGarantie ?>');">
<?php else: ?>
<input type="button" value=" + " disabled >
<?php endif; ?>
</td>
<?php elseif($ententePrealable=='9'): ?>
<td align='center' style="background-color: red; color:white;" > R </td>
<?php else: ?>
<td width="5%" align='center'>
<?php if($actVisible=="1"): ?>
<input type="button" value=" + " onClick="javascript:ajouterexamen_lab('<?= $idNonLivre ?>', '<?= $ententePrealable ?>', '<?= $codeActe ?>', '<?= $codeGarantie ?>');">
<?php else: ?>
<input type="button" value=" + " disabled >
<?php endif; ?>
</td>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
<td>
<?php if($actVisible=="1"): ?>
<?= $libelleActe ?>
<?php else: ?>
<?= $codeActe ?>
<?php endif; ?>
</td>
<td align='center' > <?= $codeGarantie ?> </td>
<td align='center'>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($this->nettoyer($detailnonlivre['valeurActe'])) ?>
</button>
</td>
<td align='center' > <?= $this->nettoyer($detailnonlivre['quantite']) ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detailnonlivre['fraisReel'])) ?> </td>
<?php if($ententePrealable<>"0"): ?>
<?php if($ententePrealable=='2'): ?>
<td align='center' style="background-color: yellow;"> <input type="checkbox" checked disabled> </td>
<?php elseif($ententePrealable=='1'): ?>
<td align='center' style="background-color: #00ff00;"> <input type="checkbox" checked disabled> </td>
<?php elseif($ententePrealable=='9'): ?>
<td align='center' style="background-color: red;color:white;"> <input type="checkbox" checked disabled> </td>
<?php else: ?>
<td align='center'> <input type="checkbox" checked disabled> </td>
<?php endif; ?>
<?php else: ?>
<td align='center' > <input type="checkbox" disabled></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="livre">
<?php $nbLivre = 0; ?>
<div >
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Liste des examens effectués") ?>" readonly >
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:11pt;'>
<thead>
<tr>
<?php if($facture=="0") : ?>
<th width="5%" style="text-align:center" >
<?php if($actVisible=="1"): ?>
<input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirerexamen_lab_tous();" style='font-size:9pt;' >
<?php else: ?>
<input class="form-control btn btn-primary" type="button" value=" - - " disabled style='font-size:9pt;' >
<?php endif; ?>
</th>
<th > <?= _("Examens effectués") ?> </th>
<?php else: ?>
<th colspan="2"> <?= _("Examens effectués") ?> </th>
<?php endif; ?>
<th width="10%" style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Total") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Taux") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Montant TM") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Remb") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Dépass") ?> </th>
<th width ="5%" style="text-align:center"> <?= _("Motif") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<?php if($facture=="0") : ?>
<td colspan="4" style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?></td>
<td> </td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['depassementLivre'])) ?></td>
<td> </td>
<?php else: ?>
<td colspan="4" style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?></td>
<td> </td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['montantArembourserLivre'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prescription['depassementLivre'])) ?></td>
<td> </td>
<?php endif; ?>
</tr>
</tfoot>
<tbody>
<?php foreach ($detaillivres as $detaillivre):
$idLivre=$this->nettoyer($detaillivre['id']);
$ententePrealable = $this->nettoyer($detaillivre['ententePrealable']);
$libelleActe = $this->nettoyer($detaillivre['libelleActe']);
$codeActe = $this->nettoyer($detaillivre['codeActe']);
$ajLabo = $this->nettoyer($detaillivre['ajLabo']);
$typeSysteme = $this->nettoyer($detaillivre['typeSysteme']);
$tm = $this->nettoyer($detaillivre['tm']);
$taux = (100-$tm)."%";
$codeMotifDepassement = $this->nettoyer($detaillivre['codeMotifDepassement']);
$motif = $this->nettoyer($detaillivre['motif']);
$motifEng = $this->nettoyer($detaillivre['motifEng']);
$tarif = $this->nettoyer($detaillivre['tarif']);
$nbLivre++;
?>
<?php if($typeSysteme=="1") : ?>
<tr valign="top" style="background-color: red; color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<?php if($facture=="0") : ?>
<td align='center'>
<?php if($actVisible=="1"): ?>
<input type="button" value=" - " onClick="javascript:retirerexamen_lab('<?= $idLivre ?>');">
<?php else: ?>
<input type="button" value=" - " disabled >
<?php endif; ?>
</td>
<td>
<?php if($actVisible=="1"): ?>
<?= $libelleActe ?>
<?php else: ?>
<?= $codeActe ?>
<?php endif; ?>
</td>
<?php else: ?>
<td>
<?php if($actVisible=="1"): ?>
<?= $libelleActe ?>
<?php else: ?>
<?= $codeActe ?>
<?php endif; ?>
<?php endif; ?>
<td align='center'>
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
<?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?>
</button>
</td>
<td align='center' > <?= format_N($this->nettoyer($detaillivre['quantite'])) ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detaillivre['fraisReel'])) ?> </td>
<td align='center'> <?= $taux ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> </td>
<td align='center' > <?= format_N($this->nettoyer($detaillivre['depassement'])) ?> </td>
<?php if($codeMotifDepassement!=''): ?>
<td align='center'>
<button type="button" class="btn btn-info" title="Voir le motif du dépassement..." onClick='javascript:alert_ebene("<?= $motif ?>","<?= $motifEng ?>");'>
<?= $codeMotifDepassement ?>
</button>
</td>
<?php else: ?>
<td > </td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="10" height="5"></td>
</tr>
</tbody>
</table>
<input class="sr-only" type="text" id="nbLivre" name="nbLivre" value="<?= $nbLivre ?>" >
<input class="sr-only" type="text" id="prixActe" name="prixActe" value="<?= $this->nettoyer($prescription['fraisRetenuLivre']) ?>" >
<input class="sr-only" type="text" id="cout" name="cout" value="<?= $this->nettoyer($prescription['fraisReelLivre']) ?>" >
<input class="sr-only" type="text" id="montantTm" name="montantTm" value="<?= $this->nettoyer($prescription['montantTmLivre']) ?>" >
<input class="sr-only" type="text" id="cout_f" name="cout_f" value="<?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?>" >
<input class="sr-only" type="text" id="montantTm_f" name="montantTm_f" value="<?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?>" >
</div>
<div id="div_fraisExclu">
<input class="sr-only" type="text" id="fraisExcluLivre" name="fraisExcluLivre" value="<?= $this->nettoyer($prescription['fraisExcluLivre']) ?>" >
</div>
</div>