This commit is contained in:
KONE SOREL 2026-03-29 09:57:50 +00:00
parent df100148ee
commit d7fa46df8e

View File

@ -1,61 +1,42 @@
<?php
// Sécurisation des dates par défaut
$dateEffetPolice = dateLang($this->nettoyer($sppoliceentete['dateEffet']), $_SESSION['lang']);
$dateEffetPolice = dateLang($this->nettoyer($sppoliceentete['dateEffet']), $_SESSION['lang']);
$_SESSION['dateFinRequete'] = dateCouranteLang($_SESSION['lang']);
?>
<div id="div_ente_requete" class="card border-0 shadow-sm bg-light mb-2" style="border-radius: 12px;">
<div class="card-body p-3">
<div class="row g-3 align-items-end">
<div class="col-12 col-md-5">
<div class="col-12 col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase mb-1">
<i class="fas fa-calendar-alt me-1 text-primary"></i> <?= _("Période de recherche") ?>
</label>
<div class="input-group input-group-sm">
<div class="input-group input-group-sm shadow-xs">
<input class="form-control text-center fw-bold bg-white" type="text" id="dateFacture1" name="dateFacture1"
value="<?= $dateEffetPolice; ?>" readonly>
<span class="input-group-text bg-white fw-bold border-start-0 border-end-0"><?= _("au") ?></span>
<span class="input-group-text bg-white fw-bold border-start-0 border-end-0 text-primary"><?= _("au") ?></span>
<input class="form-control datepicker text-center fw-bold" type="text" id="dateFacture2" name="dateFacture2"
value="<?= $_SESSION['dateFinRequete'] ?>" required>
</div>
</div>
<div class="col-6 col-md-2">
<label class="form-label small fw-bold text-muted text-uppercase mb-1"><?= _("Lignes") ?></label>
<div class="input-group input-group-sm">
<span class="input-group-text bg-dark text-white"><i class="fas fa-list-ol"></i></span>
<div class="col-6 col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase mb-1"><?= _("Lignes trouvées") ?></label>
<div class="input-group input-group-sm shadow-xs">
<span class="input-group-text bg-dark text-white border-dark"><i class="fas fa-list-ol"></i></span>
<input class="form-control text-center bg-white fw-bold" type="text" id="nbligne" name="nbligne" value="0" readonly>
</div>
</div>
<div class="col-6 col-md-5">
<div class="d-flex gap-2">
<button type="button" class="btn btn-primary btn-sm flex-grow-1 fw-bold shadow-sm" onclick="requetes_resume_sinistres();">
<i class="fas fa-search me-2"></i><?= _("Afficher") ?>
</button>
<button type="button" class="btn btn-success btn-sm flex-grow-1 fw-bold shadow-sm" onclick="requetes_resume_sinistres_export();">
<i class="fas fa-file-excel me-2"></i><?= _("Exporter") ?>
</button>
</div>
<div class="col-6 col-md-3">
<button type="button" class="btn btn-primary btn-sm w-100 fw-bold shadow-sm py-2" onclick="requetes_resume_sinistres();">
<i class="fas fa-search me-2"></i><?= _("Afficher les données") ?>
</button>
</div>
</div>
</div>
</div>
<div id="div_export_a" class="mt-2">
</div>
<script>
$(document).ready(function() {
// Initialisation du datepicker sur le champ de fin uniquement
// puisque le champ de début est en lecture seule (lié à l'effet de la police)
$('.datepicker').datepicker({
format: 'dd/mm/yyyy',
autoclose: true,
language: '<?= $_SESSION['lang'] == 'en' ? 'en' : 'fr' ?>'
});
});
</script>
<div id="div_detail_requete"></div>