javascript et finalisation de la vue new fiche avant l'ajout de modification/ajout de fiche
This commit is contained in:
@@ -4,11 +4,45 @@ require_once(__DIR__ . '/../Class/class.newFiche.php');
|
||||
$newFiche = new Class_newFiche($pdo);
|
||||
|
||||
$_SESSION['userId'] = 'b34';
|
||||
$_SESSION['typeU'] = 'visiteur';
|
||||
$date = '202011';
|
||||
|
||||
/**
|
||||
* Gestion de la date selon la vue à afficher
|
||||
*/
|
||||
if (isset($_GET['currentList'])) {
|
||||
//Date des req SQL et function
|
||||
$date = date('Ym');
|
||||
|
||||
//Date du header
|
||||
try {
|
||||
//sudo timedatectl set-local-rtc 1
|
||||
$format = new IntlDateFormatter(
|
||||
'fr_FR',
|
||||
IntlDateFormatter::FULL,
|
||||
IntlDateFormatter::FULL,
|
||||
'Europe/Paris',
|
||||
IntlDateFormatter::GREGORIAN,
|
||||
'MMMM Y'
|
||||
);
|
||||
$dateHeader = $format->format(time());
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
$dateHeader = date('F Y');
|
||||
}
|
||||
|
||||
//Date du formulaire HF
|
||||
$dateFormHFMin = date('Y-m-\01');
|
||||
$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'])) {
|
||||
$date = $_GET['dateListing'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Liste des frais forfaitaires du mois et de l'user :: sinon afficher les libelle
|
||||
*/
|
||||
$listeFraisForfaitaire = $newFiche->listFraisForfaitForU($_SESSION['userId'], '202011');
|
||||
$listeFraisForfaitaire = $newFiche->listFraisForfaitForU($_SESSION['userId'], $date);
|
||||
if (count($listeFraisForfaitaire) == 0) {
|
||||
$listeFraisForfaitaire = $newFiche->listFraisForfaitaires();
|
||||
}
|
||||
@@ -16,7 +50,11 @@ if (count($listeFraisForfaitaire) == 0) {
|
||||
/**
|
||||
* Listes des frais HF
|
||||
*/
|
||||
$listeFraisHf = $newFiche->listFraisHF($_SESSION['userId'], '202011');
|
||||
$listeFraisHf = $newFiche->listFraisHF($_SESSION['userId'], $date);
|
||||
|
||||
/**
|
||||
* TOTAL DE LA FICHE
|
||||
*/
|
||||
$totalFraisFiche = $newFiche->getMontantValide($_SESSION['userId'], $date);
|
||||
|
||||
include(__DIR__ . '/../vues/v_newFiche.php');
|
||||
|
Reference in New Issue
Block a user