112 lines
3.2 KiB
PHP
Executable File
112 lines
3.2 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Adherent.php';
|
|
require_once 'Modele/Beneficiaire.php';
|
|
|
|
class ControleurAjaxadherent extends Controleur {
|
|
private $adherent;
|
|
private $beneficiaire;
|
|
|
|
public function __construct() {
|
|
$this->adherent = new Adherent();
|
|
$this->beneficiaire = new Beneficiaire();
|
|
}
|
|
|
|
public function index() {
|
|
$this->genererVueAjax();
|
|
}
|
|
|
|
public function supprimer() {
|
|
$idAherent = $this->requete->getParametreFormulaire("idAherent");
|
|
$this->adherent->supprimer($idAherent);
|
|
|
|
// On actualise le contexte : NbAdh et NbAss
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
$this->adherent->getNbassure($idPolice);
|
|
}
|
|
|
|
public function recalculersoldefamille()
|
|
{
|
|
$this->adherent->recalculersoldefamille();
|
|
}
|
|
|
|
public function ajouteradherentfacturation()
|
|
{
|
|
$idPolice = $_SESSION['idPolice_C'];
|
|
|
|
$racineNoAdherent = $this->requete->getSession()->getAttribut('racineNoAdherent');
|
|
$codeSociete = $this->requete->getSession()->getAttribut('codeSociete');
|
|
$idCollege = $this->adherent->getcollegeavenantfacturation($idPolice);
|
|
$numeroPolice = $_SESSION['numeroPolice_C'];
|
|
$nom = "AVENANT";
|
|
$prenoms = "FACTURATION";
|
|
$codeNaturePiece = "";
|
|
$numeroPiece = "";
|
|
$sexe = "M";
|
|
|
|
$dateNaissance = $this->adherent->getdateeffetpolice($idPolice);
|
|
|
|
|
|
$codeGroupeSanguin = "";
|
|
$codeSituationFamille = "";
|
|
$nombreEnfants = "0";
|
|
$adresseGeo = "";
|
|
$adressePostale = "";
|
|
$codePays = "";
|
|
$codeVille = "";
|
|
$codeLocalite = "";
|
|
$telephonFixe = "";
|
|
$telephonePortable = "";
|
|
$email = "";
|
|
$dateEntree = $this->adherent->getdateeffetpolice($idPolice);;
|
|
$idAvenant = "0";
|
|
|
|
$numeroCmu = "";
|
|
|
|
$numeroMatricule = "";
|
|
|
|
$user = $this->requete->getSession()->getAttribut('login');
|
|
$dateCre = date("Y-m-d");
|
|
|
|
|
|
$codeTarifActe = "";
|
|
|
|
//ajouter par sorel 19-06-2023
|
|
$dateSouscription = null;
|
|
|
|
$numeroBs = "";
|
|
$vip = "";
|
|
$ancienNumeroAssure = "";
|
|
$seuilRdAdherent = "0";
|
|
|
|
|
|
|
|
$enVigueur = "1";
|
|
$rib = "";
|
|
$codeModePaiement = "";
|
|
|
|
|
|
$beneficiaireReglement = "";
|
|
$codeLienBeneficiaire = "";
|
|
$telephoneMobile = "";
|
|
|
|
$codeTypeRemboursement = "";
|
|
$prorata = "1";
|
|
|
|
|
|
|
|
$this->adherent->initavenantfacturationadherent_temp($idCollege,$dateEntree,$user,$prorata);
|
|
|
|
|
|
$dernierIdAdherent = $this->adherent->ajouteradherentfacturation($idPolice, $idCollege, $nom, $prenoms, $codeNaturePiece, $numeroPiece, $sexe,
|
|
$dateNaissance, $codeGroupeSanguin, $codeSituationFamille, $nombreEnfants, $adresseGeo, $adressePostale, $codePays, $codeVille,
|
|
$telephonFixe, $telephonePortable, $email, $dateEntree, $user, $idAvenant, $codeLocalite, $numeroCmu, $numeroMatricule, $codeTarifActe,
|
|
$dateSouscription, $vip, $seuilRdAdherent, $numeroBs, $ancienNumeroAssure, $beneficiaireReglement, $codeLienBeneficiaire, $codeModePaiement,
|
|
$enVigueur, $telephoneMobile, $rib, $codeTypeRemboursement) ;
|
|
|
|
|
|
|
|
$idBeneficiaire = $this->beneficiaire->ajouterbeneficiairefacturation($dernierIdAdherent);
|
|
|
|
}
|
|
} |