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

66 lines
1.9 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once 'Modele/Facturegarant.php';
class ControleurAjaxfichefacturegarant extends Controleur
{
private $facture;
public function __construct() {
$this->facture = new Facturegarant();
}
public function index()
{
$idEntetefacturegarant = $this->requete->getParametreFormulaire("idEntetefacturegarant");;
$_SESSION['idEntetefacturegarant_F'] = $idEntetefacturegarant;
$facturegarant = $this->facture->getEnteteFactureGarantID($idEntetefacturegarant);
$_SESSION['codeTypeFacturationGarant_F'] = $facturegarant['codeTypeFacturationGarant'];
$conventions = $this->facture->getTypeConvention($facturegarant['codeTypeFacturationGarant']);
$listepolices = $this->facture->getPolicesFactureGarant($idEntetefacturegarant);
$listecolleges = $this->facture->getCollegesFactureGarant($idEntetefacturegarant);
$detaildeficitgarant = array();
if($_SESSION['codeTypeFacturationGarant_F'] == "DEF")
{
$detaildeficitgarant = $this->facture->getDetailFactureDeficitGarant($idEntetefacturegarant);
}
$this->genererVueAjax(array(
'facturegarant' => $facturegarant,
'listepolices' => $listepolices,
'listecolleges' => $listecolleges,
'conventions' => $conventions,
'detaildeficitgarant' => $detaildeficitgarant
));
}
public function groupefacture()
{
$idGroupefacturegarant = $this->requete->getParametreFormulaire("idGroupefacturegarant");
$_SESSION['idGroupeFacturegarant_F'] = $idGroupefacturegarant;
//var_dump($idGroupefacturegarant);
$groupefacturegarant = $this->facture->getGroupeFactureGarantID($idGroupefacturegarant);
$facturesgarant = $this->facture->getEntetesFacturesGarant($idGroupefacturegarant);
$this->genererVueAjax(array(
'groupefacturegarant' => $groupefacturegarant,
'facturesgarant' => $facturesgarant
));
}
}