radiantprestation/Vue/Consommables/index.php

120 lines
5.1 KiB
PHP

<?php
$this->titre = "INTER-SANTE - Consommables / Consumables";
$nomsearch = "";
$actVisible = $_SESSION['p_actVisible'];
$facturerConsommable = $_SESSION['p_facturerConsommable'];
?>
<input class="sr-only" type="text" id="codeTypePrestation" name="codeTypePrestation" value="CSM">
<INPUT class="sr-only" TYPE="text" id="facturerConsommable" name="facturerConsommable" value="<?= $facturerConsommable ?>">
<legend> <?= _("Consommables") ?> </legend>
<div id="div_fraisExclu">
<input class="sr-only" type="text" id="fraisExclu" name="fraisExclu" value="0" >
</div>
<div id="div_test">
</div>
<?php if($facturerConsommable!="1") : ?>
<div class="alert alert-danger" style="height:30px; padding:5px; text-align:center;" >
<H4> <?= _("CONSOMMBALES NON FACTURES") ?> </H4>
</div>
<?php else: ?>
<div id="div_listeconsommable">
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:10pt;'>
<thead>
<tr>
<th width="45%" style="text-align:center"> <?= _("Nom Consommable") ?> </th>
<th width="10%" style="text-align:center"> <?= _("Qté") ?> </th>
<th width="20%" style="text-align:center"> <?= _("Valeur") ?> </th>
<th style="text-align:center"> Action </th>
</tr>
<tbody>
<tr>
<td> <input type="text" class="form-control" id="libelleconsommable" name="libelleconsommable" autofocus style='font-size:10pt;' ></td>
<td align='center'>
<input class="form-control"style="text-align: center; font-size:10pt;" type="number" id="quantiteconsommable" name="quantiteconsommable" value="0"
onBlur="controle_numerique(this);" >
</td>
<td align='center'>
<input class="form-control"style="text-align: center; font-size:10pt;" type="number" id="prixconsommable" name="prixconsommable" value="0"
onBlur="controle_numerique(this);" >
</td>
<td> <input type="button" class = "form-control btn btn-info" style='font-size:10pt;' value="<?= _("Ajouter") ?>" onclick="javascript:enregistrer_nv_consommables()();" /></td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style='font-size:9pt;'>
<thead>
<tr>
<th rowspan="2" width="5%" style="text-align:center"> <input class="form-control btn btn-primary" type="button" value=" - - " onClick="javascript:retirer_consommable_tous();" style='font-size:10pt;' > </th>
<th rowspan="2" width="40%" style="text-align:center"> <?= _("Nom") ?> </th>
<th colspan="2" width="10%" style="text-align:center"> <?= _("Qté") ?> </th>
<th colspan="2" width="20%" style="text-align:center"> <?= _("Valeur") ?> </th>
<th rowspan="2" width="10%" style="text-align:center"> <?= _("Frais") ?> </th>
<th rowspan="2" width="5%" style="text-align:center"> <?= _("T M") ?> </th>
<th rowspan="2" width="10%" style="text-align:center"> <?= _("A Remb") ?> </th>
</tr>
<tr>
<th width="4%" style="text-align:center"> <?= _("Anc") ?> </th>
<th style="text-align:center"> <?= _("Nouv") ?> </th>
<th width="8%" style="text-align:center"> <?= _("Anc") ?> </th>
<th style="text-align:center"> <?= _("Nouv") ?> </th>
</tr>
</thead>
<tbody>
<?php foreach ($consommables as $consommable):
$idConsommable = $this->nettoyer($consommable['id']);
$libelleConsommable = $this->echapper($consommable['libelleActe']);
$libelleConsommable2= $this->nettoyer($consommable['libelleActe']);
$valeurActe = $this->nettoyer($consommable['valeurActe']);
?>
<tr valign="top">
<td align='center'> <input type="button" value=" - " onClick="javascript:retirer_consommable('<?= $idConsommable ?>');"></td>
<td align='center' >
<?php if($actVisible=="1"): ?>
<?= $libelleConsommable2 ?>
<?php else: ?>
<?= _("Consommables") ?>
<?php endif; ?>
</td>
<td align='center'> <?= format_N($this->nettoyer($consommable['quantite'])) ?> </td>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($consommable['quantite']) ?>"
onBlur="ajax_maj_qte_consommable('<?=$idConsommable?>', this.value, this);">
</td>
<td align='center'> <?= format_N($this->nettoyer($consommable['valeurActe'])) ?> </td>
<td align='center'>
<INPUT style='text-align:center; font-size:9pt;' class="form-control" TYPE="text" value="<?= $this->nettoyer($consommable['valeurActe']) ?>"
onBlur="ajax_maj_prix_consommable('<?=$idConsommable?>', this.value, this);">
</td>
<td align='center'> <?= format_N($this->nettoyer($consommable['fraisReel'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($consommable['montantTm'])) ?> </td>
<td align='center'> <?= format_N($this->nettoyer($consommable['montantArembourser'])) ?> </td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<?php endif; ?>