Initial commit for newdesigngestionnaire project
This commit is contained in:
172
Controleur/ControleurModifieradherent.php
Executable file
172
Controleur/ControleurModifieradherent.php
Executable file
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
require_once 'Framework/Controleur.php';
|
||||
require_once 'Modele/Adherent.php';
|
||||
require_once 'Modele/Police.php';
|
||||
require_once 'Modele/Collegepolice.php';
|
||||
require_once 'Modele/Menuvueutilisateur.php';
|
||||
require_once 'Modele/Beneficiaire.php';
|
||||
require_once 'Modele/Naturepiece.php';
|
||||
require_once 'Modele/Sexe.php';
|
||||
require_once 'Modele/Pays.php';
|
||||
require_once 'Modele/Situationfamille.php';
|
||||
require_once 'Modele/Groupesanguin.php';
|
||||
//require_once 'Societes/'.$_SESSION['codeSociete'].'/Tarifs/Modele/Tarif.php';
|
||||
require_once 'Modele/Ville.php';
|
||||
require_once 'Modele/Localite.php';
|
||||
require_once 'Modele/Tarifsactes.php';
|
||||
require_once 'Modele/Ouinon.php';
|
||||
require_once 'Modele/Lienbeneficiaire.php';
|
||||
require_once 'Modele/Pmodepaiement.php';
|
||||
require_once 'Modele/Produit.php';
|
||||
|
||||
class ControleurModifieradherent extends Controleur {
|
||||
private $menuvue;
|
||||
private $police;
|
||||
private $adherent;
|
||||
private $beneficiaire;
|
||||
private $naturepiece;
|
||||
private $sexe;
|
||||
private $pays;
|
||||
private $situationfamille;
|
||||
private $groupesanguin;
|
||||
private $tarif;
|
||||
private $college;
|
||||
private $ville;
|
||||
private $localite;
|
||||
private $lienbeneficiaire;
|
||||
private $modepaiement;
|
||||
private $produit;
|
||||
private $ouinonvip;
|
||||
private $ouinonconserver;
|
||||
private $ouinonenvigueur;
|
||||
|
||||
public function __construct() {
|
||||
$this->menuvue = new Menuvueutilisateur();
|
||||
$this->menuvue->getMenuVue('Modifieradherent');
|
||||
|
||||
$this->police = new Police();
|
||||
$this->adherent = new Adherent();
|
||||
$this->beneficiaire = new Beneficiaire();
|
||||
$this->naturepiece = (new Naturepiece())->getListe();
|
||||
$this->sexe = (new Sexe())->getListe();
|
||||
$this->situationfamille = (new Situationfamille())->getListe();
|
||||
// $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']);
|
||||
$this->pays = new Pays();
|
||||
$this->groupesanguin = (new Groupesanguin())->getListe();
|
||||
//$this->tarif = new Tarif();
|
||||
$this->college = (new Collegepolice())->getListeToutes($_SESSION['idPolice_C']);
|
||||
$this->ville = new Ville();
|
||||
$this->localite = new Localite();
|
||||
$this->tarif = new Tarifsactes();
|
||||
|
||||
$this->ouinonvip = (new Ouinon())->getListe();
|
||||
$this->lienbeneficiaire = (new Lienbeneficiaire())->getListe();
|
||||
$this->modepaiement = (new Pmodepaiement())->getListe();
|
||||
$this->ouinonenvigueur = (new Ouinon())->getListe();
|
||||
|
||||
$this->produit = new Produit();
|
||||
}
|
||||
|
||||
public function index()
|
||||
{
|
||||
$idPolice = $_SESSION['idPolice_C'];
|
||||
|
||||
$id = intval($this->requete->getParametre("id"));
|
||||
|
||||
$adherent = $this->adherent->getAdherentIdConso($id);
|
||||
|
||||
$beneficiaireRD = $this->adherent->getMandantaireRemboursement($id);
|
||||
|
||||
$typeremboursement = $this->produit->getlisteTypeRemboursement();
|
||||
|
||||
|
||||
|
||||
if(!is_array($beneficiaireRD)){
|
||||
$beneficiaireRD = array("beneficiaireReglement" => "",
|
||||
"beneficiaireRD" => "",
|
||||
"codeModePaiement" => "",
|
||||
"telephoneMobile" => "",
|
||||
"rib" => "",
|
||||
"codeLienBeneficiaire" => ""
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
$codePays = $adherent['codePays'];
|
||||
$codeVille = $adherent['codeVille'];
|
||||
// $codeLocalite = $client['codeLocalite'];
|
||||
|
||||
$pays = $this->pays->getListe($codePays);
|
||||
$ville = $this->ville->getListe($codePays);
|
||||
$localite = $this->localite->getListe($codePays, $codeVille);
|
||||
|
||||
$codeTypeTarifActe = "TADH";
|
||||
|
||||
$tarifActe = $this->tarif->getTarifActeByType($codeTypeTarifActe);
|
||||
$chemin = $this->menuvue->getChemin('Modifieradherent');
|
||||
|
||||
$aRembouser = $this->police->getArembourserPolice($idPolice);
|
||||
|
||||
$this->genererVue(array('adherent' => $adherent, 'college' => $this->college, 'naturepiece' => $this->naturepiece,
|
||||
'pays' => $pays, 'situationfamille' => $this->situationfamille, 'groupesanguin' => $this->groupesanguin, 'sexe' => $this->sexe,
|
||||
'ville' => $ville, 'localite' => $localite, 'tarifActe' => $tarifActe,'chemin' => $chemin, 'ouinonvip' => $this->ouinonvip,
|
||||
'beneficiaireRD' => $beneficiaireRD, 'lienbeneficiaire' => $this->lienbeneficiaire, 'modepaiement' => $this->modepaiement,
|
||||
'ouinonenvigueur' => $this->ouinonenvigueur, 'typeremboursement' => $typeremboursement, 'aRembouser' => $aRembouser));
|
||||
}
|
||||
|
||||
public function modifier($prenoms=null) {
|
||||
$id = $this->requete->getParametre("id");
|
||||
$idPolice = $_SESSION['idPolice_C'];
|
||||
$nom = strtoupper($this->requete->getParametreFormulaire("nom"));
|
||||
$prenoms = strtoupper($this->requete->getParametreFormulaire("prenoms"));
|
||||
$codeNaturePiece = $this->requete->getParametreFormulaire("codeNaturePiece");
|
||||
$numeroPiece = strtoupper($this->requete->getParametreFormulaire("numeroPiece"));
|
||||
$sexe = $this->requete->getParametreFormulaire("sexe");
|
||||
$dateNaissance = $this->requete->getParametreDate("dateNaissance");
|
||||
$codeGroupeSanguin = $this->requete->getParametreFormulaire("codeGroupeSanguin");
|
||||
$codeSituationFamille = $this->requete->getParametreFormulaire("codeSituationFamille");
|
||||
$nombreEnfants = $this->requete->getParametreFormulaire("nombreEnfants");
|
||||
$adresseGeo = $this->requete->getParametreFormulaire("adresseGeo");
|
||||
$adressePostale = $this->requete->getParametreFormulaire("adressePostale");
|
||||
$codePays = $this->requete->getParametreFormulaire("codePays");
|
||||
$telephonFixe = $this->requete->getParametreFormulaire("telephonFixe");
|
||||
$telephonePortable = $this->requete->getParametreFormulaire("telephonePortable");
|
||||
$email = $this->requete->getParametreFormulaire("email");
|
||||
$dateEntree = $this->requete->getParametreDate("dateEntree");
|
||||
|
||||
$codeLocalite = $this->requete->getParametreFormulaire("codeLocalite");
|
||||
|
||||
$numeroCmu = strtoupper($this->requete->getParametreFormulaire("numeroCmu"));
|
||||
$numeroMatricule = strtoupper($this->requete->getParametreFormulaire("numeroMatricule"));
|
||||
|
||||
//Ajouté par sorel le 27-05-2023
|
||||
$codeTarifActe = $this->requete->getParametreFormulaire("codeTarifActe");
|
||||
|
||||
//Ajouté par sorel le 20-06-2023
|
||||
$dateSouscription = $this->requete->getParametreFormulaire("dateSouscription");
|
||||
if($dateSouscription==""){
|
||||
$dateSouscription=null;
|
||||
}else{
|
||||
$dateSouscription = $this->requete->getParametreDate("dateSouscription");
|
||||
}
|
||||
|
||||
$vip = $this->requete->getParametreFormulaire("vip");
|
||||
|
||||
|
||||
$seuilRdAdherent = $this->requete->getParametreFormulaire("seuilRdAdherent");
|
||||
|
||||
$numeroBs = $this->requete->getParametreFormulaire("numeroBs");
|
||||
$ancienNumeroAssure = $this->requete->getParametreFormulaire("ancienNumeroAssure");
|
||||
$codeTypeRemboursement = $this->requete->getParametreFormulaire("codeTypeRemboursement");
|
||||
|
||||
$prefixePaiementMobile = $this->requete->getParametreFormulaire("prefixePaiementMobile");
|
||||
$mobilePaiement = $this->requete->getParametreFormulaire("mobilePaiement", "numerique");
|
||||
|
||||
$this->adherent->modifier($id, $nom, $prenoms, $codeNaturePiece, $numeroPiece, $sexe, $dateNaissance, $codeGroupeSanguin,
|
||||
$codeSituationFamille, $nombreEnfants, $adresseGeo, $adressePostale, $codePays, $telephonFixe, $telephonePortable, $email,
|
||||
$codeLocalite, $numeroCmu, $numeroMatricule, $codeTarifActe, $dateSouscription, $vip, $seuilRdAdherent, $ancienNumeroAssure,
|
||||
$numeroBs, $codeTypeRemboursement, $prefixePaiementMobile, $mobilePaiement);
|
||||
|
||||
$this->rediriger("Ficheadherent/".$id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user