menuvue = new Menuvueutilisateur(); $this->menuvue->getMenuVue('Creerclient'); $this->client = new Client(); $this->sexe = (new Sexe())->getListe(); $this->typeclient = (new Typeclient())->getListe(); $this->pays = (new Pays())->getListe($_SESSION['codePaysSociete']); $this->ville = (new Ville())->getListe($_SESSION['codePaysSociete']); $this->titre = array(); $this->secteuractivite = (new Secteuractivite())->getListe(); $this->localite = new Localite(); $this->langue = new Langue(); $this->tarif = new Tarifsactes(); $_SESSION['modeDevis'] = "0"; $this->produit = new Produit(); $this->modepaiement = (new Pmodepaiement())->getListe(); } public function index() { $langue = $this->langue->getListe(); $codeTypeTarifActe = "TCLI"; $tarifActe = $this->tarif->getTarifActeByType($codeTypeTarifActe); $chemin = $this->menuvue->getChemin('Creerclient'); $typeremboursement = $this->produit->getlisteTypeRemboursement(); $this->genererVue(array('pays' => $this->pays, 'ville' => $this->ville, 'titre' => $this->titre, 'secteuractivite' => $this->secteuractivite, 'sexe' => $this->sexe, 'typeclient' => $this->typeclient, 'listelocalite' => $this->localite, 'langue' => $langue, 'chemin' => $chemin, 'tarifActe' => $tarifActe, 'chemin' => $chemin, 'typeremboursement' => $typeremboursement, 'modepaiement' => $this->modepaiement)); } public function ajouter($prenoms=null) { $codeSociete = $this->requete->getSession()->getAttribut('codeSociete'); $user = $this->requete->getSession()->getAttribut('login'); $dateCre = date("Y-m-d"); $typeClient = $this->requete->getParametre("typeClient"); $codeTitre = $this->requete->getParametre("codeTitre"); $nom = $this->requete->getParametre("nom"); $nom = strtoupper($nom); $prenoms = $this->requete->getParametreFormulaire("prenoms"); $prenoms = strtoupper($prenoms); $adresseGeo = $this->requete->getParametreFormulaire("adresseGeo"); $boitepostale = $this->requete->getParametreFormulaire("boitepostale"); $codeVille = $this->requete->getParametreFormulaire("codeVille"); $codeLocalite = $this->requete->getParametreFormulaire("codeLocalite"); $codePays = $this->requete->getParametreFormulaire("codePays"); $telephoneBureau = $this->requete->getParametreFormulaire("telephoneBureau"); $telephonedomicile = $this->requete->getParametreFormulaire("telephonedomicile"); $telephonePortable = $this->requete->getParametreFormulaire("telephonePortable"); $fax = $this->requete->getParametreFormulaire("fax"); $email = $this->requete->getParametreFormulaire("email"); $sexe = $this->requete->getParametreFormulaire("sexe"); $dateNaissance = $this->requete->getParametreDate("dateNaissance"); $codeSecteur = $this->requete->getParametreFormulaire("codeSecteur"); $codeGestionnaire =""; $nomMandataire = $this->requete->getParametreFormulaire("nomMandataire"); $telephoneFixemandataire = $this->requete->getParametreFormulaire("telephoneFixemandataire"); $telephonePortablemandataire = $this->requete->getParametreFormulaire("telephonePortablemandataire"); $emailMandataire = $this->requete->getParametreFormulaire("emailMandataire"); $registreCommerce = $this->requete->getParametreFormulaire("registreCommerce"); $codeLangueClient = $this->requete->getParametreFormulaire("codeLangueUser"); $codeTarifActe = $this->requete->getParametreFormulaire("codeTarifActe"); $seuilRdClient = $this->requete->getParametreFormulaire("seuilRdClient"); $codeTypeRemboursement = $this->requete->getParametreFormulaire("codeTypeRemboursement"); $codeModePaiement = $this->requete->getParametreFormulaire("codeModePaiement"); $rib = $this->requete->getParametreFormulaire("rib"); $prefixePaiementMobile = $this->requete->getParametreFormulaire("prefixePaiementMobile"); $mobilePaiement = $this->requete->getParametreFormulaire("mobilePaiement"); $dernierNumeroClient = $this->client->getDenierNumeroClient(); $dernierNumeroClient=$dernierNumeroClient+1; if ($this->client->existeligne($dernierNumeroClient)) { $dernierNumeroClient=$dernierNumeroClient+1; } $numeroClient = $dernierNumeroClient; $id = $this->client->ajouter($codeSociete, $numeroClient, $typeClient, $codeTitre, $nom, $prenoms, $adresseGeo, $boitepostale, $codeVille, $codePays, $telephoneBureau, $telephonedomicile, $telephonePortable, $fax, $email, $sexe, $dateNaissance, $codeSecteur, $codeGestionnaire, $nomMandataire, $telephoneFixemandataire, $telephonePortablemandataire, $emailMandataire, $dateCre, $user, $codeLocalite, $registreCommerce, $codeLangueClient, $codeTarifActe, $seuilRdClient, $codeTypeRemboursement, $codeModePaiement, $rib, $prefixePaiementMobile, $mobilePaiement); $this->client->setDenierNumeroClient($numeroClient); $_SESSION['idClientAjax'] = $id; // $this->rediriger("Ficheclient/".$id); $this->rediriger("Ficheclient"); } }