104 lines
3.7 KiB
PHP
Executable File
104 lines
3.7 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 ControleurDetailfacturegarant extends Controleur
|
|
{
|
|
private $menuvue;
|
|
private $facture;
|
|
private $periode;
|
|
private $exercice;
|
|
private $garants;
|
|
private $periodicite;
|
|
|
|
public function __construct() {
|
|
$this->menuvue = new Menuvueutilisateur();
|
|
$this->menuvue->getMenuVue("Detailfacturegarant");
|
|
$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();
|
|
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
$typefacture = $this->facture->getTypeFactureGarant($entetefacturegarant['codeGcAssureur']);
|
|
|
|
|
|
|
|
$_SESSION['codeGcAssureur_F'] = $entetefacturegarant['codeGcAssureur'];
|
|
$_SESSION['codeTypeFacturationGarant_F'] = $entetefacturegarant['codeTypeFacturationGarant'];
|
|
//$_SESSION['codeGcAssureur_F'] = $entetefacturegarant['codeGcAssureur'];
|
|
|
|
$codeTypeFacturationGarant = $_SESSION['codeTypeFacturationGarant_F'];
|
|
$codeGcAssureur = $_SESSION['codeGcAssureur_F'];
|
|
|
|
$moisDebut = $this->periode->getListe();
|
|
$moisFin = $this->periode->getListe();
|
|
|
|
$listeavenants = array();
|
|
$listepolices = array();
|
|
$listecolleges = array();
|
|
$listeassiettes = array();
|
|
|
|
if($codeTypeFacturationGarant=="CAUTP")
|
|
{
|
|
$this->facture->majCautionGarant($codeGcAssureur);
|
|
|
|
}elseif($codeTypeFacturationGarant=="SIN"){
|
|
$this->facture->majSinistresGarant($codeGcAssureur);
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
|
|
}elseif($codeTypeFacturationGarant=="HPRI"){
|
|
$this->facture->majHonorairePrimesGarant($codeGcAssureur);
|
|
$listeavenants = $this->facture->getListeAvenants();
|
|
|
|
}elseif($codeTypeFacturationGarant=="HSIN"){
|
|
$this->facture->majHonaireSinistresGarant($codeGcAssureur);
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
|
|
}elseif($codeTypeFacturationGarant=="HFOR"){
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
|
|
}elseif($codeTypeFacturationGarant=="APF"){
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
|
|
}elseif($codeTypeFacturationGarant=="APC"){
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
|
|
}elseif($codeTypeFacturationGarant=="HBUD"){
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
|
|
}
|
|
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVue(array(
|
|
'chemin' => $chemin,
|
|
'periodicites' => $periodicites,
|
|
'exercice' => $this->exercice,
|
|
'garants' => $this->garants,
|
|
'entetefacturegarant' => $entetefacturegarant,
|
|
'typefacture' => $typefacture,
|
|
'moisDebut' => $moisDebut,
|
|
'moisFin' => $moisFin,
|
|
'listeavenants' => $listeavenants,
|
|
'listepolices' => $listepolices,
|
|
'listecolleges' => $listecolleges,
|
|
'listeassiettes' => $listeassiettes
|
|
));
|
|
}
|
|
} |