Compare commits
No commits in common. "main" and "v1.0.0a" have entirely different histories.
@ -12,10 +12,6 @@ class Class_gestionFiche
|
|||||||
$this->pdo = $pDO->getPdoGsb();
|
$this->pdo = $pDO->getPdoGsb();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupère tous les utilisateurs différents de 0
|
|
||||||
*/
|
|
||||||
public function getLesUtilisateurs(): array
|
public function getLesUtilisateurs(): array
|
||||||
{
|
{
|
||||||
$req = 'SELECT "uId", "uNom", "uPrenom" FROM utilisateur WHERE "uStatut"!=0 ORDER BY "uNom" ASC;';
|
$req = 'SELECT "uId", "uNom", "uPrenom" FROM utilisateur WHERE "uStatut"!=0 ORDER BY "uNom" ASC;';
|
||||||
@ -25,15 +21,11 @@ class Class_gestionFiche
|
|||||||
return $result->fetchAll();
|
return $result->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
//Mode d'affichage de la date
|
|
||||||
public function dateComplete(string $date): string
|
public function dateComplete(string $date): string
|
||||||
{
|
{
|
||||||
return substr($date, 0, 4) . '-' . substr($date, 4);
|
return substr($date, 0, 4) . '-' . substr($date, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupère les fiches a valider par le comptable et sépare les fiches de 12 en 12
|
|
||||||
*/
|
|
||||||
public function get_ficheAvalider(int $nPage): array
|
public function get_ficheAvalider(int $nPage): array
|
||||||
{
|
{
|
||||||
$decalage = ($nPage - 1) * $this::$NB_LIGNES_FICHEAVALIDER;
|
$decalage = ($nPage - 1) * $this::$NB_LIGNES_FICHEAVALIDER;
|
||||||
@ -53,9 +45,6 @@ class Class_gestionFiche
|
|||||||
return $result->fetchAll();
|
return $result->fetchAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupère toutes les fiches a valider avec comme état "CL"
|
|
||||||
*/
|
|
||||||
public function get_nbFicheAvalider(): int
|
public function get_nbFicheAvalider(): int
|
||||||
{
|
{
|
||||||
$req = 'SELECT COUNT(*) as "nbFicheAvalider" from remboursement
|
$req = 'SELECT COUNT(*) as "nbFicheAvalider" from remboursement
|
||||||
@ -67,9 +56,6 @@ class Class_gestionFiche
|
|||||||
return (int) $result['nbFicheAvalider'];
|
return (int) $result['nbFicheAvalider'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupère toutes les fiches remboursées
|
|
||||||
*/
|
|
||||||
public function get_nbRemboursement(string $idUtilisateur): int
|
public function get_nbRemboursement(string $idUtilisateur): int
|
||||||
{
|
{
|
||||||
$req = 'SELECT COUNT(*) as "nbRemboursement" from remboursement WHERE "rVisiteur"= :userId;';
|
$req = 'SELECT COUNT(*) as "nbRemboursement" from remboursement WHERE "rVisiteur"= :userId;';
|
||||||
@ -81,19 +67,15 @@ class Class_gestionFiche
|
|||||||
return (int) $result['nbRemboursement'];
|
return (int) $result['nbRemboursement'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Récupère le nombre de page a afficher en fonction du nombre de remboursement et du décallage de 12 en 12
|
|
||||||
*/
|
|
||||||
public function get_Page(int $nPage, string $idUtilisateur): array
|
public function get_Page(int $nPage, string $idUtilisateur): array
|
||||||
{
|
{
|
||||||
$decalage = ($nPage - 1) * $this::$NB_LIGNES_PAGINATION;
|
$decalage = ($nPage - 1) * $this::$NB_LIGNES_PAGINATION;
|
||||||
|
|
||||||
$req = 'SELECT "rMois", "rVisiteur", "rEtat", ROUND("rMontantValide", 2)
|
$req = 'SELECT "rMois", "rVisiteur", "rEtat", ROUND("rMontantValide", 2)
|
||||||
as "rMontantValide", "eLibelle"
|
as "rMontantValide", "eLibelle"
|
||||||
FROM remboursement
|
FROM remboursement
|
||||||
INNER JOIN etat ON etat."eId"=remboursement."rEtat"
|
INNER JOIN etat ON etat."eId"=remboursement."rEtat"
|
||||||
WHERE "rVisiteur"= :userId
|
WHERE "rVisiteur"= :userId
|
||||||
ORDER BY "rMois" DESC LIMIT :nbLignes offset :decalage;';
|
ORDER BY "rDateModif" DESC LIMIT :nbLignes offset :decalage;';
|
||||||
$result = $this->pdo->prepare($req);
|
$result = $this->pdo->prepare($req);
|
||||||
$result->bindParam('nbLignes', $this::$NB_LIGNES_PAGINATION);
|
$result->bindParam('nbLignes', $this::$NB_LIGNES_PAGINATION);
|
||||||
$result->bindParam('decalage', $decalage);
|
$result->bindParam('decalage', $decalage);
|
||||||
|
@ -109,25 +109,24 @@ class Class_newFiche
|
|||||||
/**
|
/**
|
||||||
* RETOURNE LE STATUS DE LA FICHE
|
* RETOURNE LE STATUS DE LA FICHE
|
||||||
*/
|
*/
|
||||||
public function getStatus(): array
|
public function getStatus(): string
|
||||||
{
|
{
|
||||||
$req = 'SELECT etat."eId" , etat."eLibelle"
|
$req = 'select etat."eId" from remboursement
|
||||||
from remboursement
|
|
||||||
INNER JOIN etat on etat."eId" = remboursement."rEtat"
|
INNER JOIN etat on etat."eId" = remboursement."rEtat"
|
||||||
WHERE "rVisiteur" = :idVisiteur AND "rMois" = :mois;';
|
WHERE "rVisiteur" = :idVisiteur AND "rMois" = :mois ;';
|
||||||
|
|
||||||
$result = $this->pdo->prepare($req);
|
$result = $this->pdo->prepare($req);
|
||||||
$result->bindParam(':idVisiteur', $this->userId);
|
$result->bindParam(':idVisiteur', $this->userId);
|
||||||
$result->bindParam(':mois', $this->month);
|
$result->bindParam(':mois', $this->month);
|
||||||
$result->execute();
|
$result->execute();
|
||||||
|
|
||||||
return $result->fetch();
|
return $result->fetch()['eId'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* UPDATE LES INFOS DE LA FICHE
|
* UPDATE LES INFOS DE LA FICHE
|
||||||
*/
|
*/
|
||||||
public function updateRemboursement(int $nbJustif, float $mttValid): bool
|
public function updateFile(int $nbJustif, float $mttValid): bool
|
||||||
{
|
{
|
||||||
$req = 'UPDATE remboursement
|
$req = 'UPDATE remboursement
|
||||||
SET "rNbJustificatifs" = :nbJustif,
|
SET "rNbJustificatifs" = :nbJustif,
|
||||||
@ -216,20 +215,4 @@ class Class_newFiche
|
|||||||
|
|
||||||
return $result->execute();
|
return $result->execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Passe la
|
|
||||||
*/
|
|
||||||
public function validSheet(): bool
|
|
||||||
{
|
|
||||||
$req = 'UPDATE remboursement
|
|
||||||
SET "rEtat" = \'RB\'
|
|
||||||
WHERE "rVisiteur" = :visiteur AND "rMois" = :mois;
|
|
||||||
';
|
|
||||||
$result = $this->pdo->prepare($req);
|
|
||||||
$result->bindParam('visiteur', $this->userId);
|
|
||||||
$result->bindParam('mois', $this->month);
|
|
||||||
|
|
||||||
return $result->execute();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -17,6 +17,8 @@ class PdoGsb
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
PdoGsb::$pdo = new PDO(PdoGsb::$serveur . ';' . PdoGsb::$bdd, PdoGsb::$user, PdoGsb::$mdp);
|
PdoGsb::$pdo = new PDO(PdoGsb::$serveur . ';' . PdoGsb::$bdd, PdoGsb::$user, PdoGsb::$mdp);
|
||||||
|
|
||||||
|
//PdoGsb::$monPdo->query("SET CHARACTER SET utf8");SET client_encoding = 'UTF8';
|
||||||
}
|
}
|
||||||
public function _destruct()
|
public function _destruct()
|
||||||
{
|
{
|
||||||
|
@ -26,30 +26,7 @@ class Class_user
|
|||||||
$result->bindParam('login', $login);
|
$result->bindParam('login', $login);
|
||||||
$result->bindParam('pwd', $password);
|
$result->bindParam('pwd', $password);
|
||||||
$result->execute();
|
$result->execute();
|
||||||
$result = $result->fetch();
|
|
||||||
|
|
||||||
if ($result['pLibelle'] == 'comptable') {
|
return $result->fetch();
|
||||||
$this->updateBdd();
|
|
||||||
}
|
|
||||||
|
|
||||||
return $result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Update les lignes remboursement de la bdd a la connexion du comptable
|
|
||||||
*/
|
|
||||||
public function updateBdd(): void
|
|
||||||
{
|
|
||||||
$curMonth = date('Ym');
|
|
||||||
$prevMonth = DateTime::createFromFormat('Ym', $curMonth);
|
|
||||||
$prevMonth->modify('first day of last month');
|
|
||||||
|
|
||||||
$prevMonth = $prevMonth->format('Ym');
|
|
||||||
|
|
||||||
$req = 'SELECT updateEtat(:currentMonth, :previousMonth)';
|
|
||||||
$result = $this->pdo->prepare($req);
|
|
||||||
$result->bindParam('currentMonth', $curMonth);
|
|
||||||
$result->bindParam('previousMonth', $prevMonth);
|
|
||||||
$result->execute();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
//var_dump($_REQUEST['fraisHF']);
|
||||||
require_once(__DIR__ . '/../Class/class.pdo.php');
|
require_once(__DIR__ . '/../Class/class.pdo.php');
|
||||||
require_once(__DIR__ . '/../Class/class.newFiche.php');
|
require_once(__DIR__ . '/../Class/class.newFiche.php');
|
||||||
|
|
||||||
|
|
||||||
$id = explode('-', $_GET['fiche']); //id de la fiche "userID-date"
|
$id = explode('-', $_GET['fiche']); //id de la fiche "userID-date"
|
||||||
$pdo = new PdoGsb;
|
$pdo = new PdoGsb;
|
||||||
$pdoNewFiche = new Class_newFiche($pdo, $id[0], $id[1]);
|
$pdoNewFiche = new Class_newFiche($pdo, $id[0], $id[1]);
|
||||||
|
|
||||||
switch ($_GET['action']) {
|
switch ($_GET['action']) {
|
||||||
case 'update':
|
case 'update':
|
||||||
$mttValid = 0;
|
|
||||||
//FRAIS FORFAITAIRES
|
//FRAIS FORFAITAIRES
|
||||||
foreach ($_REQUEST['fraisF'] as $value) {
|
foreach ($_REQUEST['fraisF'] as $value) {
|
||||||
$mttValid = $mttValid + $value['montant'];
|
|
||||||
$pdoNewFiche->updateFraisF(
|
$pdoNewFiche->updateFraisF(
|
||||||
$value['quantité'],
|
$value['quantité'],
|
||||||
intval($value['montant']),
|
intval($value['montant']),
|
||||||
@ -20,12 +20,8 @@ switch ($_GET['action']) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
//FRAIS HORS FORFAIT
|
//FRAIS HORS FORFAIT
|
||||||
$nbJustif = 0;
|
|
||||||
foreach ($_REQUEST['fraisHF'] as $value) {
|
foreach ($_REQUEST['fraisHF'] as $value) {
|
||||||
//SI le fraisHf ne possède pas d'id de la bdd
|
|
||||||
if ($value['id'] == NULL) {
|
if ($value['id'] == NULL) {
|
||||||
$mttValid = $mttValid + $value['montant'];
|
|
||||||
$nbJustif = $nbJustif + 1;
|
|
||||||
$pdoNewFiche->addFraisHF(
|
$pdoNewFiche->addFraisHF(
|
||||||
$value['libelle'],
|
$value['libelle'],
|
||||||
$value['date'],
|
$value['date'],
|
||||||
@ -33,31 +29,9 @@ switch ($_GET['action']) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//mise a jour de la fiche remboursement
|
|
||||||
$pdoNewFiche->updateRemboursement($nbJustif, $mttValid);
|
|
||||||
|
|
||||||
break;
|
|
||||||
case 'valid':
|
|
||||||
$mttValid = 0;
|
|
||||||
//FRAIS FORFAITAIRES
|
|
||||||
foreach ($_REQUEST['fraisF'] as $value) {
|
|
||||||
$mttValid = $mttValid + $value['montant'];
|
|
||||||
$pdoNewFiche->updateFraisF(
|
|
||||||
$value['quantité'],
|
|
||||||
intval($value['montant']),
|
|
||||||
$value['id']
|
|
||||||
);
|
|
||||||
}
|
|
||||||
$nbJustif = $_REQUEST['nbJustif'];
|
|
||||||
|
|
||||||
//mise a jour de la fiche remboursement
|
|
||||||
$pdoNewFiche->updateRemboursement($nbJustif, $mttValid);
|
|
||||||
$pdoNewFiche->validSheet();
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case 'suprFraisHF':
|
case 'suprFraisHF':
|
||||||
$pdoNewFiche->suprLigneHF($_GET['idFrais']);
|
$pdoNewFiche->suprLigneHF($_GET['idFrais']);
|
||||||
$pdoNewFiche->updateRemboursement($_GET['$nbJustif'], $_GET['mttValid']);
|
|
||||||
break;
|
break;
|
||||||
case 'refusFraisHF':
|
case 'refusFraisHF':
|
||||||
$pdoNewFiche->accceptFrais(
|
$pdoNewFiche->accceptFrais(
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
require_once(__DIR__ . '/../Class/class.user.php');
|
require_once(__DIR__ . '/../Class/class.user.php');
|
||||||
|
|
||||||
$userClass = new Class_user($pdo);
|
$userClass = new Class_user($pdo);
|
||||||
|
|
||||||
if (isset($_POST['login']) && isset($_POST['password'])) {
|
if (isset($_POST['login']) && isset($_POST['password'])) {
|
||||||
//Récupère les données de l'utilisateur
|
//Récupère les données de l'utilisateur
|
||||||
$data = $userClass->connectUser($_POST['login'], $_POST['password']);
|
$data = $userClass->connectUser($_POST['login'], $_POST['password']);
|
||||||
@ -11,6 +10,7 @@ if (isset($_POST['login']) && isset($_POST['password'])) {
|
|||||||
header('location: index.php');
|
header('location: index.php');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
//Si l'utilisateur existe ou pas
|
//Si l'utilisateur existe ou pas
|
||||||
if (count($data) === 0) {
|
if (count($data) === 0) {
|
||||||
header('location: index.php?direction=connexion&msg=errorco');
|
header('location: index.php?direction=connexion&msg=errorco');
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
<?php
|
<?php
|
||||||
|
$_SESSION["typeU"] = "comptable";
|
||||||
|
|
||||||
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
|
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
|
||||||
$gestionFiche = new Class_gestionFiche($pdo);
|
$gestionFiche = new Class_gestionFiche($pdo);
|
||||||
|
|
||||||
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
|
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
|
||||||
|
|
||||||
if ($_SESSION["uType"] == "comptable") {
|
if ($_SESSION["typeU"] == "comptable") {
|
||||||
if (isset($_REQUEST['selVisiteur'])) {
|
if (isset($_REQUEST['selVisiteur'])) {
|
||||||
$userId = $_REQUEST['selVisiteur'];
|
$userId = $_REQUEST['selVisiteur'];
|
||||||
} else {
|
} else {
|
||||||
@ -23,5 +24,7 @@ if(isset($_GET['page']) && !empty($_GET['page'])){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pages = ceil($gestionFiche->get_nbFicheAvalider() / $gestionFiche::$NB_LIGNES_FICHEAVALIDER);
|
$pages = ceil($gestionFiche->get_nbFicheAvalider() / $gestionFiche::$NB_LIGNES_FICHEAVALIDER);
|
||||||
|
|
||||||
$lesFiches = $gestionFiche->get_ficheAvalider($currentPage);
|
$lesFiches = $gestionFiche->get_ficheAvalider($currentPage);
|
||||||
|
|
||||||
include("vues/v_fichesAvalider.php");
|
include("vues/v_fichesAvalider.php");
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
|
require_once(__DIR__ . '/../Class/class.gestionFiche.php');
|
||||||
|
|
||||||
$typeU = $_SESSION['uType'];
|
$typeU = $_SESSION['uType'];
|
||||||
|
|
||||||
$gestionFiche = new Class_gestionFiche($pdo);
|
$gestionFiche = new Class_gestionFiche($pdo);
|
||||||
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
|
$LesUtilisateurs = $gestionFiche->getLesUtilisateurs(); //RENVOIE LISTE USERS
|
||||||
|
|
||||||
@ -25,6 +26,8 @@ if(isset($_GET['page']) && !empty($_GET['page'])){
|
|||||||
}
|
}
|
||||||
|
|
||||||
$pages = ceil($gestionFiche->get_nbRemboursement($userId) / $gestionFiche::$NB_LIGNES_PAGINATION);
|
$pages = ceil($gestionFiche->get_nbRemboursement($userId) / $gestionFiche::$NB_LIGNES_PAGINATION);
|
||||||
|
|
||||||
|
|
||||||
$lesFiches = $gestionFiche->get_Page($currentPage, $userId);
|
$lesFiches = $gestionFiche->get_Page($currentPage, $userId);
|
||||||
|
|
||||||
include("vues/v_gestionFiches.php");
|
include("vues/v_gestionFiches.php");
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
/**
|
/**
|
||||||
* sudo date --set "YYYY-MM-DD HH:MM:SS"
|
* sudo date --set "YYYY-MM-DD HH:MM:SS"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(__DIR__ . '/../Class/class.newFiche.php');
|
require_once(__DIR__ . '/../Class/class.newFiche.php');
|
||||||
|
|
||||||
$typeUser = $_SESSION['uType']; //visiteur ou comptable
|
$typeUser = $_SESSION['uType']; //visiteur ou comptable
|
||||||
@ -23,7 +24,7 @@ if (isset($_GET['currentList'])) {
|
|||||||
$dateFormHFMax = date("Y-m-t", mktime(0, 0, 0, date('m'), 1, date('Y'))); // retourne le dernier jour du mois (30 ou 31)
|
$dateFormHFMax = date("Y-m-t", mktime(0, 0, 0, date('m'), 1, date('Y'))); // retourne le dernier jour du mois (30 ou 31)
|
||||||
|
|
||||||
} elseif (isset($_GET['dateListing'])) {
|
} elseif (isset($_GET['dateListing'])) {
|
||||||
//Données pour nourir la vue
|
//Données pour nourire la vue
|
||||||
$userId = $_REQUEST['userId'];
|
$userId = $_REQUEST['userId'];
|
||||||
$date = $_REQUEST['dateListing'];
|
$date = $_REQUEST['dateListing'];
|
||||||
|
|
||||||
@ -32,12 +33,14 @@ if (isset($_GET['currentList'])) {
|
|||||||
|
|
||||||
//Date du formulaire HF
|
//Date du formulaire HF
|
||||||
$dateFormHFMin = substr($date, 0, 4) . '-' . substr($date, 4) . '-01';
|
$dateFormHFMin = substr($date, 0, 4) . '-' . substr($date, 4) . '-01';
|
||||||
// retourne le dernier jour du mois (30 ou 31)
|
$dateFormHFMax = date("Y-m-t", mktime(0, 0, 0, date('m', $dateTimeStamp), 1, date('Y', $dateTimeStamp))); // retourne le dernier jour du mois (30 ou 31)
|
||||||
$dateFormHFMax = date("Y-m-t", mktime(0, 0, 0, date('m', $dateTimeStamp), 1, date('Y', $dateTimeStamp)));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
//Date du header en français
|
//Date du header en français
|
||||||
try {
|
try {
|
||||||
|
//sudo timedatectl set-local-rtc 1
|
||||||
|
//sudo apt install php8.2-intl
|
||||||
|
//sudo service apache2 restart
|
||||||
$format = new IntlDateFormatter(
|
$format = new IntlDateFormatter(
|
||||||
'fr_FR',
|
'fr_FR',
|
||||||
IntlDateFormatter::FULL,
|
IntlDateFormatter::FULL,
|
||||||
@ -77,13 +80,6 @@ $totalFraisFiche = $newFiche->getMontantValide();
|
|||||||
* ETAT DE LA FICHE
|
* ETAT DE LA FICHE
|
||||||
*/
|
*/
|
||||||
$status = $newFiche->getStatus();
|
$status = $newFiche->getStatus();
|
||||||
if (
|
$disabled = ($status !== 'CR') ? 'disabled' : '';
|
||||||
($status['eId'] == 'CL' && $typeUser == 'comptable')
|
|
||||||
|| ($status['eId'] == 'CR' && $typeUser == 'visiteur')
|
|
||||||
) {
|
|
||||||
$disabled = '';
|
|
||||||
} else {
|
|
||||||
$disabled = 'disabled';
|
|
||||||
}
|
|
||||||
|
|
||||||
include(__DIR__ . '/../vues/v_newFiche.php');
|
include(__DIR__ . '/../vues/v_newFiche.php');
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<div class="col-auto col-md-3 col-xl-2 px-sm-2 px-0 bg-dark">
|
<div class="col-auto col-md-3 col-xl-2 px-sm-2 px-0 bg-dark">
|
||||||
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white min-vh-100">
|
<div class="d-flex flex-column align-items-center align-items-sm-start px-3 pt-2 text-white min-vh-100">
|
||||||
<a href="http://localhost:2080/gsb/AP44/index.php?direction=home" class="d-flex align-items-center pb-3 mb-md-0 me-md-auto text-white text-decoration-none">
|
<a href="/" class="d-flex align-items-center pb-3 mb-md-0 me-md-auto text-white text-decoration-none">
|
||||||
<strong><span class="fs-5 d-none d-sm-inline">GSB LABORATOIRE</span></strong>
|
<strong><span class="fs-5 d-none d-sm-inline">GSB LABORATOIRE</span></strong>
|
||||||
</a>
|
</a>
|
||||||
<div class="dropdown pb-4">
|
<div class="dropdown pb-4">
|
||||||
@ -12,13 +12,13 @@
|
|||||||
|
|
||||||
</a>
|
</a>
|
||||||
<ul class="dropdown-menu dropdown-menu-dark text-small shadow" aria-labelledby="dropdownUser1">
|
<ul class="dropdown-menu dropdown-menu-dark text-small shadow" aria-labelledby="dropdownUser1">
|
||||||
<li><a class="dropdown-item" href="controleurs/c_deconnexion.php">Déconnexion</a></li>
|
<li><a class="dropdown-item" href="controleurs/c_deconnexion.php">Sign out</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<ul class="nav nav-pills flex-column mb-sm-auto mb-0 align-items-center align-items-sm-start" id="menu">
|
<ul class="nav nav-pills flex-column mb-sm-auto mb-0 align-items-center align-items-sm-start" id="menu">
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="index.php" class="nav-link align-middle px-0">
|
<a href="index.php" class="nav-link align-middle px-0">
|
||||||
<i class="fs-4 bi-house"></i> <span class="ms-1 d-none d-sm-inline">Accueil</span>
|
<i class="fs-4 bi-house"></i> <span class="ms-1 d-none d-sm-inline">Home</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<!--
|
<!--
|
||||||
@ -64,12 +64,12 @@
|
|||||||
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
|
<ul class="collapse show nav flex-column ms-1" id="submenu2" data-bs-parent="#menu">
|
||||||
<li class="w-100">
|
<li class="w-100">
|
||||||
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span
|
<a href="index.php?direction=gestionFiche" class="nav-link px-0"> <span
|
||||||
class="d-none d-sm-inline">gestion des fiches</span>
|
class="d-none d-sm-inline">A valider</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="index.php?direction=ficheAvalider" class="nav-link px-0"> <span
|
<a href="index.php?direction=ficheAvalider" class="nav-link px-0"> <span
|
||||||
class="d-none d-sm-inline">fiches à valider</span>
|
class="d-none d-sm-inline">fiches a vérifier</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -7,6 +7,7 @@ $(document).ready(function () {
|
|||||||
* Partie enregistrement frais F
|
* Partie enregistrement frais F
|
||||||
*/
|
*/
|
||||||
$('.frsFrt').on('change', function (e) {
|
$('.frsFrt').on('change', function (e) {
|
||||||
|
console.log($(this).val())
|
||||||
val = $(this).val();
|
val = $(this).val();
|
||||||
val = val.replace(',', '.')
|
val = val.replace(',', '.')
|
||||||
|
|
||||||
@ -96,6 +97,7 @@ $(document).on('click', '.btnRefuseFraisHf', function () {
|
|||||||
idFrais = $(this).parent().parent().attr('data-id')
|
idFrais = $(this).parent().parent().attr('data-id')
|
||||||
fiche = $('#idFiche').attr('data-id')
|
fiche = $('#idFiche').attr('data-id')
|
||||||
etatLigne = $(this).attr('data-status')
|
etatLigne = $(this).attr('data-status')
|
||||||
|
console.log(etatLigne)
|
||||||
//set on refus
|
//set on refus
|
||||||
$.ajax({
|
$.ajax({
|
||||||
// url: "../controleurs/c_actionFiche.php?action=refusFraisHF&fiche=" + fiche + "&idFrais=" + idFrais + "&state=" + etatLigne,
|
// url: "../controleurs/c_actionFiche.php?action=refusFraisHF&fiche=" + fiche + "&idFrais=" + idFrais + "&state=" + etatLigne,
|
||||||
@ -176,45 +178,6 @@ $(document).on('click', '#sendFileBtn', function () {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
/**
|
|
||||||
* Partie Validation fiche par le comptable
|
|
||||||
*/
|
|
||||||
$(document).on('click', '#validSheetBtn', function () {
|
|
||||||
//FRAIS FORFAITAIRES
|
|
||||||
var listeFraisF = []
|
|
||||||
$('tr.fraisForfaitaire').each(function () {
|
|
||||||
quantite = parseInt($(this).find('.frsFrt').val())
|
|
||||||
montant = parseFloat($(this).find('.mttFrsTotal').html())
|
|
||||||
id = $(this).attr('data-id')
|
|
||||||
|
|
||||||
tabData = {
|
|
||||||
'quantité': quantite,
|
|
||||||
'montant': montant,
|
|
||||||
'id': id
|
|
||||||
}
|
|
||||||
listeFraisF.push(tabData);
|
|
||||||
})
|
|
||||||
|
|
||||||
nbFraisHf = $('tr.fraisHF').length
|
|
||||||
|
|
||||||
data = {
|
|
||||||
fraisF: listeFraisF,
|
|
||||||
nbJustif: nbFraisHf,
|
|
||||||
mttFrsHf: mttFrsHf
|
|
||||||
}
|
|
||||||
fiche = $('#idFiche').attr('data-id')
|
|
||||||
|
|
||||||
$.ajax({
|
|
||||||
url: "controleurs/c_actionFiche.php?action=valid&fiche=" + fiche,
|
|
||||||
// url: "../controleurs/c_actionFiche.php?action=update&fiche=" + fiche,
|
|
||||||
method: "POST",
|
|
||||||
data: data,
|
|
||||||
}).done(function () {
|
|
||||||
location.reload();
|
|
||||||
})
|
|
||||||
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calcul prix total frais forfaitaires
|
* Calcul prix total frais forfaitaires
|
||||||
*/
|
*/
|
||||||
@ -232,6 +195,12 @@ function calcPrixTotalFrsF() {
|
|||||||
*/
|
*/
|
||||||
function calcPrixTotalFrsHorsF() {
|
function calcPrixTotalFrsHorsF() {
|
||||||
|
|
||||||
|
console.log($('td#MttFrsHF').length)
|
||||||
|
|
||||||
|
if ($('td#MttFrsHF').length == 0) {
|
||||||
|
vf
|
||||||
|
}
|
||||||
|
|
||||||
var prixTotal = 0;
|
var prixTotal = 0;
|
||||||
$('td#MttFrsHF').each(function () {
|
$('td#MttFrsHF').each(function () {
|
||||||
prixTotal += parseFloat($(this).html().replace('€', ''))
|
prixTotal += parseFloat($(this).html().replace('€', ''))
|
||||||
|
100
include/proceduresJava.js
Normal file
100
include/proceduresJava.js
Normal file
@ -0,0 +1,100 @@
|
|||||||
|
if(document.images) /* PRECHARGEMENT DE L IMAGE DANS LE CACHE DU NAVIGATEUR */
|
||||||
|
{
|
||||||
|
zTous = new Image;
|
||||||
|
zTous = "images/cocheR.gif";
|
||||||
|
}
|
||||||
|
|
||||||
|
function format_euro(valeur)
|
||||||
|
{
|
||||||
|
// formate un nombre avec 2 chiffres après la virgule et un espace separateur de milliers
|
||||||
|
var ndecimal=2;
|
||||||
|
var separateur=' ';
|
||||||
|
var deci=Math.round( Math.pow(10,ndecimal)*(Math.abs(valeur)-Math.floor(Math.abs(valeur)))) ;
|
||||||
|
var val=Math.floor(Math.abs(valeur));
|
||||||
|
if ((ndecimal==0)||(deci==Math.pow(10,ndecimal))) {val=Math.floor(Math.abs(valeur)); deci=0;}
|
||||||
|
var val_format=val+"";
|
||||||
|
var nb=val_format.length;
|
||||||
|
for (var i=1;i<4;i++)
|
||||||
|
{
|
||||||
|
if (val>=Math.pow(10,(3*i)))
|
||||||
|
{
|
||||||
|
val_format=val_format.substring(0,nb-(3*i))+separateur+val_format.substring(nb-(3*i));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (ndecimal>0)
|
||||||
|
{
|
||||||
|
var decim="";
|
||||||
|
for (var j=0;j<(ndecimal-deci.toString().length);j++) {decim+="0";}
|
||||||
|
deci=decim+deci.toString();
|
||||||
|
val_format=val_format+","+deci;
|
||||||
|
}
|
||||||
|
if (parseFloat(valeur)<0) {val_format="-"+val_format;}
|
||||||
|
return val_format;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================= fonctions de navigation dans les listes (mois/visiteurs)
|
||||||
|
function premier(statut)
|
||||||
|
{
|
||||||
|
if (statut=='V') {
|
||||||
|
document.choixM.lstMois.value = document.choixM.lstMois.options[0].value;
|
||||||
|
document.choixM.submit();}
|
||||||
|
else {
|
||||||
|
document.choixV.lstVisiteurs.value = document.choixV.lstVisiteurs.options[0].value;
|
||||||
|
document.choixV.submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
function precedent(statut)
|
||||||
|
{
|
||||||
|
if (statut=='V') {
|
||||||
|
document.choixM.lstMois.value = document.choixM.lstMois.options[Math.max(0,document.choixM.lstMois.selectedIndex-1)].value;
|
||||||
|
document.choixM.submit(statut);}
|
||||||
|
else {
|
||||||
|
document.choixV.lstVisiteurs.value = document.choixV.lstVisiteurs.options[Math.max(0,document.choixV.lstVisiteurs.selectedIndex-1)].value;
|
||||||
|
document.choixV.submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
function suivant(statut)
|
||||||
|
{
|
||||||
|
if (statut=='V') {
|
||||||
|
document.choixM.lstMois.value = document.choixM.lstMois.options[(Math.min((document.choixM.lstMois.options.length-1),document.choixM.lstMois.selectedIndex+1))].value;
|
||||||
|
document.choixM.submit();}
|
||||||
|
else {
|
||||||
|
document.choixV.lstVisiteurs.value = document.choixV.lstVisiteurs.options[(Math.min((document.choixV.lstVisiteurs.options.length-1),document.choixV.lstVisiteurs.selectedIndex+1))].value;
|
||||||
|
document.choixV.submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
function dernier(statut)
|
||||||
|
{
|
||||||
|
if (statut=='V') {
|
||||||
|
document.choixM.lstMois.value = document.choixM.lstMois.options[(document.choixM.lstMois.options.length-1)].value;
|
||||||
|
document.choixM.submit();}
|
||||||
|
else {
|
||||||
|
document.choixV.lstVisiteurs.value = document.choixV.lstVisiteurs.options[(document.choixV.lstVisiteurs.options.length-1)].value;
|
||||||
|
document.choixV.submit();}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ========================= acivation/desactivation des cases a cocher "justificatifs" pour les frais hors forfaits
|
||||||
|
function tousLesJustificatifs(frm)
|
||||||
|
{
|
||||||
|
inputs = frm.getElementsByTagName("input");
|
||||||
|
var sens = frm.zSens.value;
|
||||||
|
for(i=0 ; i<inputs.length ; i++)
|
||||||
|
{
|
||||||
|
if(inputs[i].type=="checkbox")
|
||||||
|
{
|
||||||
|
if (sens=="off") {inputs[i].checked = true;} else {inputs[i].checked = false;};
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
if (sens=="off") {frm.zSens.value="on";} else {frm.zSens.value="off";}
|
||||||
|
}
|
||||||
|
|
||||||
|
function tousLesJustificatifs2(frm)
|
||||||
|
{
|
||||||
|
var sens = frm.zSens.value;
|
||||||
|
for (i = 0; i < frm.justificatifs.length; i++)
|
||||||
|
{
|
||||||
|
if (sens=="off") {frm.justificatifs[i].checked = true;} else {frm.justificatifs[i].checked = false;};
|
||||||
|
}
|
||||||
|
if (sens=="off") {frm.zSens.value="on";} else {frm.zSens.value="off";}
|
||||||
|
}
|
@ -30,64 +30,7 @@ $$ LANGUAGE 'plpgsql';
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
--Fonction pour passer les fiches de "créé" à "saisi cloturé" ET passe les frais HF sur la fiche suivante
|
|
||||||
--dateN -> '202403'
|
|
||||||
CREATE OR REPLACE FUNCTION updateEtat(curMonth varchar(6), prevMonth varchar(6)) RETURNS bool AS $$
|
|
||||||
DECLARE
|
|
||||||
"listeVisiteur" RECORD;
|
|
||||||
curMontantValid FLOAT;
|
|
||||||
oldMontantValid FLOAT;
|
|
||||||
BEGIN
|
|
||||||
--Update les fiches Créées en cloturé si la date est inf au mois courant
|
|
||||||
UPDATE remboursement
|
|
||||||
SET "rEtat" = 'CL'
|
|
||||||
WHERE "rEtat" = 'CR' AND "rMois" < curMonth;
|
|
||||||
|
|
||||||
--Crée une Fiche pour tous les visiteurs qui n'ont pas de fiches mais dont les frais HF doivent être reportés
|
|
||||||
FOR "listeVisiteur" IN
|
|
||||||
SELECT "rVisiteur", SUM("lhMontant") as "montant" FROM remboursement
|
|
||||||
INNER JOIN ligne_hors_forfait ON "rVisiteur" = "lhVisiteur" AND "rMois" = "lhMois"
|
|
||||||
WHERE "rMois" <= curMonth AND "rEtat" = 'CL' AND "lhJustificatif" = FALSE AND "lhRefus" = FALSE
|
|
||||||
GROUP BY "rVisiteur"
|
|
||||||
LOOP
|
|
||||||
--Crée la demande si elle n'existe pas
|
|
||||||
PERFORM newRemboursement("listeVisiteur"."rVisiteur", curMonth);
|
|
||||||
--RECUP l'ancien montant
|
|
||||||
SELECT "rMontantValide" INTO curMontantValid
|
|
||||||
FROM remboursement
|
|
||||||
WHERE "rVisiteur" = "listeVisiteur"."rVisiteur" AND "rMois" = curMonth;
|
|
||||||
|
|
||||||
SELECT "rMontantValide" INTO oldMontantValid
|
|
||||||
FROM remboursement
|
|
||||||
WHERE "rVisiteur" = "listeVisiteur"."rVisiteur" AND "rMois" = prevMonth;
|
|
||||||
--Actualise les montants totaux de remboursement
|
|
||||||
UPDATE remboursement
|
|
||||||
SET "rMontantValide" = curMontantValid + "listeVisiteur"."montant"
|
|
||||||
WHERE "rVisiteur" = "listeVisiteur"."rVisiteur" AND "rMois" = curMonth;
|
|
||||||
|
|
||||||
UPDATE remboursement
|
|
||||||
SET "rMontantValide" = oldMontantValid - "listeVisiteur"."montant"
|
|
||||||
WHERE "rVisiteur" = "listeVisiteur"."rVisiteur" AND "rMois" = prevMonth;
|
|
||||||
END LOOP;
|
|
||||||
|
|
||||||
--Passe les lignes HF non validé avec justif
|
|
||||||
UPDATE ligne_hors_forfait
|
|
||||||
SET "lhMois" = curMonth
|
|
||||||
WHERE "lhMois" <= prevMonth AND "lhJustificatif" = FALSE AND "lhRefus" = FALSE;
|
|
||||||
|
|
||||||
--Passe le remboursement en validé
|
|
||||||
UPDATE remboursement
|
|
||||||
SET "rEtat" = 'VA'
|
|
||||||
WHERE "rEtat" = 'CL' AND "rMois" < prevMonth;
|
|
||||||
|
|
||||||
--UPDATE les 'vlaidée et mise en paiement en remboursé
|
|
||||||
UPDATE remboursement
|
|
||||||
SET "rEtat" = 'RB'
|
|
||||||
WHERE "rEtat" = "VA" AND 'rMois' > prevMonth;
|
|
||||||
|
|
||||||
RETURN true;
|
|
||||||
END;
|
|
||||||
$$ LANGUAGE 'plpgsql';
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<!--
|
<!-- 03/05/2023 à 11H01 -->
|
||||||
Page formulaire de connexion
|
|
||||||
-->
|
|
||||||
<section class="vh-100 gradient-custom">
|
<section class="vh-100 gradient-custom">
|
||||||
<div class="container py-5 h-100">
|
<div class="container py-5 h-100">
|
||||||
<div class="row d-flex justify-content-center align-items-center h-100">
|
<div class="row d-flex justify-content-center align-items-center h-100">
|
||||||
@ -25,6 +23,8 @@
|
|||||||
<label class="form-label" for="typePasswordX">Mot-de-passe</label>
|
<label class="form-label" for="typePasswordX">Mot-de-passe</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- <p class="small mb-5 pb-lg-2"><a class="text-white-50" href="#!">Forgot password?</a></p> -->
|
||||||
|
|
||||||
<button class="btn btn-outline-light btn-lg px-5"
|
<button class="btn btn-outline-light btn-lg px-5"
|
||||||
type="submit">Connexion</button>
|
type="submit">Connexion</button>
|
||||||
</form>
|
</form>
|
||||||
@ -44,3 +44,26 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
<!--
|
||||||
|
|
||||||
|
<div id="contenu">
|
||||||
|
<h2>Identification utilisateur</h2>
|
||||||
|
|
||||||
|
|
||||||
|
<form method="POST" action="index.php?uc=connexion&action=valideConnexion">
|
||||||
|
|
||||||
|
|
||||||
|
<p>
|
||||||
|
<label for="nom">Login*</label>
|
||||||
|
<input id="login" type="text" name="login" size="30" maxlength="45">
|
||||||
|
</p>
|
||||||
|
<p>
|
||||||
|
<label for="mdp">Mot de passe*</label>
|
||||||
|
<input id="mdp" type="password" name="mdp" size="30" maxlength="45">
|
||||||
|
</p>
|
||||||
|
<input type="submit" value="Valider" name="valider">
|
||||||
|
<input type="reset" value="Annuler" name="annuler">
|
||||||
|
</p>
|
||||||
|
</form>
|
||||||
|
|
||||||
|
</div>
|
10
vues/v_erreurs.php
Normal file
10
vues/v_erreurs.php
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
<div class ="erreur">
|
||||||
|
<ul>
|
||||||
|
<?php
|
||||||
|
foreach($_REQUEST['erreurs'] as $erreur)
|
||||||
|
{
|
||||||
|
echo "<li>$erreur</li>";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</ul>
|
||||||
|
</div>
|
@ -14,7 +14,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($lesFiches as $uneFiche): ?>
|
<?php foreach ($lesFiches as $uneFiche) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
||||||
@ -29,16 +29,17 @@
|
|||||||
<td>
|
<td>
|
||||||
<?= $uneFiche['eLibelle'] ?>
|
<?= $uneFiche['eLibelle'] ?>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td><a
|
||||||
<a
|
href="index.php?direction=nouvelleFiche&userId=<?= $userId ?>&dateListing=<?= $uneFiche['rMois'] ?>">voir</a>
|
||||||
href="index.php?direction=nouvelleFiche&userId=<?= $uneFiche['rVisiteur'] ?>&dateListing=<?= $uneFiche['rMois'] ?>">voir</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php if ($pages > 0): ?>
|
|
||||||
|
|
||||||
|
<?php if ($pages > 0) { ?>
|
||||||
<div class="col-4 d-flex mx-auto">
|
<div class="col-4 d-flex mx-auto">
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
@ -50,16 +51,20 @@
|
|||||||
<?php for ($page = 1; $page <= $pages; $page++): ?>
|
<?php for ($page = 1; $page <= $pages; $page++): ?>
|
||||||
<!-- Lien vers chacune des pages (activé si on se trouve sur la page correspondante) -->
|
<!-- Lien vers chacune des pages (activé si on se trouve sur la page correspondante) -->
|
||||||
<li class="page-item <?= ($currentPage == $page) ? "active" : "" ?>">
|
<li class="page-item <?= ($currentPage == $page) ? "active" : "" ?>">
|
||||||
<a href="index.php?direction=ficheAvalider&page=<?= $page ?>" class="page-link">
|
<a href="index.php?direction=ficheAvalider&page=<?= $page ?>"
|
||||||
|
class="page-link">
|
||||||
<?= $page ?>
|
<?= $page ?>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<?php endfor ?>
|
<?php endfor ?>
|
||||||
<!-- Lien vers la page suivante (désactivé si on se trouve sur la dernière page) -->
|
<!-- Lien vers la page suivante (désactivé si on se trouve sur la dernière page) -->
|
||||||
<li class="page-item <?= ($currentPage == $pages) ? "disabled" : "" ?>">
|
<li class="page-item <?= ($currentPage == $pages) ? "disabled" : "" ?>">
|
||||||
<a href="index.php?direction=ficheAvalider&page=<?= $currentPage + 1 ?>" class="page-link">Suivante</a>
|
<a href="index.php?direction=ficheAvalider&page=<?= $currentPage + 1 ?>"
|
||||||
|
class="page-link">Suivante</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<?php endif; ?>
|
<?php
|
||||||
|
};
|
||||||
|
?>
|
@ -7,10 +7,9 @@
|
|||||||
} else { ?>
|
} else { ?>
|
||||||
|
|
||||||
<form action="index.php?direction=gestionFiche" method="POST">
|
<form action="index.php?direction=gestionFiche" method="POST">
|
||||||
|
|
||||||
<h3>Gérer les fiches de frais de :</h3>
|
|
||||||
<select class="form-select" name="selVisiteur" id="">
|
|
||||||
<?php
|
<?php
|
||||||
|
echo '<h3>Gérer les fiches de frais de :</h3>';
|
||||||
|
echo '<select class="form-select" name="selVisiteur" id="">';
|
||||||
foreach ($LesUtilisateurs as $key => $value) {
|
foreach ($LesUtilisateurs as $key => $value) {
|
||||||
$id = $value['uId'];
|
$id = $value['uId'];
|
||||||
$prenom = $value['uPrenom'];
|
$prenom = $value['uPrenom'];
|
||||||
@ -25,7 +24,8 @@
|
|||||||
echo '</select>'; ?>
|
echo '</select>'; ?>
|
||||||
<button type="submit" class="btn btn-dark m-2">Selectionner</button>
|
<button type="submit" class="btn btn-dark m-2">Selectionner</button>
|
||||||
<!-- Fin du formulaire -->
|
<!-- Fin du formulaire -->
|
||||||
<?php } ?>
|
<?php }
|
||||||
|
?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -42,7 +42,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
<?php foreach ($lesFiches as $uneFiche): ?>
|
<?php foreach ($lesFiches as $uneFiche) { ?>
|
||||||
<tr>
|
<tr>
|
||||||
<th scope="row">
|
<th scope="row">
|
||||||
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
<?= $gestionFiche->dateComplete($uneFiche['rMois']) ?>
|
||||||
@ -57,7 +57,7 @@
|
|||||||
href="index.php?direction=nouvelleFiche&userId=<?= $userId ?>&dateListing=<?= $uneFiche['rMois'] ?>">voir</a>
|
href="index.php?direction=nouvelleFiche&userId=<?= $userId ?>&dateListing=<?= $uneFiche['rMois'] ?>">voir</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<?php endforeach ?>
|
<?php } ?>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
@ -66,7 +66,7 @@
|
|||||||
PAGINATION:
|
PAGINATION:
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<?php if ($pages > 1): ?>
|
<?php if ($pages > 0) { ?>
|
||||||
<div class="col-4 d-flex mx-auto">
|
<div class="col-4 d-flex mx-auto">
|
||||||
<nav>
|
<nav>
|
||||||
<ul class="pagination">
|
<ul class="pagination">
|
||||||
@ -92,4 +92,6 @@
|
|||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php
|
||||||
|
};
|
||||||
|
?>
|
@ -1,7 +1,4 @@
|
|||||||
<h4 class="d-block mx-auto my-2 text-align-center">BONJOUR
|
<h4 class="d-block mx-auto my-2 text-align-center">BONJOUR <?= strtoupper($_SESSION['uPrenom']) ?> NOUS SOMMES LE <?= date('d-m-Y') ?></h4>
|
||||||
<?= strtoupper($_SESSION['uPrenom']) ?> NOUS SOMMES LE
|
|
||||||
<?= date('d-m-Y') ?>
|
|
||||||
</h4>
|
|
||||||
|
|
||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header">
|
<div class="card-header">
|
||||||
|
@ -8,11 +8,6 @@
|
|||||||
ID:
|
ID:
|
||||||
<?= $userId . '-' . $date ?>
|
<?= $userId . '-' . $date ?>
|
||||||
</p>
|
</p>
|
||||||
<p class="color-grey" id='idFiche'>
|
|
||||||
Status:
|
|
||||||
<?= $status['eLibelle'] ?>
|
|
||||||
</p>
|
|
||||||
|
|
||||||
</center>
|
</center>
|
||||||
<br>
|
<br>
|
||||||
<!--
|
<!--
|
||||||
@ -152,21 +147,12 @@
|
|||||||
/**
|
/**
|
||||||
* Affiche le bouton si fiche non cloturé
|
* Affiche le bouton si fiche non cloturé
|
||||||
*/
|
*/
|
||||||
if ($disabled == ''):
|
if ($status === 'CR'):
|
||||||
?>
|
?>
|
||||||
<div class="col-3 d-flex mx-auto my-5 justify-content-center">
|
<div class="col-3 d-flex mx-auto my-5 justify-content-center">
|
||||||
<?php
|
<button type="button" class="btn btn-outline-primary btn-lg" id="sendFileBtn" data-uType="<?= $typeUser ?>">Envoyer
|
||||||
if ($typeUser == 'comptable' && $status['eId'] == 'CL'): ?>
|
la Fiche
|
||||||
<button type="button" class="btn btn-outline-primary btn-lg" id="validSheetBtn"
|
</button>
|
||||||
data-uType="<?= $typeUser ?>">Valider
|
|
||||||
la Fiche
|
|
||||||
</button>
|
|
||||||
<?php else: ?>
|
|
||||||
<button type="button" class="btn btn-outline-primary btn-lg" id="sendFileBtn" data-uType="<?= $typeUser ?>">Envoyer
|
|
||||||
la Fiche
|
|
||||||
</button>
|
|
||||||
<?php endif ?>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<?php endif ?>
|
<?php endif ?>
|
||||||
<script src="include/newFiche.js"></script>
|
<script src="include/newFiche.js"></script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user