203 lines
13 KiB
PHP
Executable File
203 lines
13 KiB
PHP
Executable File
<?php
|
|
$this->titre = "INTER SANTE - Fiche Garant";
|
|
$_SESSION['codeGcAssureur_C'] = $this->nettoyer($gc['codeGcAssureur']);
|
|
$nbreTotal = count($polices);
|
|
?>
|
|
|
|
<div class="page-content animate__animated animate__fadeIn">
|
|
<div class="header-section mb-4">
|
|
<div class="d-flex align-items-center bg-white p-3 shadow-sm border-start border-primary border-4" style="border-radius: var(--radius-md);">
|
|
<div class="icon-shape bg-primary-ghost text-primary rounded-circle me-3" style="width: 48px; height: 48px; display: flex; align-items: center; justify-content: center;">
|
|
<i class="fas fa-shield-alt fs-4"></i>
|
|
</div>
|
|
<div class="flex-grow-1">
|
|
<h4 id="titre-page" class="mb-0 fw-bold text-uppercase"><?= $this->nettoyer($gc['libelle']) ?></h4>
|
|
<p class="text-muted small mb-0"><?= _("Code Garant") ?> : <span class="badge bg-light text-primary border"><?= $this->nettoyer($gc['codeGcAssureur']) ?></span></p>
|
|
</div>
|
|
<div class="text-end">
|
|
<span class="badge bg-primary-ghost text-primary rounded-pill px-3 py-2 fw-bold">
|
|
<?= $nbreTotal ?> <?= _("Polices actives") ?>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<ul class="nav nav-tabs border-0 gap-2 mb-4" id="ficheGarantTabs" role="tablist">
|
|
<li class="nav-item">
|
|
<button class="nav-link active rounded-pill px-4 fw-bold shadow-xs" id="polices-tab" data-bs-toggle="tab" data-bs-target="#polices" type="button">
|
|
<i class="fas fa-list-ul me-2"></i><?= _("Polices en cours") ?>
|
|
</button>
|
|
</li>
|
|
<li class="nav-item">
|
|
<button class="nav-link rounded-pill px-4 fw-bold shadow-xs" id="infos-tab" data-bs-toggle="tab" data-bs-target="#infos" type="button">
|
|
<i class="fas fa-info-circle me-2"></i><?= _("Informations Générales") ?>
|
|
</button>
|
|
</li>
|
|
<li class="nav-item">
|
|
<button class="nav-link rounded-pill px-4 fw-bold shadow-xs" id="finances-tab" data-bs-toggle="tab" data-bs-target="#finances" type="button">
|
|
<i class="fas fa-file-invoice-dollar me-2"></i><?= _("Paramètres Financiers") ?>
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
|
|
<div class="tab-content border-0">
|
|
|
|
<div class="tab-pane fade show active" id="polices" role="tabpanel">
|
|
<div class="card border-0 shadow-sm">
|
|
<div class="card-body p-0">
|
|
<div class="table-responsive">
|
|
<table id="tableLister" class="table table-hover align-middle mb-0 datatable-inter" style="font-size: 9pt;">
|
|
<thead class="bg-light">
|
|
<tr>
|
|
<th class="text-center py-3"><?= _("No Police") ?></th>
|
|
<th class="py-3"><?= _("Libellé / Souscripteur") ?></th>
|
|
<th class="text-center py-3"><?= _("Effet") ?></th>
|
|
<th class="text-center py-3"><?= _("Echéance") ?></th>
|
|
<th class="text-center py-3"><?= _("Avenant") ?></th>
|
|
<th class="text-center py-3"><?= _("Etat") ?></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<?php foreach ($polices as $police):
|
|
$id = $this->nettoyer($police['id']);
|
|
$nopol = $this->nettoyer($police['numeroPolice']);
|
|
$libelle = (!empty($police['libellePolice']) && $police['libellePolice'] != $police['souscripteur'])
|
|
? $this->nettoyer($police['souscripteur']).' / '.$this->nettoyer($police['libellePolice'])
|
|
: $this->nettoyer($police['souscripteur']);
|
|
?>
|
|
<tr onclick="selectionner_police(<?= $id ?>,'<?= $nopol ?>');" class="cursor-pointer">
|
|
<td class="text-center fw-bold text-primary"><?= $nopol ?></td>
|
|
<td><div class="fw-bold text-dark"><?= $libelle ?></div><small class="text-muted"><?= $this->nettoyer($police['typeContrat']) ?></small></td>
|
|
<td class="text-center"><?= dateLang($this->nettoyer($police['dateEffet'])) ?></td>
|
|
<td class="text-center"><?= dateLang($this->nettoyer($police['dateEcheance'])) ?></td>
|
|
<td class="text-center"><span class="badge bg-light text-dark border"><?= $this->nettoyer($police['numeroAvenant']) ?></span></td>
|
|
<td class="text-center">
|
|
<span class="badge rounded-pill <?= ($this->nettoyer($police['etatPolice']) == 'ACTIF') ? 'bg-success-light text-success' : 'bg-warning-light text-warning' ?>">
|
|
<?= $this->nettoyer($police['etatPolice']) ?>
|
|
</span>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="infos" role="tabpanel">
|
|
<div class="row g-4">
|
|
<div class="col-md-8">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-body p-4">
|
|
<h6 class="fw-bold text-uppercase mb-4 text-primary border-bottom pb-2 small"><i class="fas fa-map-marker-alt me-2"></i><?= _("Coordonnées & Contact") ?></h6>
|
|
<div class="row g-3">
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted"><?= _("Type Garant") ?></label>
|
|
<input class="form-control bg-light border-0 fw-bold" value="<?= $this->nettoyer($gc['typegc']) ?>" readonly>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted"><?= _("Représentant") ?></label>
|
|
<input class="form-control bg-light border-0 fw-bold" value="<?= $this->nettoyer($gc['representant']) ?>" readonly>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted"><?= _("Téléphone") ?></label>
|
|
<input class="form-control bg-light border-0 fw-bold" value="<?= $this->nettoyer($gc['telephoneGarant']) ?>" readonly>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<label class="form-label small text-muted"><?= _("E-mail") ?></label>
|
|
<input class="form-control bg-light border-0 fw-bold" value="<?= $this->nettoyer($gc['email']) ?>" readonly>
|
|
</div>
|
|
<div class="col-12">
|
|
<label class="form-label small text-muted"><?= _("Adresse Géo.") ?></label>
|
|
<input class="form-control bg-light border-0" value="<?= $this->nettoyer($gc['adresseGeographique']) ?>" readonly>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<div class="card border-0 shadow-sm h-100">
|
|
<div class="card-body text-center p-4">
|
|
<h6 class="fw-bold text-uppercase mb-4 text-primary border-bottom pb-2 small"><i class="fas fa-image me-2"></i><?= _("Identité Visuelle") ?></h6>
|
|
<div class="logo-preview mb-3 p-3 border rounded-3 bg-light">
|
|
<?php if (!empty($gc['logo_garant'])): ?>
|
|
<img src="<?= $_SESSION['dossierPhoto_C'].$_SESSION['dossierSociete'].'/Tarifs/Img/garants/'.$this->nettoyer($gc['logo_garant']) ?>" class="img-fluid rounded" style="max-height: 120px;">
|
|
<?php else: ?>
|
|
<div class="text-muted py-4"><i class="fas fa-image fa-3x opacity-25"></i><br><small><?= _("Aucun logo") ?></small></div>
|
|
<?php endif; ?>
|
|
</div>
|
|
<form enctype="multipart/form-data" action="Fichegcassureur/<?= $gc['id'] ?>/" method="post">
|
|
<input type="file" name="fichier_image_a_uploader" class="form-control form-control-sm mb-2 shadow-none border-2">
|
|
<button type="submit" name="submit" class="btn btn-primary btn-sm w-100 rounded-pill fw-bold">
|
|
<i class="fas fa-sync-alt me-1"></i><?= _("Mettre à jour le logo") ?>
|
|
</button>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="tab-pane fade" id="finances" role="tabpanel">
|
|
<div class="card border-0 shadow-sm p-4">
|
|
<div class="row g-4">
|
|
<div class="col-md-4 border-end">
|
|
<h6 class="fw-bold text-muted small text-uppercase mb-3"><?= _("Taux & Commissions") ?></h6>
|
|
<div class="mb-3">
|
|
<label class="small text-muted d-block"><?= _("Comm. Primes") ?></label>
|
|
<span class="fw-bold fs-5"><?= format_N($gc['gcTauxCommissionGerant']) ?> %</span>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="small text-muted d-block"><?= _("Comm. Sinistres") ?></label>
|
|
<span class="fw-bold fs-5 text-primary"><?= format_N($gc['gcTauxFraisReel']) ?> %</span>
|
|
</div>
|
|
<div class="mb-3">
|
|
<label class="small text-muted d-block"><?= _("Taux Ristourne") ?></label>
|
|
<span class="fw-bold fs-5"><?= format_N($gc['gcTauxRistourne']) ?> %</span>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-4 border-end">
|
|
<h6 class="fw-bold text-muted small text-uppercase mb-3"><?= _("Frais & Cartes") ?></h6>
|
|
<table class="table table-sm table-borderless">
|
|
<tr><td class="text-muted small"><?= _("Nouvelle Carte") ?></td><td class="text-end fw-bold"><?= format_N($gc['fraisCarteAfn']) ?></td></tr>
|
|
<tr><td class="text-muted small"><?= _("Renouvellement") ?></td><td class="text-end fw-bold"><?= format_N($gc['fraisCarteRen']) ?></td></tr>
|
|
<tr><td class="text-muted small"><?= _("Ré-impression") ?></td><td class="text-end fw-bold"><?= format_N($gc['fraisCarteImp']) ?></td></tr>
|
|
</table>
|
|
</div>
|
|
<div class="col-md-4">
|
|
<h6 class="fw-bold text-muted small text-uppercase mb-3"><?= _("Comptabilité") ?></h6>
|
|
<div class="p-2 rounded bg-light border-start border-3 border-info mb-2">
|
|
<small class="text-muted d-block">N° Compte TP</small>
|
|
<span class="fw-bold small"><?= $this->nettoyer($gc['numerodeCompteComptableTP']) ?></span>
|
|
</div>
|
|
<div class="p-2 rounded bg-light border-start border-3 border-warning">
|
|
<small class="text-muted d-block">N° Compte RD</small>
|
|
<span class="fw-bold small"><?= $this->nettoyer($gc['numerodeCompteComptableRD']) ?></span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* Design System Neutral Pro Tabs */
|
|
.nav-tabs .nav-link { color: #6c757d; border: 1px solid transparent; background: #fff; transition: all 0.3s; }
|
|
.nav-tabs .nav-link.active { background-color: var(--bs-primary) !important; color: white !important; }
|
|
.cursor-pointer { cursor: pointer; }
|
|
.bg-success-light { background-color: rgba(25, 135, 84, 0.1); }
|
|
.bg-warning-light { background-color: rgba(255, 193, 7, 0.1); }
|
|
.bg-primary-ghost { background-color: rgba(33, 46, 83, 0.08); }
|
|
</style>
|
|
|
|
<script>
|
|
$(document).ready(function() {
|
|
if(typeof initSmartTable === 'function') {
|
|
initSmartTable('.datatable-inter', 'Polices_Garant');
|
|
}
|
|
});
|
|
</script>
|