This commit is contained in:
KONE SOREL 2026-03-15 12:48:09 +00:00
parent d6730bd22e
commit d4ee3d47ea

View File

@ -1,26 +1,12 @@
<?php $this->titre = "INTER SANTE - Modification Garant"; ?>
<div class="page-content animate__animated animate__fadeIn">
<div class="header-section sticky-top mb-1" style="top: 0; z-index: 1020; margin: -1rem -1rem 1.5rem -1rem; padding: 1rem;">
<div class="d-flex align-items-center justify-content-between bg-white p-3 shadow border-start border-warning border-4" style="border-radius: var(--radius-md);">
<div class="d-flex align-items-center">
<div class="icon-shape bg-warning-light text-warning rounded-circle me-3" style="width: 45px; height: 45px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-edit fs-4"></i>
</div>
<div>
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase fs-5"><?= _("Modifier le Garant") ?></h4>
<p class="text-muted small mb-0 d-none d-md-block"><?= _("ID Système :") ?> <span class="fw-bold">#<?= $this->nettoyer($gc['id']) ?></span> — <?= $this->nettoyer($gc['libelle']) ?></p>
</div>
<div class="header-section mb-1">
<div class="d-flex align-items-center bg-white p-3 shadow-sm border-start border-warning border-4" style="border-radius: var(--radius-md);">
<div class="icon-shape bg-warning-light text-warning rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
<i class="fas fa-edit fs-4"></i>
</div>
<div class="d-flex gap-2">
<button type="button" class="btn btn-light rounded-pill px-3 fw-bold text-muted border shadow-sm btn-sm" onclick="retour_gc_assureur();">
<i class="fas fa-times me-1"></i> <?= _("Annuler") ?>
</button>
<button type="button" id="btn_enreg" class="btn btn-primary rounded-pill px-4 fw-bold shadow-sm btn-sm" onclick="enregistrer_modif_gc_assureur();">
<i class="fas fa-save me-1"></i> <?= _("Mettre à jour") ?>
</button>
<div class="flex-grow-1">
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= _("Modifier Informations Garant") ?></h4>
<p class="text-muted small mb-0"><?= _("ID Système :") ?> <span class="fw-bold">#<?= $this->nettoyer($gc['id']) ?></span></p>
</div>
</div>
</div>
@ -28,10 +14,10 @@
<form id="form_modifier_garant">
<input type="hidden" id="idGc" name="idGc" value="<?= $this->nettoyer($gc['id']) ?>">
<ul class="nav nav-tabs border-0 gap-2 mb-4" id="modifGarantTabs" role="tablist">
<ul class="nav nav-tabs border-0 gap-2 mb-1" id="modifGarantTabs" role="tablist">
<li class="nav-item">
<button class="nav-link active rounded-pill px-4 fw-bold shadow-xs" data-bs-toggle="tab" data-bs-target="#tab-identite" type="button">
<i class="fas fa-id-card me-2"></i><?= _("Identité") ?>
<i class="fas fa-id-card me-2"></i><?= _("Identité & Contacts") ?>
</button>
</li>
<li class="nav-item">
@ -41,7 +27,7 @@
</li>
<li class="nav-item">
<button class="nav-link rounded-pill px-4 fw-bold shadow-xs" data-bs-toggle="tab" data-bs-target="#tab-compta" type="button">
<i class="fas fa-file-invoice-dollar me-2"></i><?= _("Comptabilité") ?>
<i class="fas fa-file-invoice-dollar me-2"></i><?= _("Comptabilité & Réglements") ?>
</button>
</li>
</ul>
@ -51,31 +37,51 @@
<div class="tab-pane fade show active" id="tab-identite" role="tabpanel">
<div class="card border-0 shadow-sm p-4">
<div class="row g-3">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Code Garant") ?></label>
<input class="form-control bg-light border-2 fw-bold" type="text" id="codeGcAssureur" name="codeGcAssureur" value="<?= $this->nettoyer($gc['codeGcAssureur']) ?>" readonly>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Nom du Garant") ?> <span class="text-danger">*</span></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="libelle" name="libelle" value="<?= $this->nettoyer($gc['libelle']) ?>" required>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Code Garant") ?></label>
<input class="form-control bg-light border-2 fw-bold" type="text" id="codeGcAssureur" name="codeGcAssureur" value="<?= $this->nettoyer($gc['codeGcAssureur']) ?>" readonly>
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Type") ?></label>
<select name="typeGarant" id="typeGarant" class="form-select border-2">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Type Garant") ?> <span class="text-danger">*</span></label>
<select name="typeGarant" id="typeGarant" class="form-control selectpicker border-2" data-live-search="true">
<?= liste_options($gctypegarant, $this->nettoyer($gc['typeGarant']), true) ?>
</select>
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Représentant") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="representant" name="representant" value="<?= $this->nettoyer($gc['representant']) ?>">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Sigle") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="siglerepresentant" name="siglerepresentant" value="<?= $this->nettoyer($gc['siglerepresentant']) ?>">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Service") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="servicerepresentant" name="servicerepresentant" value="<?= $this->nettoyer($gc['siglerepresentant']) ?>">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Téléphone Garant") ?></label>
<input class="form-control shadow-none border-2" type="tel" id="telephoneGarant" name="telephoneGarant" value="<?= $this->nettoyer($gc['telephoneGarant']) ?>">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("E-mail") ?></label>
<input class="form-control shadow-none border-2" type="email" id="emailGcAssureur" name="emailGcAssureur" value="<?= $this->nettoyer($gc['email']) ?>">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Téléphone") ?></label>
<input class="form-control shadow-none border-2" type="tel" id="telephoneGarant" name="telephoneGarant" value="<?= $this->nettoyer($gc['telephoneGarant']) ?>">
<div class="col-md-4">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Téléphone Représentant") ?></label>
<input class="form-control shadow-none border-2" type="text" id="telephonerepresentant" name="telephonerepresentant" value="<?= $this->nettoyer($gc['telephonerepresentant']) ?>">
</div>
<div class="col-12">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Adresse Géo.") ?></label>
<input class="form-control majuscule border-2" type="text" id="adresseGeographique" name="adresseGeographique" value="<?= $this->nettoyer($gc['adresseGeographique']) ?>">
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Adresse Postale") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="adressePostale" name="adressePostale" value="<?= $this->nettoyer($gc['adressePostale']) ?>">
</div>
<div class="col-md-6">
<label class="form-label small fw-bold text-muted text-uppercase"><?= _("Adresse Géographique") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="adresseGeographique" name="adresseGeographique" value="<?= $this->nettoyer($gc['adresseGeographique']) ?>">
</div>
</div>
</div>
@ -84,29 +90,59 @@
<div class="tab-pane fade" id="tab-finance" role="tabpanel">
<div class="card border-0 shadow-sm p-4">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Commission Primes (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxCommissionGerant" name="gcTauxCommissionGerant" value="<?= $this->nettoyer($gc['gcTauxCommissionGerant']) ?>">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Commission sur Primes (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxCommissionGerant" name="gcTauxCommissionGerant" value="<?= $this->nettoyer($gc['gcTauxCommissionGerant']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Commission Sinistres (%)") ?></label>
<input class="form-control border-2 text-primary fw-bold" type="number" id="gcTauxFraisReel" name="gcTauxFraisReel" value="<?= $this->nettoyer($gc['gcTauxFraisReel']) ?>">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Taux Ristourne (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxRistourne" name="gcTauxRistourne" value="<?= $this->nettoyer($gc['gcTauxRistourne']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("TVA (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxTva" name="gcTauxTva" value="<?= $this->nettoyer($gc['gcTauxTva']) ?>">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Commission sur Sinistres (%)") ?></label>
<input class="form-control border-2 text-primary fw-bold" type="number" id="gcTauxFraisReel" name="gcTauxFraisReel" value="<?= $this->nettoyer($gc['gcTauxFraisReel']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Frais Nouvelle Carte") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteAfn" name="fraisCarteAfn" value="<?= format_N($gc['fraisCarteAfn']) ?>" onblur="formatMonetaire(this);">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Taux TVA (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxTva" name="gcTauxTva" value="<?= $this->nettoyer($gc['gcTauxTva']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Frais Renouvellement") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteRen" name="fraisCarteRen" value="<?= format_N($gc['fraisCarteRen']) ?>" onblur="formatMonetaire(this);">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Redressement (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxRedressement" name="gcTauxRedressement" value="<?= $this->nettoyer($gc['gcTauxRedressement']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Frais Ré-impression") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteImp" name="fraisCarteImp" value="<?= format_N($gc['fraisCarteImp']) ?>" onblur="formatMonetaire(this);">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Suspension (%)") ?></label>
<input class="form-control border-2 text-danger fw-bold" type="number" id="gcLimiteConsommation" name="gcLimiteConsommation" value="<?= $this->nettoyer($gc['gcLimiteConsommation']) ?>" step="1" min="0" max="100">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Provision (%)") ?></label>
<input class="form-control border-2" type="number" id="gcTauxProvision" name="gcTauxProvision" value="<?= $this->nettoyer($gc['gcTauxProvision']) ?>" min="0" max="100">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Seuil Remboursement Direct (%)") ?></label>
<input class="form-control border-2" type="number" id="seuilRdGarant" name="seuilRdGarant" value="<?= $this->nettoyer($gc['seuilRdGarant']) ?>" step="1" min="0" max="100">
</div>
<div class="col-12 mt-4 pt-3 border-top">
<h6 class="small fw-bold text-primary text-uppercase mb-3"><?= _("Frais de Cartes & Forfaits") ?></h6>
<div class="row g-3">
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Forfait Provision") ?></label>
<input class="form-control border-2" type="text" id="gcForfaitProvision" name="gcForfaitProvision" value="<?= format_N($this->nettoyer($gc['gcForfaitProvision'])) ?>" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Frais Nouvelle Carte") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteAfn" name="fraisCarteAfn" value="<?= format_N($this->nettoyer($gc['fraisCarteAfn'])) ?>" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Frais Renouvellement") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteRen" name="fraisCarteRen" value="<?= format_N($this->nettoyer($gc['fraisCarteRen'])) ?>" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</div>
<div class="col-md-3">
<label class="form-label small fw-bold text-muted"><?= _("Frais Ré-impression") ?></label>
<input class="form-control border-2" type="text" id="fraisCarteImp" name="fraisCarteImp" value="<?= format_N($this->nettoyer($gc['fraisCarteImp'])) ?>" onkeyup="controle_numerique(this);" onblur="formatMonetaire(this);">
</div>
</div>
</div>
</div>
</div>
@ -116,23 +152,39 @@
<div class="card border-0 shadow-sm p-4">
<div class="row g-3">
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Compte RD") ?></label>
<input class="form-control majuscule border-2" type="text" id="numerodeCompteComptableRD" name="numerodeCompteComptableRD" value="<?= $this->nettoyer($gc['numerodeCompteComptableRD']) ?>">
<label class="form-label small fw-bold text-muted"><?= _("Compte Remboursement Direct") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="numerodeCompteComptableRD" name="numerodeCompteComptableRD" value="<?= $this->nettoyer($gc['numerodeCompteComptableRD']) ?>">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Compte TP") ?></label>
<input class="form-control majuscule border-2" type="text" id="numerodeCompteComptableTP" name="numerodeCompteComptableTP" value="<?= $this->nettoyer($gc['numerodeCompteComptableTP']) ?>">
<label class="form-label small fw-bold text-muted"><?= _("Compte Tiers Payant") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="numerodeCompteComptableTP" name="numerodeCompteComptableTP" value="<?= $this->nettoyer($gc['numerodeCompteComptableTP']) ?>">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Mode Paiement") ?></label>
<select class="form-select border-2" id="codeModePaiementDemande" name="codeModePaiementDemande">
<label class="form-label small fw-bold text-muted"><?= _("N° Compte Contribuable") ?></label>
<input class="form-control majuscule shadow-none border-2" type="text" id="numeroCompteContribuable" name="numeroCompteContribuable" value="<?= $this->nettoyer($gc['numeroCompteContribuable']) ?>">
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Tarif Actes") ?></label>
<select name="codeTarifActe" id="codeTarifActe" class="form-control selectpicker border-2 w-100" data-live-search="true">
<?= liste_options($tarifActe, $this->nettoyer($gc['codeTarifActe']), false) ?>
</select>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Type Remboursement") ?></label>
<select class="form-control selectpicker border-2 w-100" id="codeTypeRemboursement" name="codeTypeRemboursement" data-live-search="true">
<?php liste_options($typeremboursement, $this->nettoyer($gc['codeTypeRemboursement']), true); ?>
</select>
</div>
<div class="col-md-4">
<label class="form-label small fw-bold text-muted"><?= _("Mode Paiement") ?> <span class="text-danger">*</span></label>
<select class="form-control selectpicker border-2 w-100" id="codeModePaiementDemande" name="codeModePaiementDemande" data-live-search="true" required>
<?= liste_options($modepaiement, $this->nettoyer($gc['codeModePaiementDemande']), true) ?>
</select>
</div>
<div class="col-md-6 mt-4">
<div class="p-3 bg-light rounded-3 d-flex align-items-center justify-content-between border border-2">
<label class="fw-bold mb-0 text-muted small text-uppercase"><?= _("Bloquer prestation si impayé ?") ?></label>
<select class="form-select w-auto shadow-none" id="encaissementExige" name="encaissementExige">
<div class="p-3 bg-light rounded-3 d-flex align-items-center justify-content-between border">
<label class="fw-bold mb-0 text-muted small text-uppercase"><?= _("Interdire prestation pour impayé ?") ?></label>
<select class="form-select w-auto shadow-none border-2" id="encaissementExige" name="encaissementExige">
<?php liste_options($encaissementExigeOuinon, $this->nettoyer($gc['encaissementExige']), true); ?>
</select>
</div>
@ -141,19 +193,23 @@
</div>
</div>
</div>
<div class="card border-0 shadow-sm mt-1 bg-light">
<div class="card-body d-flex justify-content-end gap-2 py-3">
<button type="button" class="btn btn-light rounded-pill px-4 fw-bold text-muted border shadow-xs" onclick="retour_gc_assureur();">
<i class="fas fa-arrow-left me-2"></i> <?= _("Annuler") ?>
</button>
<button type="button" id="btn_enreg" class="btn btn-warning rounded-pill px-5 fw-bold shadow-sm" onclick="enregistrer_modif_gc_assureur();">
<i class="fas fa-save me-2"></i> <?= _("Enregistrer les modifications") ?>
</button>
</div>
</div>
</form>
</div>
<style>
/* Header Sticky avec flou en arrière-plan */
.header-section.sticky-top {
background-color: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(10px);
box-shadow: 0 4px 12px rgba(0,0,0,0.05) !important;
}
.bg-warning-light { background-color: rgba(255, 193, 7, 0.15) !important; }
.nav-tabs .nav-link { color: #6c757d; border: 1px solid transparent; background: #fff; transition: 0.3s; }
.bg-warning-light { background-color: rgba(255, 193, 7, 0.1) !important; }
.nav-tabs .nav-link { color: #6c757d; border: 1px solid transparent; background: #fff; transition: 0.3s; margin-bottom: 5px; }
.nav-tabs .nav-link.active { background-color: var(--bs-primary) !important; color: white !important; }
.majuscule { text-transform: uppercase; }
.form-control:focus, .form-select:focus { border-color: var(--bs-primary); box-shadow: 0 0 0 0.25rem rgba(33, 46, 83, 0.1); }
</style>