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

169 lines
5.1 KiB
PHP
Executable File

<?php
require_once 'Framework/Controleur.php';
require_once $_SESSION['dossierSociete'].'/Tarifs/Modele/College_temp.php';
require_once 'Modele/Ouinon.php';
class ControleurAjaxprimescategorie extends Controleur {
private $college_temp;
private $ouinon;
private $ouinonautoriser;
public function __construct() {
$this->college_temp = new College_temp();
$this->ouinonautoriser = (new Ouinon())->getListe();
}
public function index()
{
require_once $_SESSION['dossierSociete'].'/Tarifs/Controleur/Ajaxprimescategorie.php';
}
public function majprimecollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$prime = $this->requete->getParametreFormulaire("prime");
$primeverifie = $this->college_temp->getPrimeMincollege($idPrime);
if($prime < $primeverifie['primeMin']){
echo "La prime entrée est inférieure à la prime minimale indicative (".$primeverifie['primeMin'].")!/The premium entered is lower than the indicative minimum premium (".$primeverifie['primeMin'].")!";
}
$this->college_temp->majprimecollege($idPrime, $prime);
}
public function majpopulationcollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$population = $this->requete->getParametreFormulaire("population");
$this->college_temp->majpopulationcollege($idPrime, $population);
}
public function majforfaitcollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$forfait = $this->requete->getParametreFormulaire("forfait");
$_SESSION['forfait'] = $forfait;
$this->college_temp->majforfaitcollege($idPrime, $forfait);
}
public function majplafondcollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$plafond = $this->requete->getParametreFormulaire("plafond");
$this->college_temp->majplafondcollege($idPrime,$plafond);
}
public function majplafondfamille()
{
$plafond = $this->requete->getParametreFormulaire("plafond","numerique");
$this->college_temp->majplafondfamille($plafond);
}
public function majplafondindividu()
{
$plafond = $this->requete->getParametreFormulaire("plafond","numerique");
$this->college_temp->majplafondindividu($plafond);
//$this->executerAction("index");
}
public function majnbrefamillecollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$nbreFamille = $this->requete->getParametreFormulaire("nbreFamille");
$this->college_temp->majnbrefamillecollege($idPrime, $nbreFamille);
}
public function majprimesupplementairecollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$prime = $this->requete->getParametreFormulaire("prime");
$this->college_temp->majprimesupplementairecollege($idPrime,$prime);
}
public function majprimetrancheage()
{
$idPrime = $this->requete->getParametre("idPrime");
$prime = $this->requete->getParametreFormulaire("prime");
$this->college_temp->majprimetrancheage($idPrime,$prime);
}
public function majpopulationtranche()
{
$idPrime = $this->requete->getParametre("idPrime");
$population = $this->requete->getParametreFormulaire("population");
$this->college_temp->majpopulationtranche($idPrime, $population);
}
public function inittrancheage()
{
$codeGcAssureur = $_SESSION['codeGcAssureur'];
$codeProduit = $this->requete->getParametreFormulaire("codeProduit");
$this->college_temp->init_trancheage_temp($codeProduit, $codeGcAssureur);
}
public function initprimelienparente()
{
$codeGcAssureur = $_SESSION['codeGcAssureur'];
$codeProduit = $this->requete->getParametreFormulaire("codeProduit");
$this->college_temp->init_primelienparente_temp($codeProduit, $codeGcAssureur);
}
public function initprimebasetarif()
{
$codeGcAssureur = $_SESSION['codeGcAssureur'];
$codeProduit = $this->requete->getParametreFormulaire("codeProduit");
$codeBaseTarification = $this->requete->getParametreFormulaire("codeBaseTarification");
$this->college_temp->init_prime_base_tarif_temp($codeProduit, $codeGcAssureur, $codeBaseTarification);
}
public function majautorisercollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$autorise = $this->requete->getParametreFormulaire("autorise");
//var_dump($idPrime,$autorise);
$this->college_temp->majautorisercollege($idPrime,$autorise);
}
public function majagemincollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$ageMin = $this->requete->getParametreFormulaire("ageMin");
$this->college_temp->majagemincollege($idPrime,$ageMin);
}
public function majagemaxcollege()
{
$idPrime = $this->requete->getParametre("idPrime");
$ageMax = $this->requete->getParametreFormulaire("ageMax");
$this->college_temp->majagemaxcollege($idPrime,$ageMax);
}
}