From a194cccabf199cfc87e38a3777f23d1cd394690a Mon Sep 17 00:00:00 2001 From: KONE SOREL Date: Mon, 29 Dec 2025 21:55:54 +0000 Subject: [PATCH] Collegepolice --- Bootstrap_new/css/style_office.css | 52 +++++++++++ Controleur/ControleurCollegepolice.php | 25 ++++++ Js/fonctions.js | 8 ++ Modele/Collegepolice.php | 31 +++++++ Modele/Police.php | 13 +++ Vue/Collegepolice/index.php | 117 +++++++++++++++++++++++++ Vue/gabarit.php | 4 +- 7 files changed, 248 insertions(+), 2 deletions(-) create mode 100644 Controleur/ControleurCollegepolice.php create mode 100644 Modele/Collegepolice.php create mode 100644 Vue/Collegepolice/index.php diff --git a/Bootstrap_new/css/style_office.css b/Bootstrap_new/css/style_office.css index 0bb4ead..163c8eb 100644 --- a/Bootstrap_new/css/style_office.css +++ b/Bootstrap_new/css/style_office.css @@ -1212,4 +1212,56 @@ li i { margin-right:10px; color:#007bff; } @media print { .btn, .modal, .sr-only { display: none !important; } .card { border: 1px solid #ddd !important; box-shadow: none !important; } +} + +/* Style Table Collèges - Vision Office 365 */ + +.custom-college-table thead th { + background-color: var(--office-common) !important; + color: var(--office-dark) !important; + font-size: 0.65rem; + font-weight: 800; + text-transform: uppercase; + border-bottom: 2px solid var(--office-primary); + vertical-align: middle; + padding: 10px 5px; +} + +.custom-college-table tbody td { + font-size: 0.75rem; /* Compact pour tenir toutes les colonnes */ + white-space: nowrap; + padding: 8px 5px; +} + +/* Séparateurs verticaux pour groupes de données (Nb, HT, TTC) */ +.border-start { + border-left: 1px solid var(--office-border) !important; +} + +/* Style des boutons de montant (Action principale) */ +.custom-college-table .btn-primary { + background-color: var(--office-secondary); + border: none; + font-size: 0.75rem; +} + +.custom-college-table .btn-primary:hover { + background-color: var(--office-primary); + transform: scale(1.05); +} + +/* Footer de table sombre type Excel Premium */ +.custom-college-table tfoot { + border-top: 3px solid var(--office-primary); + background-color: var(--office-dark) !important; +} + +.custom-college-table tfoot td { + padding: 12px 5px; +} + +/* Badge de catégorie épuré */ +.badge.rounded-pill { + font-weight: 600; + padding: 5px 10px; } \ No newline at end of file diff --git a/Controleur/ControleurCollegepolice.php b/Controleur/ControleurCollegepolice.php new file mode 100644 index 0000000..f7d519f --- /dev/null +++ b/Controleur/ControleurCollegepolice.php @@ -0,0 +1,25 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Collegepolice"); + + $this->college = new Collegepolice(); + $this->police = new Police(); + } + public function index() { + $idPolice = $_SESSION['idPolice_C']; + $police = $this->police->getPoliceIdSimple($idPolice); + $colleges = $this->college->getCollegesPolice($idPolice); + $totalcollege = $this->college->getTotaldcollege($idPolice); + $this->genererVue(array('police' => $police, 'colleges' => $colleges, 'totalcollege' => $totalcollege)); + } + +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 44c2cad..0970694 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -658,3 +658,11 @@ function imprimer_quittance_client(idQuittance) { * =================================================== */ modal.show(); } + +function college_police() +{ + if ($("#idPolice_C" ).val()>"") + { + window.location.assign($("#racineWeb" ).val()+"Collegepolice/"); + } +} \ No newline at end of file diff --git a/Modele/Collegepolice.php b/Modele/Collegepolice.php new file mode 100644 index 0000000..0451a7f --- /dev/null +++ b/Modele/Collegepolice.php @@ -0,0 +1,31 @@ +executerRequete($sql, array($idCollege)); + return $college->fetch(PDO::FETCH_ASSOC); + } + + public function getCollegesPolice($idPolice) + { + $sql = 'call sp_get_colleges_police(?);'; + + $college = $this->executerRequete($sql, array($idPolice)); + + return $college->fetchAll(PDO::FETCH_ASSOC); + + } + + public function getTotaldcollege($idPolice) { + $sql = 'call sp_totalcollege(?)'; + $totalcollege = $this->executerRequete($sql, array($idPolice)); + return $totalcollege->fetch(PDO::FETCH_ASSOC); + } + +} diff --git a/Modele/Police.php b/Modele/Police.php index a223e6e..d371d47 100755 --- a/Modele/Police.php +++ b/Modele/Police.php @@ -116,4 +116,17 @@ class Police extends Modele { return $textecp->fetch(PDO::FETCH_ASSOC); } + public function getPoliceIdSimple($id) + { + $idPolice = $_SESSION['idPolice_C'] ; + $sql2 = 'select count(0) as nbCollege from college where (idPolice=?);'; + $resultat2 = $this->executerRequete($sql2, array($idPolice)); + $effectif2 = $resultat2->fetch(PDO::FETCH_ASSOC); + $_SESSION['nbCollege_C'] = $effectif2['nbCollege']; + + $sql = 'SELECT A.*, 1 as prestationPossible FROM police A WHERE (A.codeSociete=?) AND (A.id=?)'; + $police = $this->executerRequete($sql, array($_SESSION['codeSociete'], $id)); + return $police->fetch(PDO::FETCH_ASSOC); + } + } \ No newline at end of file diff --git a/Vue/Collegepolice/index.php b/Vue/Collegepolice/index.php new file mode 100644 index 0000000..374b66d --- /dev/null +++ b/Vue/Collegepolice/index.php @@ -0,0 +1,117 @@ +titre = "INTER-SANTE - Collèges de la police"; + $superUser = $_SESSION['superUser']; +?> + +
+
+ + +
+
+
+ + + Police No: nettoyer($police['numeroPolice']) ?> +
+ +
+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
nettoyer($college['codeProduit']) ?>nettoyer($college['libelleCollege']) ?>nettoyer($college['nbAdherent'])) ?>nettoyer($college['nbAyantdroit'])) ?>nettoyer($college['primeFamille'])) ?>nettoyer($college['primeNette'])) ?>nettoyer($college['commission'])) ?>nettoyer($college['commissionAutre'])) ?>nettoyer($college['accessoire'])) ?>nettoyer($college['primeHt'])) ?>nettoyer($college['taxe'])) ?>nettoyer($college['fraisCarte'])) ?> + + +
+ + + + + Arc. + + + + +
+
nettoyer($totalcollege['nbAdherent'])) ?>nettoyer($totalcollege['nbAyantdroit'])) ?>nettoyer($totalcollege['primeFamille_total'])) ?>nettoyer($totalcollege['primeNette_total'])) ?>nettoyer($totalcollege['commission_total'])) ?>nettoyer($totalcollege['commissionAutre_total'])) ?>nettoyer($totalcollege['accessoire_total'])) ?>nettoyer($totalcollege['primeHt_total'])) ?>nettoyer($totalcollege['taxe_total'])) ?>nettoyer($totalcollege['fraisCarte_total'])) ?>nettoyer($totalcollege['primeTtc_total'])) ?>
+
+
+
+
+
\ No newline at end of file diff --git a/Vue/gabarit.php b/Vue/gabarit.php index 5ea051f..c5b768f 100755 --- a/Vue/gabarit.php +++ b/Vue/gabarit.php @@ -119,7 +119,7 @@ $activeChildId = $menuData['child']; - + - +