300 lines
14 KiB
PHP
300 lines
14 KiB
PHP
<div id="div_garanties">
|
|
<?php if($_SESSION['adminProd']=='1'): ?>
|
|
<div class="row">
|
|
<div id="div_garbase" class="col-xs-4" style="padding-right:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="30%" style='text-align:center'> <?= _("Imposer Limites?") ?> </th>
|
|
<th width="20%" align="center" style='text-align:center'>
|
|
<SELECT class="form-control" id="imposerPlafond" NAME="imposerPlafond" onChange="maj_college();">
|
|
<?php liste_options($ouinonimposerplafond, $_SESSION['imposerPlafond'], true); ?>
|
|
</SELECT>
|
|
</th>
|
|
|
|
<?php if($_SESSION['imposerPlafond']=='1'): ?>
|
|
<th width="20%" style='text-align:center'> <?= _("Anc Plaf") ?> </th>
|
|
<th width="20%" style='text-align:center'> <?= _("Nouv Plaf") ?> </th>
|
|
<?php else: ?>
|
|
<th width="20%" style='text-align:center'> <?= _("Tx") ?> </th>
|
|
<th width="20%" style='text-align:center'> <?= _("Plafond") ?> </th>
|
|
<?php endif; ?>
|
|
<th width="10%" style='text-align:center'> <?= _("Bn") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garantiesbase as $garantiebase):
|
|
$idGarbase=$this->nettoyer($garantiebase['id']);
|
|
$garantie = $this->nettoyer($garantiebase['garantie']);
|
|
if (est_anglophone())
|
|
{
|
|
$garantie = $this->nettoyer($garantiebase['garantieEng']);
|
|
}
|
|
?>
|
|
<tr valign="top">
|
|
<td colspan="2" align='center'><?= $garantie ?></td>
|
|
|
|
<?php if($_SESSION['imposerPlafond']=='1'): ?>
|
|
<td style='color:red' align='center'><?= format_N($this->nettoyer($garantiebase['plafond'])) ?></td>
|
|
<td>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($garantiebase['plafond']) ?>"
|
|
onChange="ajax_imposer_plafond('<?=$idGarbase?>', this.value, this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td>
|
|
<INPUT style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($garantiebase['tauxPlafond']) ?>"
|
|
onChange="ajax_maj_taux_plafond('<?=$idGarbase?>', this.value, this);">
|
|
</td>
|
|
|
|
<td style='color:red' align='center'><?= format_N($this->nettoyer($garantiebase['plafond'])) ?></td>
|
|
<?php endif; ?>
|
|
|
|
<?php if($garantiebase['champApplication']=='1'): ?>
|
|
<td align='center'> <input type="checkbox" checked value="<?php echo $garantiebase['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarbase ?>, this.value);"></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" value="<?php echo $garantiebase['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarbase ?>, this.value);"></td>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div id="div_garoptionnelle" class="col-xs-2" style="padding:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style='text-align:center'> <?= _("Garantie Optionnelles") ?> </th>
|
|
<th style='text-align:center'> => </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garoptionnelles as $garoptionnelle):
|
|
$codeGarantie=$this->nettoyer($garoptionnelle['codeGarantie']);
|
|
$idCol=$this->nettoyer($garoptionnelle['idCollegeTemp']);
|
|
$garantie = $this->nettoyer($garoptionnelle['libelle']);
|
|
if (est_anglophone())
|
|
{
|
|
$garantie = $this->nettoyer($garoptionnelle['libelleEng']);
|
|
}
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'><?= $garantie ?></td>
|
|
<?php if($idCol<='0'): ?>
|
|
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_une_garantie_college('<?= $codeGarantie ?>');"></td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div id="div_gar_opt_acquises" class="col-xs-6" style="padding:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="5%" style='text-align:center'> <= </th>
|
|
<th width="5%" style='text-align:center'> <?= _("Bn") ?> </th>
|
|
<th style='text-align:center'> <?= _("Garanties Optionnelles Acquises") ?> </th>
|
|
<th width="10%" style='text-align:center'> <?= _("Prime") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Nv Prime") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Plafond") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Nv Plaf") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garoptacquises as $garoptacquise):
|
|
$idGarantie = $this->nettoyer($garoptacquise['id']);
|
|
$gar_add = $this->nettoyer($garoptacquise['additionnelle']);
|
|
$gar = $this->nettoyer($garoptacquise['codeGarantie']) ;
|
|
$calculerPrime = $this->nettoyer($garoptacquise['calculerPrime']) ;
|
|
$garantie = $this->nettoyer($garoptacquise['garantie']);
|
|
if (est_anglophone())
|
|
{
|
|
$garantie = $this->nettoyer($garoptacquise['garantieEng']);
|
|
}
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_garantie_college(<?= $idGarantie ?>);"></td>
|
|
|
|
<?php if($garoptacquise['champApplication']=='1'): ?>
|
|
<td align='center'> <input type="checkbox" checked value="<?php echo $garoptacquise['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarantie ?>, this.value);"></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" value="<?php echo $garoptacquise['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarantie ?>, this.value);"></td>
|
|
<?php endif; ?>
|
|
|
|
<?php if($gar_add=='1'): ?>
|
|
<td>
|
|
<INPUT class="form-control" TYPE="text" value="<?= $garantie ?>"
|
|
onblur="controle_champ_obligatoire(this);" onChange="ajax_maj_lib_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td><INPUT class="form-control" TYPE="text" value="<?= $garantie ?>" readonly></td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'><?= format_N($this->nettoyer($garoptacquise['primeOption'])) ?></td>
|
|
|
|
<?php if($calculerPrime=='1'): ?>
|
|
<td align='center'><?= format_N($this->nettoyer($garoptacquise['primeOption'])) ?></td>
|
|
<?php else: ?>
|
|
<td align='center'>
|
|
<INPUT class="form-control" style='text-align:center' TYPE="text" value="<?=$this->nettoyer($garoptacquise['primeOption'])?>"
|
|
onChange="maj_prime_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'><?= format_N($this->nettoyer($garoptacquise['plafond'])) ?></td>
|
|
|
|
<td style='color:red' align='center'>
|
|
<INPUT class="form-control" style='text-align:center' TYPE="text" value="<?=$this->nettoyer($garoptacquise['plafond'])?>"
|
|
onChange="maj_plafond_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<?php else: ?>
|
|
<INPUT class="sr-only" TYPE="text" id="imposerPlafond" name="imposerPlafond" value="<?= $_SESSION['imposerPlafond'] ?>">
|
|
<div class="row">
|
|
<div id="div_garbase" class="col-xs-3" style="padding-right:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="50%"style='text-align:center'> <?= _("Garanties de Base") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Tx") ?> </th>
|
|
<th width="25%" style='text-align:center'> <?= _("Plafond") ?> </th>
|
|
<th width="10%" style='text-align:center'>Bn</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garantiesbase as $garantiebase):
|
|
$idGarbase=$this->nettoyer($garantiebase['id']);
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'><?= $this->nettoyer($garantiebase['garantie']) ?></td>
|
|
<td align='center'> <?= $this->nettoyer($garantiebase['tauxPlafond']) ?> </td>
|
|
<td style='color:red' align='center'><?= format_N($this->nettoyer($garantiebase['plafond'])) ?></td>
|
|
|
|
<?php if($garantiebase['champApplication']=='1'): ?>
|
|
<td align='center'> <input type="checkbox" checked value="<?php echo $garantiebase['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarbase ?>, this.value);"></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" value="<?php echo $garantiebase['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarbase ?>, this.value);"></td>
|
|
<?php endif; ?>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div id="div_garoptionnelle" class="col-xs-2" style="padding:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th style='text-align:center'> <?= _("Garantie Optionnelles") ?> </th>
|
|
<th style='text-align:center'> => </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garoptionnelles as $garoptionnelle):
|
|
$codeGarantie=$this->nettoyer($garoptionnelle['codeGarantie']);
|
|
$idCol=$this->nettoyer($garoptionnelle['idCollegeTemp']);
|
|
?>
|
|
<tr valign="top">
|
|
<td align='center'><?= $this->nettoyer($garoptionnelle['libelle']) ?></td>
|
|
<?php if($idCol<='0'): ?>
|
|
<td align='center'> <input type="button" value="=>" onClick="javascript:ajouter_une_garantie_college('<?= $codeGarantie ?>');"></td>
|
|
<?php else: ?>
|
|
<td> </td>
|
|
<?php endif; ?>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
|
|
<div id="div_gar_opt_acquises" class="col-xs-7" style="padding:0px;">
|
|
<fieldset>
|
|
<table class="table table-striped table-bordered table-hover table-condensed table-responsive" style="font-size:8pt;">
|
|
<thead>
|
|
<tr>
|
|
<th width="5%" style='text-align:center'> <= </th>
|
|
<th width="5%" style='text-align:center'>Bn</th>
|
|
<th style='text-align:center'> <?= _("Garanties Optionnelles Acquises") ?> </th>
|
|
<th width="10%" style='text-align:center'> <?= _("Prime") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Nv Prime") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Plafond") ?> </th>
|
|
<th width="15%" style='text-align:center'> <?= _("Nv Plaf") ?> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<?php foreach ($garoptacquises as $garoptacquise):
|
|
$idGarantie=$this->nettoyer($garoptacquise['id']);
|
|
$gar_add=$this->nettoyer($garoptacquise['additionnelle']);
|
|
$gar = $this->nettoyer($garoptacquise['codeGarantie']) ;
|
|
?>
|
|
|
|
<tr valign="top">
|
|
<td align='center'> <input type="button" value="<=" onClick="javascript:retirer_garantie_college(<?= $idGarantie ?>);"></td>
|
|
|
|
<?php if($garoptacquise['champApplication']=='1'): ?>
|
|
<td align='center'> <input type="checkbox" checked value="<?php echo $garoptacquise['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarantie ?>, this.value);"></td>
|
|
<?php else: ?>
|
|
<td align='center'> <input type="checkbox" value="<?php echo $garoptacquise['champApplication'] ; ?>" onClick="javascript:if(this.value=='1'){this.value='0'}else{this.value='1'};maj_champ_application_plafond(<?= $idGarantie ?>, this.value);"></td>
|
|
<?php endif; ?>
|
|
|
|
<?php if($gar_add=='1'): ?>
|
|
<td>
|
|
<INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($garoptacquise['garantie']) ?>"
|
|
onChange="ajax_maj_lib_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
<?php else: ?>
|
|
<td><INPUT class="form-control" TYPE="text" value="<?= $this->nettoyer($garoptacquise['garantie']) ?>" readonly></td>
|
|
<?php endif; ?>
|
|
|
|
<td align='center'><?= format_N($this->nettoyer($garoptacquise['primeOption'])) ?></td>
|
|
|
|
<td align='center'>
|
|
<INPUT class="form-control" style='text-align:center' TYPE="text" value="<?=$this->nettoyer($garoptacquise['primeOption'])?>"
|
|
onChange="maj_prime_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
|
|
<td align='center'><?= format_N($this->nettoyer($garoptacquise['plafond'])) ?></td>
|
|
|
|
<td style='color:red' align='center'>
|
|
<INPUT class="form-control" style='text-align:center' TYPE="text" value="<?=$this->nettoyer($garoptacquise['plafond'])?>"
|
|
onChange="maj_plafond_gar_opt('<?=$idGarantie?>', this.value, this);">
|
|
</td>
|
|
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</fieldset>
|
|
</div>
|
|
</div>
|
|
<?php endif; ?>
|
|
</div>
|