assure/Vue/Ajaxdetailopticien/index.php
2025-12-01 19:07:16 +00:00

195 lines
9.5 KiB
PHP

<div id="livraison">
<?php
$nbActesMonture = $this->nettoyer($prescription['nbActesMonture']);
?>
<!-- nbActesMonture new : <?= $nbActesMonture ?> -->
<div id="non_livre">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:8pt;'>
<thead>
<tr>
<th width="5%" style="text-align:center" > + + </th>
<th style="text-align:center"> Verres non livrés / Not supplied </th>
<th width="7%" style="text-align:center"> Frais </th>
<th width="5%" style="text-align:center"> T. Mod. </th>
<th width="7%" style="text-align:center"> A Rembours. </th>
</tr>
</thead>
<tbody>
<?php foreach ($detailnonlivres as $detailnonlivre):
$idNonLivre=$this->nettoyer($detailnonlivre['id']);
$valeurActe = $this->nettoyer($detailnonlivre['valeurActe']);
$ententePrealable2=$this->nettoyer($detailnonlivre['ententePrealable']);
?>
<?php if($ententePrealable2=='2' || $ententePrealable2=='3'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable2=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable2=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<?php if($valeurActe=="0") : ?>
<td width="5%" align='center'> </td>
<?php else: ?>
<?php if($ententePrealable2=='2'): ?>
<td width="5%" align='center'> <input type="button" value=" ? " onClick="javascript:demander_accord_opt('<?= $idNonLivre ?>');"></td>
<?php elseif($ententePrealable2=='3'): ?>
<td width="5%" align='center'> W </td>
<?php elseif($ententePrealable2=='9'): ?>
<td width="5%" align='center'> R </td>
<?php else: ?>
<td width="5%" align='center'> <input type="button" value=" + " onClick="javascript:ajouterverre_opt('<?= $idNonLivre ?>');"></td>
<?php endif; ?>
<?php endif; ?>
<td> <?= $this->nettoyer($detailnonlivre['libelleOptique']) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['fraisReel'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['montantTm'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['montantArembourser'])) ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="livre">
<?php $nbLivre = 0; ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:8pt;'>
<thead>
<tr>
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirerverre_opt_tous();" style='font-size:8pt;' > </th>
<th style="text-align:center"> A Livrer / To be delivered </th>
<th width="7%" style="text-align:center"> Verres </th>
<th colspan="2" width="14%" style="text-align:center"> Monture </th>
<th width="7%" style="text-align:center"> Frais </th>
<th width="5%" style="text-align:center"> T. Mod. </th>
<th width="7%" style="text-align:center"> A Rembours. </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5" style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?></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']);
$nbLivre++;
?>
<tr valign="top">
<td align='center'> <input type="button" value=" - " onClick="javascript:retirerverre_opt_tous();" ></td>
<td> <?= $this->nettoyer($detaillivre['libelleOptique']) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['valeurActe'])) ?> </td>
<?php if($nbActesMonture>0) : ?>
<td colspan="2" align='center' style="background-color: red;color:white;"> Livré / Delivered </td>
<?php else: ?>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['monture'])) ?> </td>
<td width="7%"><INPUT class="form-control" style='text-align:center' TYPE="number" value="<?= $this->nettoyer($detaillivre['monture']) ?>"
onChange="this.value=supprimer_espace_nombre(this.value);if(controle_numerique(this)){maj_monture_temp('<?=$idLivre?>', this.value);}">
</td>
<?php endif; ?>
<!--
<td align='center'> <?= format_N($this->nettoyer($detaillivre['monture'])) ?> </td>
<td width="7%"><INPUT class="form-control" style='text-align:center' TYPE="number" value="<?= $this->nettoyer($detaillivre['monture']) ?>"
onChange="this.value=supprimer_espace_nombre(this.value);if(controle_numerique(this)){maj_monture_temp('<?=$idLivre?>', this.value);}">
</td>
-->
<td align='center'> <?= format_N($this->nettoyer($detaillivre['fraisReel'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> </td>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="8" height="3"></td>
</tr>
</tbody>
</table>
<div id="recap">
<table class="table table-responsive table-condensed" style='font-size:12pt;' >
<tbody>
<tr>
<td > Dépas. </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisExcluLivre'])) ?>" readonly style="text-align: center; font-size:12pt; color:red;" > </td>
<td align="center" > Retenu </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisRetenuLivre'])) ?>" readonly style="text-align: center; font-size:12pt; color:blue;" > </td>
<td align="center" > Part Assuré </td>
<td > <INPUT class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($prescription['fraisAssure'])) ?>" readonly style="text-align: center; font-size:12pt; color:red;" > </td>
</tr>
</tbody>
</table>
</div>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
<thead>
<tr>
<th rowspan="2" style="text-align:center"> Limites de la famille : Garanties </th>
<th rowspan="2" style="text-align:center"> Limites </th>
<th rowspan="2" style="text-align:center"> Solde Ant </th>
<th colspan="2" style="text-align:center;background-color:blue;color:white;" > Nouvelles Consommations </th>
<th rowspan="2" style="text-align:center;background-color:red;color:white;"> Dépassement </th>
<th rowspan="2" style="text-align:center"> Retenu </th>
<th rowspan="2" style="text-align:center"> Nouv Solde </th>
<th rowspan="2" style="text-align:center"> Par tête? </th>
</tr>
<tr>
<th style="text-align:center;background-color:blue" > Garanties </th>
<th style="text-align:center;background-color:blue" > Sous Gar. </th>
</tr>
</thead>
<tbody>
<?php foreach ($garantieadherent_temp as $garantieadherent):
$champApplication = $this->nettoyer($garantieadherent['champApplication']);
?>
<tr valign="top">
<td align='center'> <?= $this->nettoyer($garantieadherent['garantie'])?> </td>
<td align='center'><?= format_N($this->nettoyer($garantieadherent['plafond'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($garantieadherent['soldeOld'])) ?></td>
<td align='center' style='background-color:blue;color:white;'><?= format_N($this->nettoyer($garantieadherent['consommationNew'])) ?></td>
<td align='center' style='background-color:blue;color:white;'><?= format_N($this->nettoyer($garantieadherent['consommationSousGarantie'])) ?></td>
<td align='center' style='background-color:red;color:white;'><?= format_N($this->nettoyer($garantieadherent['fraisExclu'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($garantieadherent['fraisRetenu'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($garantieadherent['soldeNew'])) ?></td>
<?php if($champApplication=='1'): ?>
<td align='center'> <input type="checkbox" checked value="<?php echo $champApplication ; ?>" disabled ></td>
<?php else: ?>
<td align='center'> <input type="checkbox" value="<?php echo $champApplication ; ?>" disabled ></td>
<?php endif; ?>
</tr>
<?php endforeach; ?>
</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="fraisExcluLivre" name="fraisExcluLivre" value="<?= $this->nettoyer($prescription['fraisExcluLivre']) ?>" >
</div>
</div>