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

219 lines
11 KiB
PHP
Executable File

<div id="div_verification_facture">
<?php
$idFacture = $this->nettoyer($facture_pop['idFacture']);
$_SESSION['idAdherent_C'] = $this->nettoyer($facture_pop['idAdherent']);
$actVisible = $_SESSION['actVisible'];
$codeTypeAffection = $this->nettoyer($facture_pop['codeTypeAffection']);
$codeAffection = $this->nettoyer($facture_pop['codeAffection']);
if (est_anglophone())
{
$libelleAffection = $this->nettoyer($facture_pop['libelleAffectionEng']);
}
else
{
$libelleAffection = $this->nettoyer($facture_pop['libelleAffection']);
}
$AffectionVisible = $_SESSION['AffectionVisible'];
if($AffectionVisible!="1")
{
$libelleAffection = $codeAffection;
}
$fact_exclue = $this->nettoyer($facture_pop['valide']=="2");
?>
<input class="sr-only" type="text" id="ndPrestNonTraites" name="ndPrestNonTraites" value="<?= $this->nettoyer($prestations_total['ndPrestNonTraites']) ?>" >
<input class="sr-only" type="text" id="fraisRetenu_fact" name="fraisRetenu_fact" value="<?= $this->nettoyer($facture_pop['fraisRetenu']) ?>" >
<input class="sr-only" type="text" id="fraisRetenu_dec" name="fraisRetenu_dec" value="<?= $this->nettoyer($prestations_total['fraisRetenu']) ?>" >
<input class="sr-only" type="text" id="idFacture" name="idFacture" value="<?= $this->nettoyer($facture_pop['idFacture']) ?>" >
<input class="sr-only" type="text" id="codeTypeFacture" name="codeTypeFacture" value="<?= $this->nettoyer($facture_pop['codeTypeFacture']) ?>" >
<input class="sr-only" type="text" id="valide_dec" name="valide_dec" value="<?= $this->nettoyer($facture_pop['valide']) ?>" >
<input class="sr-only" type="text" id="montantForce_dec" name="montantForce_dec" value="<?= format_N($this->nettoyer($prestations_total['montantForce'])) ?>" >
<input class="sr-only" type="text" id="montantApayer_dec" name="montantApayer_dec" value="<?= format_N($this->nettoyer($prestations_total['montantApayer'])) ?>" >
<input class="sr-only" type="text" id="montantRedresse_dec" name="montantRedresse_dec" value="<?= format_N($this->nettoyer($prestations_total['montantRedresse'])) ?>" >
<table class="table table-responsive table-condensed" style='font-size:8pt;'>
<tbody>
<tr>
<td width="10%">Date</td>
<td colspan="3" width="40%"> <INPUT style='font-size:10pt;text-align:center;' class="form-control" TYPE="text" value="<?= dateheureLang($this->nettoyer($facture_pop['dateSysteme'])) ?>" readonly ></td>
<td width="10%" align="center"> <?= _("No Bon") ?> </td>
<td width="15%" align="center" style='font-size:10pt; background-color:blue;color:white;'> <?= $facture_pop['numeroBonOrdonnance'] ?> </td>
<td width="10%" align="center"> <?= _("Frais") ?> </td>
<td width="15%" > <INPUT style='font-size:10pt;text-align:center;' class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($facture_pop['prixManuel'])) ?>" readonly ></td>
</tr>
<tr>
<td> <?= _("T M") ?> </td>
<td width="15%"> <INPUT style='font-size:10pt; color:red;text-align:center;' class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($facture_pop['montantTm'])) ?>" readonly ></td>
<td width="10%" align="center"> <?= _("A Remb") ?> </td>
<td width="15%"> <INPUT style='font-size:10pt;text-align:center;' class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($facture_pop['montantArembourser'])) ?>" readonly ></td>
<td align="center"> <?= _("Dépas") ?> </td>
<td> <INPUT style='font-size:10pt; color:red;text-align:center;' class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($facture_pop['fraisExclu'])) ?>" readonly ></td>
<td align="center"> <?= _("Retenu") ?> </td>
<td> <INPUT style='font-size:10pt; color:blue;text-align:center;' class="form-control" TYPE="text" value="<?= format_N($this->nettoyer($facture_pop['fraisRetenu'])) ?>" readonly ></td>
</tr>
<tr>
<td> <?= _("Affection") ?> </td>
<td colspan="7">
<INPUT style='font-size:10pt; text-align:center;' class="form-control" TYPE="text" value="<?= $libelleAffection ?>" readonly >
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
<thead>
<tr>
<tr>
<th> <?= _("Médicaments") ?> </th>
<th style="text-align:center"> <?= _("Public") ?> </th>
<th style="text-align:center"> <?= _("Phcie") ?> </th>
<th style="text-align:center"> <?= _("Qté") ?> </th>
<th style='text-align:center'> <?= _("Frais") ?> </th>
<th style='text-align:center'> <?= _("T M") ?> </th>
<th style='text-align:center'> <?= _("A Remb") ?> </th>
<th style='text-align:center'> <?= _("Forcé") ?> </th>
<th style='text-align:center'> <?= _("A payer") ?> </th>
<th style='text-align:center'> <?= _("Redres") ?> </th>
<th style='text-align:center'>Val</th>
<th style='text-align:center'>Rej</th>
<th style='text-align:center'>Excl</th>
</tr>
</thead>
<tfoot>
<tr>
<td style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['valeurActe'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['valeurActeManuel'])) ?></td>
<td ></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['fraisReel'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantTm'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantArembourser'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantForce'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantApayer'])) ?></td>
<td align='center'><?= format_N($this->nettoyer($prestations_total['montantRedresse'])) ?></td>
<td colspan="3"> </td>
</tr>
<tr>
<td colspan="3"><input id="btn_valid_facture" name="btn_valid_facture" class = "form-control btn btn-primary" type="button" value="<?= _("Enregistrer") ?>" onClick="valider_facture_dec_pha();" style='font-size:8pt;' ></td>
<td> </td>
<td colspan="9"><input id="btn_reinit_facture" name="btn_reinit_facture" class = "form-control btn btn-primary" type="button" value="<?= _("Ré-initialiser") ?>" onClick="reinit_facture_dec_pha();" style='font-size:8pt;' ></td>
</tr>
</tfoot>
<tbody>
<?php foreach ($prestations as $prestation):
$idPrestationactes_temp = $this->nettoyer($prestation['id']);
$idPrestationactes = $this->nettoyer($prestation['idPrestationactes']);
$codeTypePrestation = $this->nettoyer($prestation['codeTypePrestation']);
$ententePrealable = $this->nettoyer($prestation['ententePrealable']);
$autorisation = $this->nettoyer($prestation['autorisation']);
$valide = $prestation['valide'];
$ajPharmacie = $this->nettoyer($prestation['ajPharmacie']);
$valeurActe = $this->nettoyer($prestation['valeurActe']);
$valeurActeManuel = $this->nettoyer($prestation['valeurActeManuel']);
$gap = $valeurActe - $valeurActeManuel;
?>
<?php if($ajPharmacie=="1") : ?>
<tr valign="top" style="background-color: rgb(0, 142, 142);">
<?php else: ?>
<?php if($ententePrealable=='2' || $autorisation=='2'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable=='1' || $autorisation=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable=='9' || $autorisation=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<?php endif; ?>
<td width="30%"> <?= $this->nettoyer($prestation['libelleMedicament']) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($prestation['valeurActe'])) ?></td>
<td align='center'>
<input type="button" value="<?= format_N($this->nettoyer($prestation['valeurActeManuel'])) ?>"
onClick="javascript:alert('<?= $gap ?>');">
</td>
<td align='center'> <?= $this->nettoyer($prestation['quantite']) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['prixManuel'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
<?php if($ententePrealable>'1' || $autorisation>'1' || $fact_exclue): ?>
<td width="10%" align='center'> <?= format_N($this->nettoyer($prestation['montantForce'])) ?></td>
<?php else: ?>
<td width="10%">
<INPUT class="form-control" style='text-align:center' TYPE="number" value="<?= $this->nettoyer($prestation['montantForce']) ?>"
onChange="this.value=supprimer_espace_nombre(this.value);if(controle_numerique(this)){maj_montantForce_prestation_pha('<?=$idPrestationactes_temp?>', this.value);}">
</td>
<?php endif; ?>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantApayer'])) ?></td>
<td align='center'> <?= format_N($this->nettoyer($prestation['montantRedresse'])) ?></td>
<?php if($ententePrealable>'1' || $autorisation>'1'): ?>
<td align='center'> <input type="checkbox" disabled ></td>
<td align='center'> <input type="checkbox" disabled ></td>
<td align='center'> <input type="checkbox" disabled ></td>
<?php else: ?>
<?php if($valide=='1'): ?>
<td align='center'> <input type="checkbox" checked value="<?= $valide ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};valider_prestation_pha('<?=$idPrestationactes_temp?>', this.value);"></td>
<?php else: ?>
<td align='center'> <input type="checkbox" value="<?= $valide ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};valider_prestation_pha('<?=$idPrestationactes_temp?>', this.value);"></td>
<?php endif; ?>
<?php if($valide=='9'): ?>
<td align='center'> <input type="checkbox" checked value="<?= $valide ?>" onClick="javascript:if(this.value=='9'){this.value='0'}else{this.value='9'};valider_prestation_pha('<?=$idPrestationactes_temp?>', this.value);"></td>
<?php else: ?>
<td align='center'> <input type="checkbox" value="<?= $valide ?>" onClick="javascript:if(this.value=='9'){this.value='0'}else{this.value='9'};valider_prestation_pha('<?=$idPrestationactes_temp?>', this.value);"></td>
<?php endif; ?>
<?php if($valide=='2'): ?>
<td align='center'> <input type="checkbox" checked value="<?= $valide ?>" disabled ></td>
<?php else: ?>
<td align='center'> <input type="checkbox" value="<?= $valide ?>" disabled ></td>
<?php endif; ?>
<?php endif; ?>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="12" height="8"></td>
</tr>
</tbody>
</table>
<div id="div_limites">
</div>
</div>