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

132 lines
5.4 KiB
PHP
Executable File

<div class="col-lg-20">
<input type="hidden" id="idBaremePriseEnCharge" name="idBaremePriseEnCharge" value="<?=$_SESSION['idBaremePriseEnCharge']?>">
<input type="hidden" id="idTauxCouverture" name="idTauxCouverture" value="<?=$_SESSION['idTauxCouverture']?>">
<input type="hidden" id="ligne1" name="ligne1" value="<?=count($garantiesdispos);?>">
<input type="hidden" id="ligne2" name="ligne2" value="<?= count($garantiesajoutees);?>">
<div id="div_garantiesproductionlienparente_1" class="table-responsive">
<table id="tab_ent_garantiesproductionlienparente_1" class="table table-condensed table-responsive">
<tbody>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;"><?= _("Garanties disponibles") ?></td>
<td>
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne1" name="nbligne1" value="Nbre Lignes :<?= format_N(count($garantiesdispos));?>" readonly>
</td>
</tr>
</tbody>
</table>
<table id="tab_garantiesproductionlienparente_1" class="table table-striped table-bordered table-hover table-condensed table-responsive tabspeciale compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <?= _("Code") ?> </th>
<th style='text-align:center'> <?= _("Nom") ?> </th>
<th style='text-align:center'> => </th>
</tr>
<tr>
<td colspan="4">
<button id="btn_ajout_tous" type="button" style="font-size:10pt; width:100%;" class="form-control btn btn-primary"
onclick="javascript:ajouter_toutes_garantiesbareme();" >
<?= "============================ "._("Ajouter Tous")." ============================>" ?>
</button>
</td>
</tr>
</thead>
<tbody>
<?php foreach ($garantiesdispos as $v):
$idGarantie = $this->nettoyer($v['id']);
$codeGarantie = $this->nettoyer($v['codeGarantie']);
$nomGarantie = $this->nettoyer($v['libelle']);
if (est_anglophone())
{
$nomGarantie = $this->nettoyer($v['libelleEng']);
}
?>
<tr valign="top">
<td><?= $codeGarantie; ?></td>
<td><?= $nomGarantie; ?></td>
<td align='center'>
<input type="button" value="=>" onClick="javascript:ajouter_une_garantiebareme('<?=$codeGarantie?>');"
style="font-size:10pt; width:30px;" >
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
<div id="div_garantiesproductionlienparente_2" class="table-responsive">
<table class="table table-condensed table-responsive">
<tbody>
<tr>
<td align='center' style="font-size:18pt; font-weight:bold; vertical-align: middle;">
<?= _("Garanties ajoutées") ?>
</td>
<td >
<input class="form-control" style="text-align: center; font-size:10pt;" type="text" id="nbligne2" name="nbligne2"
value="Nbre Lignes : <?= Format_N(count($garantiesajoutees))?>" readonly>
</td>
</tr>
</tbody>
</table>
<table class="table table-striped table-bordered table-hover table-condensed table-responsive tabspeciale compact" style="font-size:8pt;">
<thead>
<tr>
<th style='text-align:center'> <= </th>
<th style='text-align:center'> <?= _("Code") ?> </th>
<th style='text-align:center'> <?= _("Nom") ?> </th>
</tr>
<tr>
<td colspan="4">
<button type="button" id="btn_retire_tous" style="font-size:10pt; width:100%;" class="form-control btn btn-danger" onclick="javascript:retirer_toutes_garantiesbareme();" >
<?= "<================== " . _("Retirer Tous")." ==================" ?>
</button>
</td>
</tr>
</thead>
<tbody>
<?php foreach ($garantiesajoutees as $v):
$idGarantie = $this->nettoyer($v['id']);
//var_dump($idGarantie);
$codeGarantie = $this->nettoyer($v['codeGarantie']);
$nomGarantie = $this->nettoyer($v['libelle']);
$plafondModifiable = $this->nettoyer($v['plafondModifiable']);
if (est_anglophone())
{
$nomGarantie = $this->nettoyer($v['libelleEng']);
}
?>
<?php if($plafondModifiable=='1'): ?>
<tr valign="top" ondblclick="javascript:afficher_actes_garantiebareme(<?=$idGarantie?>,'<?=$codeGarantie?>');">
<td align='center'>
<input type="button" value="<=" onclick="javascript:retirer_une_garantiebareme('<?=$codeGarantie?>');"
style="font-size:10pt; width:30px;">
</td>
<td align="center">
<input type="button" style='font-size:10pt;' class="form-control btn btn-primary" id="btn_garantie" value="<?= $codeGarantie ?>"
onClick="javascript:afficher_actes_garantiebareme(<?=$idGarantie?>,'<?=$codeGarantie?>');" >
</td>
<td><?= $nomGarantie ?></td>
</tr>
<?php else: ?>
<tr valign="top" ondblclick="javascript:afficher_actes_garantiebareme(<?=$idGarantie?>,'<?=$codeGarantie?>');">
<td align='center'>
<input type="button" value="<=" onclick="javascript:retirer_une_garantiebareme('<?=$codeGarantie?>');"
style="font-size:10pt; width:30px;">
</td>
<td align="center"><?= $codeGarantie ?></td>
<td><?= $nomGarantie ?></td>
</tr>
<?php endif; ?>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="modal fade" id="div_actesgarantiebareme" role="dialog">
</div>