86 lines
3.1 KiB
PHP
Executable File
86 lines
3.1 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
//require_once 'Framework/Controleurtraitementimage.php';
|
|
require_once 'Modele/Adherent.php';
|
|
require_once 'Modele/Beneficiaire.php';
|
|
require_once 'Modele/Police.php';
|
|
require_once 'Modele/Garantieadherent.php';
|
|
require_once 'Modele/Garantie.php';
|
|
|
|
//use Intervention\Image\ImageManager;
|
|
|
|
class ControleurAjaxinfosbeneficiaire extends Controleur
|
|
//class ControleurAjaxinfosbeneficiaire extends Controleurtraitementimage
|
|
{
|
|
private $adherent;
|
|
private $beneficiaire;
|
|
private $police;
|
|
private $garantieadherent;
|
|
private $garantie;
|
|
|
|
public function __construct() {
|
|
$this->beneficiaire = new Beneficiaire();
|
|
$this->police = new Police();
|
|
$this->garantieadherent = new Garantieadherent();
|
|
$this->adherent = new Adherent();
|
|
|
|
$this->garantie = new Garantie();
|
|
|
|
$_SESSION['modeDevis'] = "0";
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
|
|
$numeroBeneficiaire = $this->requete->getParametreFormulaire("numeroBeneficiaire");
|
|
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
|
|
|
$infos = $this->beneficiaire->getBeneficiaireNumeroId($numeroBeneficiaire);
|
|
|
|
$idBeneficiaire = $infos['idBeneficiaire'];
|
|
//var_dump($idBeneficiaire);
|
|
|
|
$dateJour = date('Y-m-d');
|
|
|
|
$this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire);
|
|
$idPolice = $infos['idPolice'];
|
|
|
|
$this->police->getContextePoliceId($idPolice);
|
|
$this->beneficiaire->getContexteBeneficiaireId($idBeneficiaire);
|
|
|
|
$idAdherent = $infos['idAdherent'];
|
|
|
|
$garantieadherents = $this->garantieadherent->getGarantieBeneficiaire($idBeneficiaire);
|
|
|
|
$beneficiaire = $this->beneficiaire->getBeneficiaireId($idBeneficiaire);
|
|
|
|
$_SESSION['dateEffetCouvert'] = $beneficiaire['dateEffetCouvert'];
|
|
|
|
$this->adherent->getNbassure($idPolice);
|
|
|
|
$adherent = $this->adherent->getContexteAdherentId($idAdherent);
|
|
$beneficiaires = $this->beneficiaire->getBeneficiairesId($idAdherent, $dateJour);
|
|
$totalbeneficiaires = $this->beneficiaire->getTotalBeneficiairesId($idAdherent);
|
|
|
|
$this->adherent->controlerplafondadherentannuel($idAdherent);
|
|
$_SESSION['controlerPlafondBeneficiaire'] = "0";
|
|
|
|
$limite_adherent = $this->garantieadherent->getSituationPolice($infos['idBeneficiaire']);
|
|
|
|
$actes = $this->garantieadherent->getBaremePlafondAdherent($idAdherent, $idBeneficiaire);
|
|
|
|
$police = $this->beneficiaire->getSituationPolice($idBeneficiaire);
|
|
|
|
$college = $this->beneficiaire->getSituationCollege($idBeneficiaire);
|
|
|
|
$baseTarification = $this->beneficiaire->getBaseTarificationBeneficiaire($idBeneficiaire);
|
|
|
|
$garanties = $this->garantie->getListePourActe();
|
|
|
|
$this->genererVueAjax(array('beneficiaire' => $beneficiaire, 'garantieadherents' => $garantieadherents,
|
|
'adherent' => $adherent, 'beneficiaires' => $beneficiaires, 'totalbeneficiaires' => $totalbeneficiaires,
|
|
'limite_adherent' => $limite_adherent, 'actes' => $actes, 'police' => $police, 'college' => $college,
|
|
'baseTarification' => $baseTarification, 'numeroBeneficiaire' => $numeroBeneficiaire, 'garanties' => $garanties));
|
|
}
|
|
|
|
} |