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

87 lines
2.8 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 ControleurDetailgroupefacturegarant extends Controleur
{
private $menuvue;
private $facture;
private $periode;
private $exercice;
private $garants;
private $periodicite;
public function __construct() {
$this->menuvue = new Menuvueutilisateur();
$this->menuvue->getMenuVue("Detailgroupefacturegarant");
$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()
{
//$chemin = $this->menuvue->getChemin('Detailfacturegarant');
$periodicites = $this->periodicite->getPeriodiciteFactureGarant();
$groupefacturegarant = $this->facture->getGroupeFactureGarant();
$codeNatureFacturationGarant = $groupefacturegarant['codeNatureFacturationGarant'];
$typefacture = $this->facture->getTypeFactureGarantNature($codeNatureFacturationGarant);
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
$entetefactures = $this->facture->getEnteteFactures();
$_SESSION['codeGcAssureur_F'] = $groupefacturegarant['codeGcAssureur'];
//$_SESSION['codeTypeFacturationGarant_F'] = $entetefacturegarant['codeTypeFacturationGarant'];
$_SESSION['codeNatureFacturationGarant_F'] = $codeNatureFacturationGarant;
//$codeTypeFacturationGarant = $_SESSION['codeTypeFacturationGarant_F'];
$codeGcAssureur = $_SESSION['codeGcAssureur_F'];
$moisDebut = $this->periode->getListe();
$moisFin = $this->periode->getListe();
$listeavenants = array();
$listepolices = array();
$listecolleges = array();
$listeassiettes = array();
$detaildeficitgarant = array();
if($codeNatureFacturationGarant == "DEF")
{
$detaildeficitgarant = $this->facture->getDetailDeficitGarant();
}
$this->genererVue(array(
'periodicites' => $periodicites,
'exercice' => $this->exercice,
'garants' => $this->garants,
'entetefacturegarant' => $entetefacturegarant,
'groupefacturegarant' => $groupefacturegarant,
'typefacture' => $typefacture,
'moisDebut' => $moisDebut,
'moisFin' => $moisFin,
'listeavenants' => $listeavenants,
'listepolices' => $listepolices,
'listecolleges' => $listecolleges,
'listeassiettes' => $listeassiettes,
'entetefactures' => $entetefactures,
'detaildeficitgarant' => $detaildeficitgarant
));
}
}