This commit is contained in:
KANE LAZENI 2026-07-27 11:30:09 +00:00
parent 26d679190b
commit 63f71ec58c

View File

@ -67,14 +67,21 @@
<?php
$facture = $this->nettoyer($prescription['facture']);
$agePrescription = $this->nettoyer($prescription['agePrescription']);
$bonCaduc = $this->nettoyer($prescription['bonCaduc']);
$otpStatus = $this->nettoyer($prescription['otpStatus']);
if($modeSaisieFacture=="1")
{
$bonCaduc = "0";
$otpStatus = -1; // Pas OTP en mode Décompte
}
?>
<div id="laboratoire">
<input class="sr-only" id="bonCaduc" name="bonCaduc" type="text" value= "<?= $bonCaduc ?>" >
<input class="sr-only" id="otpStatus" name="otpStatus" type="text" value= "<?= $otpStatus ?>" >
<div id="prestation" onkeypress="javascript:ctrlkeypressordlab(event);">
@ -248,8 +255,6 @@
<?php if($this->nettoyer($prescription['bonCaduc'])=="0" or $modeSaisieFacture==1) : ?>
<?php if($ajoutPrescriptionExam) : ?>
<button type="button" class="form-control btn btn-primary" onClick="javascript:selectionexamens_lab();" style='font-size:10pt;' > <?= _("Ajouter Examen...") ?> </button>
<?php else: ?>
<!--<button type="button" class="form-control btn btn-primary" disabled style='font-size:10pt;' > <?= _("Ajouter Examen...") ?> </button>-->
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
@ -371,108 +376,110 @@
<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="35%" > <?= _("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 ="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($otpStatus=="-1" || $otpStatus=="1"): ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:11pt;'>
<thead>
<tr>
<?php if($facture=="0") : ?>
<?php if($valeurActe=="0" && $prixActeModifiable=="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>
<th width="5%" style="text-align:center" >
<?php if($actVisible=="1"): ?>
<?= $libelleActe ?>
<input class="form-control btn btn-primary" type="button" value=" + + " onClick="javascript:ajouterexamen_lab_tous();" style='font-size:9pt;' >
<?php else: ?>
<?= $codeActe ?>
<input class="form-control btn btn-primary" type="button" value=" + + " disabled style='font-size:9pt;' >
<?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; ?>
</th>
<th width="35%" > <?= _("Examens à facturer") ?> </th>
<?php else: ?>
<td align='center' > <input type="checkbox" disabled></td>
<?php endif; ?>
<th width="35%" > <?= _("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 ="5%" style="text-align:center"> <?= _("Accord") ?> </th>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</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" && $prixActeModifiable=="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>
<?php endif; ?>
</div>
<div id="livre">