prestation/Vue/Ajaxdetailopticien/indexxx.php
2025-12-05 10:42:46 +00:00

193 lines
8.4 KiB
PHP
Executable File

<div id="div_facturation">
<?php
$nbActesMonture = $this->nettoyer($prescription['nbActesMonture']);
$modeSaisieFacture = $_SESSION['p_modeSaisieFacture'];
?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:9pt;">
<thead>
<tr>
<th colspan="9" style='text-align:center;font-size:10pt;background-color: #3279b7;color: #fff;font-weight: bold;'> <?= _("FACTURATION") ?> </th>
</tr>
<tr>
<th style="text-align:center"> <?= _("Actes") ?> </th>
<th style="text-align:center"> <?= _("Plafond") ?> </th>
<th style="text-align:center;"> <?= _("P U") ?> </th>
<th style="text-align:center"> <?= _("Qté") ?> </th>
<th style="text-align:center;background-color:blue;color:white;"> <?= _("Total") ?> </th>
<th style="text-align:center"> <?= _("T M") ?> </th>
<th style="text-align:center"> <?= _("Retenu") ?> </th>
<th style="text-align:center;background-color:red;color:white;"> <?= _("Dépassement") ?> </th>
<th style="text-align:center"> <?= _("Nouveau Solde") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="4" align='center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($detail_total['fraisReel'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($detail_total['montantTm'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($detail_total['montantArembourser'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($detail_total['fraisExclu'])) ?></td>
<td align='center'></td>
</tr>
</tfoot>
<tbody>
<?php
$i = 0;
foreach ($baremes as $v):
$idDetail = $this->nettoyer($v['id']);
$libelleActe = $this->nettoyer($v['libelleActe']);
$periodicte = $this->nettoyer($v['periodicte']);
$plafond = format_N($this->nettoyer($v['plafond']));
$plafondLettre = $this->nettoyer($v['plafondLettre']);
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US"){
$libelleActe = $this->nettoyer($v['libelleActeEng']);
$periodicte = $this->nettoyer($v['periodicteEng']);
}
if($plafond > 0){
if($periodicte!=""){
if($plafondLettre!=""){
$plafondPlus = $plafond." ".$periodicte." (".$plafondLettre.")";
}else{
if($periodicte!=""){
$plafondPlus = $plafond." ".$periodicte;
}else{
$plafondPlus = $plafond;
}
}
}else{
if($plafondLettre!=""){
$plafondPlus = $plafond." (".$plafondLettre.")";
}else{
$plafondPlus = $plafond;
}
}
}else{
if($periodicte!=""){
if($plafondLettre!=""){
$plafondPlus = $periodicte." (".$plafondLettre.")";
}else{
if($periodicte!=""){
$plafondPlus = $periodicte;
}else{
$plafondPlus = "0";
}
}
}else{
$plafondPlus = $plafondLettre;
}
}
$soldeNew = format_N($this->nettoyer($v['soldeNew']));
$ententePrealable = $this->nettoyer($v['ententePrealable']);
?>
<tr valign="top">
<td align='center' >
<INPUT class="form-control" TYPE="text" value="<?= $libelleActe; ?>" disabled>
</td>
<td align='center' >
<INPUT class="form-control" TYPE="text" value="<?= $plafondPlus; ?>" disabled>
<INPUT class="sr-only" TYPE="text" value="<?= $plafond; ?>">
</td>
<?php if ($soldeNew >"0") : ?>
<?php if($ententePrealable=='3' || $ententePrealable=='0'): ?>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['valeurActe'])) ?>"
onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);"
onChange="ajax_maj_quantite_detailoptique('<?=$idDetail?>', this.value, this,'<?=$idOptique?>');">
</td>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="number" value="<?= format_N($this->nettoyer($v['quantite'])) ?>"
onChange="ajax_maj_quantite_detailoptique('<?=$idDetail?>', this.value, this,'<?=$idOptique?>');">
</td>
<?php elseif($ententePrealable=='2' || $ententePrealable=='1'): ?>
<td colspan="2" align='center' width="8%">
<INPUT TYPE="button" class="form-control" style="background-color:yellow" value="Demander un accord"
onclick="javascript:demander_accord_opt('<?= $idDetail ?>');">
</td>
<?php elseif($ententePrealable=='9'): ?>
<td colspan="2" align='center' width="8%">
<INPUT TYPE="button" class="form-control" style="background-color:red; color:#fff;" value="Accord refusé">
</td>
<?php endif; ?>
<?php else: ?>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['valeurActe'])) ?>"
onkeyup="controle_numerique(this);" onblur="ajax_maj_valeurActe_detailoptique('<?=$idDetail?>', this.value, this,'<?=$idOptique?>');formatMonetaire(this);" disabled>
</td>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="number" value="<?= format_N($this->nettoyer($v['quantite'])) ?>"
onblur="ajax_maj_quantite_detailoptique('<?=$idDetail?>', this.value, this,'<?=$idOptique?>');" disabled>
</td>
<?php endif; ?>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['fraisReel'])) ?>" disabled>
</td>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['montantTm'])) ?>" disabled>
</td>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['montantArembourser'])) ?>" disabled>
</td>
<td align='center' width="8%" >
<INPUT class="form-control text-center" TYPE="text" value="<?= format_N($this->nettoyer($v['fraisExclu'])) ?>" disabled>
</td>
<td align='center' width="8%">
<INPUT class="form-control text-center" TYPE="text" value="<?= $soldeNew ?>" disabled>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<?php
$nbActesMonture = $this->nettoyer($prescription['nbActesMonture']);
$agePrescription = $this->nettoyer($prescription['agePrescription']);
$bonCaduc = $this->nettoyer($prescription['bonCaduc']);
?>
<?php if($bonCaduc=="0" or $modeSaisieFacture==1) : ?>
<?php $nbLivre = 0; ?>
<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'])) ?>" disabled 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'])) ?>" disabled 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'])) ?>" disabled style="text-align: center; font-size:12pt; color:red;" > </td>
</tr>
</tbody>
</table>
</div>
<input type="text" id="nbLivre" name="nbLivre" value="<?= $nbLivre ?>" >
<input type="text" id="prixActe" name="prixActe" value="<?= $this->nettoyer($prescription['fraisRetenuLivre']) ?>" >
<input type="text" id="cout" name="cout" value="<?= $this->nettoyer($prescription['fraisReelLivre']) ?>" >
<input 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'])) ?>" >
<?php else: ?>
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
<H4 align="center" > Age => <?= $this->nettoyer($prescription['agePrescription']) . " "._("jours") . " => " . _("BON CADUC") ?> </H4>
</div>
<?php endif; ?>
</div>