production/Controleur/ControleurDetailfactureperiodiquegarant.php
2025-12-02 11:29:44 +00:00

75 lines
2.5 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Menuvueutilisateur.php';
require_once 'Modele/Periodicite.php';
require_once 'Modele/Periode.php';
require_once 'Modele/Exercice.php';
require_once 'Modele/Gestionconfiee.php';
require_once 'Modele/Facturegarant.php';
class ControleurDetailfactureperiodiquegarant extends Controleur
{
private $menuvue;
private $facture;
private $periode;
private $exercice;
private $garants;
private $periodicite;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue("Detailfactureperiodiquegarant");
$this->facture = new Facturegarant();
$this->periodicite = new Periodicite;
$this->exercice = (new Exercice())->getListe();
$this->garants = (new Gestionconfiee())->getListe();
$this->periode = new Periode();
}
public function index()
{
$idEntetefacturegarant = $this->requete->getParametreFormulaire("id");
$_SESSION['idEntetefacturegarant_temp'] = $idEntetefacturegarant;
$periodicites = $this->periodicite->getPeriodiciteFactureGarant();
$entetefacturegarant = $this->facture->getEnteteFactureGarantID_temp($idEntetefacturegarant);
$codeGcAssureur = $entetefacturegarant['codeGcAssureur'];
$codeTypeFacturationGarant = $entetefacturegarant['codeTypeFacturationGarant'];
$_SESSION['codeGcAssureur_F'] = $codeGcAssureur;
$_SESSION['codeTypeFacturationGarant_F'] = $codeTypeFacturationGarant;
$moisDebut = $this->periode->getListe();
$moisFin = $this->periode->getListe();
/*
$listeavenants = array();
$listepolices = array();
$listecolleges = array();
$listeassiettes = array();
*/
$listeavenants = $this->facture->getListeAvenantsID_temp($idEntetefacturegarant);
$listepolices = $this->facture->getListePolicesID_temp($idEntetefacturegarant);
$listecolleges = $this->facture->getListeCollegesID_temp($idEntetefacturegarant);
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
$this->genererVue(array(
'periodicites' => $periodicites,
'exercice' => $this->exercice,
'garants' => $this->garants,
'entetefacturegarant' => $entetefacturegarant,
'moisDebut' => $moisDebut,
'moisFin' => $moisFin,
'listeavenants' => $listeavenants,
'listepolices' => $listepolices,
'listecolleges' => $listecolleges,
'listeassiettes' => $listeassiettes
));
}
}