305 lines
12 KiB
PHP
Executable File
305 lines
12 KiB
PHP
Executable File
<?php
|
|
$actVisible = $_SESSION['p_actVisible'];
|
|
|
|
$idProforma = is_array($enteteProforma) ? $enteteProforma['id'] : "0";
|
|
$motifProforma = is_array($enteteProforma) ? $enteteProforma['motif'] : "";
|
|
$codeMedecinProforma = is_array($enteteProforma) ? $enteteProforma['codeMedecin'] : "";
|
|
$dureeProforma = is_array($enteteProforma) ? $enteteProforma['duree'] : "0";
|
|
|
|
$demandeTraite = $_SESSION['p_demandeTraite_C'];
|
|
|
|
$codeReponseEntentePrealable = $_SESSION['p_codeReponseEntentePrealable_C'];
|
|
|
|
|
|
?>
|
|
|
|
<input class="sr-only" id="idProforma" name="idProforma" type="text" value= "<?= $idProforma ?>">
|
|
<input class="sr-only" id="motifProforma" name="motifProforma" type="text" value= "<?= $motifProforma ?>">
|
|
<input class="sr-only" id="codeMedecinProforma" name="codeMedecinProforma" type="text" value= "<?= $codeMedecinProforma ?>">
|
|
<input class="sr-only" id="dureeProforma" name="dureeProforma" type="text" value= "<?= $dureeProforma ?>">
|
|
<input class="sr-only" id="numeroEntentePrealable" name="numeroEntentePrealable" type="text" value= "<?= $numeroEntentePrealable ?>">
|
|
|
|
<input class="sr-only" id="nbreActe" name="nbreActe" type="text" value= "<?= count($prestations); ?>">
|
|
|
|
<input class="sr-only" id="ligneZero" name="ligneZero" type="text" value= "<?=$ligneZero;?>">
|
|
<input class="sr-only" id="demandeTraite" name="demandeTraite" type="text" value= "<?=$demandeTraite;?>">
|
|
|
|
|
|
<?php if($demandeTraite=="0"):?>
|
|
<div >
|
|
<input class="form-control" style="text-align: center; font-size: 12pt;font-weight: bold;" type="text" value="<?= _("Liste des prestations")?>" readonly > </td>
|
|
</div>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="5%" style='text-align:center'> <?= _("Suppr") ?> </th>
|
|
<th style="text-align:center"> <?= _("Acte") ?> </th>
|
|
<th style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
|
|
<th width="5%" style="text-align:center"> <?= _("Quantité") ?> </th>
|
|
<th style="text-align:center"> <?= _("Prix Total") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<?php
|
|
$prestation_total_reclame = $this->nettoyer($prestations_total['totalPrixManuel']);
|
|
?>
|
|
<tr>
|
|
<td colspan="4" style='text-align:center'> <?= _("Total (".count($prestations).")") ?> </td>
|
|
<td align='center'><?= format_N($prestation_total_reclame) ?></td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
foreach ($prestations as $prestation):
|
|
$idPrestationactes=$this->nettoyer($prestation['id']);
|
|
$supprimable = $prestation['supprimable'];
|
|
$codeTypePrestation=$this->nettoyer($prestation['codeTypePrestation']);
|
|
$ententePrealable=$this->nettoyer($prestation['ententePrealable']);
|
|
$autorisation=$this->nettoyer($prestation['autorisation']);
|
|
$codeTarifActe=$this->nettoyer($prestation['codeTarifActe']);
|
|
|
|
|
|
$valeurActeManuel = $this->nettoyer($prestation['valeurActeManuel']);
|
|
|
|
$libelleConsommable=$this->nettoyer($prestation['libelleConsommable']);
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleActe = substr($this->nettoyer($prestation['libelleActeEng']),0,57);
|
|
}
|
|
else
|
|
{
|
|
$libelleActe = substr($this->nettoyer($prestation['libelleActe']),0,57);
|
|
}
|
|
|
|
$codeActe = $this->nettoyer($prestation['codeActe']);
|
|
|
|
if($codeActe == "CSM"){
|
|
$libelleActe = substr($libelleConsommable,0,57);
|
|
}
|
|
|
|
if($actVisible!="1")
|
|
{
|
|
$libelleActe = $codeActe;
|
|
}
|
|
$valeurActe = $this->nettoyer($prestation['valeurActe']);
|
|
|
|
$plafondActe = $this->nettoyer($prestation['plafondActe']);
|
|
|
|
//var_dump($plafondActe);
|
|
|
|
|
|
$plafond = (($plafondActe == $valeurActe) && ($valeurActe > "0"))?"1":"0";
|
|
|
|
if ($plafondActe > "0" && $plafondActe !="9999999999"){
|
|
$forfaitPlafond = " - [".format_N($plafondActe)."]";
|
|
}else{
|
|
$forfaitPlafond = "";
|
|
}
|
|
|
|
$prixTarif = $this->nettoyer($prestation['prixTarif']);
|
|
|
|
//var_dump($tarif);
|
|
|
|
|
|
$codeMotifDepassement = $this->nettoyer($prestation['codeMotifDepassement']);
|
|
|
|
$motif = $this->nettoyer($prestation['motif']);
|
|
$motifEng = $this->nettoyer($prestation['motifEng']);
|
|
|
|
$tarif = $this->nettoyer($prestation['tarif']);
|
|
|
|
$prixModifiableEnHospit = $this->nettoyer($prestation['prixModifiableEnHospit']);
|
|
|
|
$acteChambre = $this->nettoyer($prestation['acteChambre']);
|
|
?>
|
|
<tr valign="top">
|
|
<td>
|
|
<button type="button" class="form-control btn btn-danger" onClick="javascript:supprimer_acte_proforma_hospitalisation('<?= $idPrestationactes ?>', '<?= $codeTypePrestation ?>');">
|
|
<i class="fa fa-times" aria-hidden="true"></i>
|
|
</button>
|
|
</td>
|
|
<td > <?= $libelleActe."<b style='color:red'>".$forfaitPlafond."</b>" ?> </td>
|
|
|
|
<td align='center'>
|
|
<?php if($prixModifiableEnHospit == "0"): ?>
|
|
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
|
|
<?= format_N($valeurActeManuel) ?>
|
|
</button>
|
|
<?php else: ?>
|
|
<?php if($codeReponseEntentePrealable == ""): ?>
|
|
<INPUT style='text-align:center; font-size:10pt;' class="form-control" TYPE="text" value="<?= format_N($valeurActeManuel) ?>"
|
|
onChange="ajax_maj_prix_acte_proformahospitalisation('<?=$idPrestationactes?>', this.value, this);" onBlur="formatMonetaire(this);" onkeyup="controle_numerique(this);" onfocus="formatNumerique(this);">
|
|
<?php else: ?>
|
|
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
|
|
<?= format_N($valeurActeManuel) ?>
|
|
</button>
|
|
<?php endif; ?>
|
|
<?php endif; ?>
|
|
</td>
|
|
|
|
<?php if ($acteChambre=="0"): ?>
|
|
<?php if($codeReponseEntentePrealable == ""): ?>
|
|
<td align='center' width="8%">
|
|
<INPUT style='text-align:center; font-size:10pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($prestation['quantite']) ?>"
|
|
onChange="ajax_maj_qte_acte_proformahospitalisation('<?=$idPrestationactes?>', this.value, this);" onBlur="controle_numerique(this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td align='center' width="8%">
|
|
<INPUT style='text-align:center; font-size:10pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($prestation['quantite']) ?>"
|
|
disabled>
|
|
</td>
|
|
<?php endif; ?>
|
|
<?php else: ?>
|
|
<td align='center' width="8%">
|
|
<INPUT style='text-align:center; font-size:10pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($prestation['quantite']) ?>"
|
|
disabled>
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
|
|
|
|
<td align='center'> <?= format_N($this->nettoyer($prestation['prixManuel'])) ?></td>
|
|
<!--<td align='center'> <?= format_N($this->nettoyer($prestation['fraisReel'])) ?></td>
|
|
|
|
<td align='center'> <?= $this->nettoyer($prestation['tm'])?></td>
|
|
<td align='center'> <?= format_N($this->nettoyer($prestation['montantTm'])) ?></td>
|
|
<td align='center'> <?= format_N($this->nettoyer($prestation['montantArembourser'])) ?></td>
|
|
-->
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="5" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php else: ?>
|
|
<div id="div_legende_couleur" style="width:80%; margin: 5px;">
|
|
<table class="table table-responsive" style="width:100%; margin:auto;">
|
|
<tbody>
|
|
<tr>
|
|
<td width="15%" style="font-weight:bold; text-align:right;"><?= _("Accord assureur:") ?></td>
|
|
<td width="4%" style="background-color: #00ff00"></td>
|
|
<td width="2%"></td>
|
|
<td width="15%" style="font-weight:bold; text-align:right;"><?= _("Refus assureur:") ?></td>
|
|
<td width="4%" style="background-color: red;"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:10pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style="text-align:center"> <?= _("Acte <b style='color:red'> - [Plafond]</b>") ?> </th>
|
|
<th style="text-align:center"> <?= _("Prix Unitaire") ?> </th>
|
|
|
|
<th width="5%" style="text-align:center"> <?= _("Quantité") ?> </th>
|
|
<th style="text-align:center"> <?= _("Prix Total") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tfoot>
|
|
<?php
|
|
$prestation_total_reclame = $this->nettoyer($prestations_total['totalPrixManuel']);
|
|
?>
|
|
<tr>
|
|
<td colspan="3" style='text-align:center'> <?= _("Total (".count($prestations).")") ?> </td>
|
|
<td align='center'><?= format_N($prestation_total_reclame) ?></td>
|
|
</tr>
|
|
</tfoot>
|
|
|
|
<tbody>
|
|
|
|
<?php
|
|
foreach ($prestations as $prestation):
|
|
$idPrestationactes=$this->nettoyer($prestation['id']);
|
|
$supprimable = $prestation['supprimable'];
|
|
$codeTypePrestation=$this->nettoyer($prestation['codeTypePrestation']);
|
|
$ententePrealable=$this->nettoyer($prestation['ententePrealable']);
|
|
$autorisation=$this->nettoyer($prestation['autorisation']);
|
|
$codeTarifActe=$this->nettoyer($prestation['codeTarifActe']);
|
|
|
|
$codeTarifActe=$this->nettoyer($prestation['codeTarifActe']);
|
|
|
|
$valeurActeManuel = $this->nettoyer($prestation['valeurActeManuel']);
|
|
|
|
$libelleConsommable=$this->nettoyer($prestation['libelleConsommable']);
|
|
|
|
if (isset($_SESSION['p_lang']) && $_SESSION['p_lang']=="en_US")
|
|
{
|
|
$libelleActe = substr($this->nettoyer($prestation['libelleActeEng']),0,57);
|
|
}
|
|
else
|
|
{
|
|
$libelleActe = substr($this->nettoyer($prestation['libelleActe']),0,57);
|
|
}
|
|
|
|
$codeActe = $this->nettoyer($prestation['codeActe']);
|
|
|
|
if($codeActe == "CSM"){
|
|
$libelleActe = substr($libelleConsommable,0,57);
|
|
}
|
|
|
|
if($actVisible!="1")
|
|
{
|
|
$libelleActe = $codeActe;
|
|
}
|
|
$valeurActe = $this->nettoyer($prestation['valeurActe']);
|
|
|
|
$plafondActe = $this->nettoyer($prestation['plafondActe']);
|
|
|
|
|
|
$plafond = (($plafondActe == $valeurActe) && ($valeurActe > "0"))?"1":"0";
|
|
|
|
if ($plafondActe > "0" && $plafondActe !="9999999999"){
|
|
$forfaitPlafond = " - [".format_N($plafondActe)."]";
|
|
}else{
|
|
$forfaitPlafond = "";
|
|
}
|
|
|
|
$prixTarif = $this->nettoyer($prestation['prixTarif']);
|
|
|
|
|
|
$codeMotifDepassement = $this->nettoyer($prestation['codeMotifDepassement']);
|
|
|
|
$motif = $this->nettoyer($prestation['motif']);
|
|
$motifEng = $this->nettoyer($prestation['motifEng']);
|
|
|
|
$tarif = $this->nettoyer($prestation['tarif']);
|
|
|
|
$ententePrealable = $this->nettoyer($prestation['ententePrealable']);
|
|
|
|
$acteChambre = $this->nettoyer($prestation['acteChambre']);
|
|
|
|
?>
|
|
<?php if($ententePrealable=='1'): ?>
|
|
<tr valign="top" style="background-color: #00ff00;">
|
|
<?php elseif($ententePrealable=='9'): ?>
|
|
<tr valign="top" style="background-color: red;color:white;">
|
|
<?php else: ?>
|
|
<tr valign="top">
|
|
<?php endif; ?>
|
|
<td > <?= $libelleActe."<b style='color:red'>".$forfaitPlafond."</b>" ?> </td>
|
|
|
|
<td align='center'>
|
|
<button type="button" class="span_link" title="<?= _("Voir le tarif appliqué") ?>" onClick='javascript:tarif_applique("<?= $tarif ?>");'>
|
|
<?= format_N($valeurActeManuel) ?>
|
|
</button>
|
|
</td>
|
|
<td align='center' width="8%">
|
|
<INPUT style='text-align:center; font-size:10pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($prestation['quantite']) ?>"
|
|
disabled>
|
|
</td>
|
|
|
|
<td align='center'> <?= format_N($this->nettoyer($prestation['prixManuel'])) ?></td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
<tr style='background-color:white'>
|
|
<td colspan="4" height="8"></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
<?php endif; ?>
|