prestation/Vue/Ajaxdetailpharmacien/majprixmanuelpha.php
2025-12-05 10:42:46 +00:00

278 lines
14 KiB
PHP
Executable File

<div id="livraison">
<?php
$numeroBonOrdonnance = $_SESSION['p_numeroBonOrdonnance_C'];
$numeroPrescription = $_SESSION['p_numeroPrescription_C'] ;
$accesAjoutPh = ($_SESSION['p_accesAjoutPh_C']==1) ;
$accesAjoutPhClient = ($_SESSION['p_accesAjoutPhClient']==1) ;
$idPrestationactes = $this->nettoyer($prescription['idPrestationactes']);
$estRempalace=($prescription['numeroRemplace'] == $numeroBonOrdonnance);
$tm = ($_SESSION['p_tm_TP']>"0") ? $_SESSION['p_tm_TP'] : $_SESSION['p_tm_C'];
?>
<input class="sr-only" type="text" id="tm" name="tm" value="<?= $tm ?> ">
<input class="sr-only" type="text" id="numeroPrescription_C" name="numeroPrescription_C" value="<?= $numeroPrescription ?>" >
<div id="non_livre">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
<thead>
<tr>
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" + + " onClick="javascript:ajoutermedicament_pha_tous();" style='font-size:9pt;' > </th>
<th width="50%" > <?= _("Non livrés") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Forme") ?> </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"> <?= _("Total Public") ?> </th>
<th width="5%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="10%" style="text-align:center"> <?= _("A Remb") ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($detailnonlivres as $detailnonlivre):
$idNonLivre=$this->nettoyer($detailnonlivre['id']);
$valeurActe = $this->nettoyer($detailnonlivre['valeurActe']);
$substituable = $this->nettoyer($detailnonlivre['substituable']);
$substitue = $this->nettoyer($detailnonlivre['substitue']);
$nomSubstitut = $this->nettoyer($detailnonlivre['nomSubstitut']);
$libelleMedicament = $this->nettoyer($detailnonlivre['libelleMedicament']);
if($substituable=="1")
{
$libelleMedicament = $libelleMedicament . " => " . $nomSubstitut;
}
$ententePrealable2=$this->nettoyer($detailnonlivre['ententePrealable']);
$forme = $this->nettoyer($detailnonlivre['forme']);
if (est_anglophone()){$forme = $this->nettoyer($detailnonlivre['formeEng']);}
?>
<?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_pha('<?= $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:ajoutermedicament_pha('<?= $idNonLivre ?>');"></td>
<?php endif; ?>
<?php endif; ?>
<?php if($substituable=="1") : ?>
<td style="background-color: yellow;"> <?= $libelleMedicament ?> </td>
<?php else: ?>
<td> <?= $libelleMedicament ?> </td>
<?php endif; ?>
<td align='center'> <?= $forme ?> </td>
<td align='center'> <?= format_N($this->nettoyer($detailnonlivre['valeurActe'])) ?> </td>
<td align='center'> <?= $this->nettoyer($detailnonlivre['quantite']) ?> </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">
<div id="div_tableau_pha">
<?php $nbLivre = 0; ?>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
<thead>
<tr>
<th width="5%" style="text-align:center" > <input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirermedicament_pha_tous();" style='font-size:9pt;' > </th>
<th width="45%" > <?= _("A Livrer") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Forme") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Prix Unit Saisi") ?> </th>
<th width="5%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Total Saisi") ?> </th>
<th width="10%" style="text-align:center"> <?= _("T M") ?> </th>
<th width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="5" style='text-align:center'> Total </td>
<td align='center'><?= format_N($this->nettoyer($prescription['prixManuelLivre'])) ?></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']);
$substituable = $this->nettoyer($detaillivre['substituable']);
$substitue = $this->nettoyer($detaillivre['substitue']);
$ajPharmacie = $this->nettoyer($detaillivre['ajPharmacie']);
$typeSysteme = $this->nettoyer($detaillivre['typeSysteme']);
$ententePrealable3=$this->nettoyer($detaillivre['ententePrealable']);
$pharmacieInterne = $this->nettoyer($detaillivre['pharmacieInterne']);
$nbLivre++;
$forme = $this->nettoyer($detaillivre['forme']);
if (est_anglophone()){$forme = $this->nettoyer($detaillivre['formeEng']);}
?>
<?php if($ententePrealable3=='2' || $ententePrealable3=='3'): ?>
<tr valign="top" style="background-color: yellow;">
<?php elseif($ententePrealable3=='1'): ?>
<tr valign="top" style="background-color: #00ff00;">
<?php elseif($ententePrealable3=='9'): ?>
<tr valign="top" style="background-color: red;color:white;">
<?php else: ?>
<tr valign="top">
<?php endif; ?>
<td align='center'> <input type="button" value=" - " onClick="javascript:retirermedicament_pha('<?= $idLivre ?>');"></td>
<td> <?= $this->nettoyer($detaillivre['libelleMedicament']) ?> </td>
<td align='center'> <?= $forme ?> </td>
<?php if($pharmacieInterne=="1") : ?>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' id="valeurActeManuel<?=$nbLivre?>" class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['valeurActeManuel']) ?>"
onBlur="ajax_maj_prix_medicament_pha('<?=$idLivre?>', this.value, this);">
</td>
<?php else: ?>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' id="valeurActeManuel<?=$nbLivre?>" class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['valeurActeManuel']) ?>"
onBlur="maj_prixmanuel_pha('<?=$idLivre?>', '<?=$nbLivre?>', this.value, this);tableaulivre_pha();" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this););">
</td>
<?php endif; ?>
<?php if($ajPharmacie=="1") : ?>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($detaillivre['quantite']) ?>"
onBlur="maj_prixmanuel_pha('<?=$idLivre?>', '<?=$nbLivre?>', this.value, this);tableaulivre_pha();" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</td>
<?php else: ?>
<td align='center'>
<input type="text" id="quantite<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt; ' value=<?= format_N($this->nettoyer($detaillivre['quantite'])) ?> disabled>
</td>
<?php endif; ?>
<td align='center'>
<input type="text" id="prixManuel<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt;' value=<?= format_N($this->nettoyer($detaillivre['prixManuel'])) ?>
onChange="" disabled>
</td>
<td align='center'>
<input type="text" id="montantTm<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt; ' value=<?= format_N($this->nettoyer($detaillivre['montantTm'])) ?> disabled>
</td>
<td align='center'>
<input type="text" id="montantArembourser<?=$nbLivre?>" class="form-control text-center" style='font-size:10pt;' value=<?= format_N($this->nettoyer($detaillivre['montantArembourser'])) ?> disabled>
</td>
</tr>
<?php endforeach; ?>
<tr style='background-color:white'>
<td colspan="8" height="5"></td>
</tr>
</tbody>
</table>
</div>
<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>
<?php if(!$estRempalace) : ?>
<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"> <?= _("Garanties") ?> </th>
<th rowspan="2" style="text-align:center"> <?= _("Plafonds") ?> </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;color:white;" > <?= _("Garanties") ?> </th>
<th style="text-align:center;background-color:blue;color:white;" > <?= _("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>
<?php endif; ?>
<input class="sr-only" type="text" id="nbLivre" name="nbLivre" value="<?= $nbLivre ?>" >
<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="cout_f" name="cout_f" value="<?= format_N($this->nettoyer($prescription['fraisReelLivre'])) ?>" >
<input class="sr-only" type="text" id="montantTm_f" name="montantTm_f" value="<?= format_N($this->nettoyer($prescription['montantTmLivre'])) ?>" >
</div>
<div id="div_fraisExclu">
<input class="sr-only" type="text" id="fraisExcluLivre" name="fraisExcluLivre" value="<?= $this->nettoyer($prescription['fraisExcluLivre']) ?>" >
</div>
</div>