diff --git a/Controleur/ControleurFichepolice.php b/Controleur/ControleurFichepolice.php new file mode 100644 index 0000000..94c0a5a --- /dev/null +++ b/Controleur/ControleurFichepolice.php @@ -0,0 +1,55 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Fichepolice"); + + $this->police = new Police(); + $this->quittance = new Quittance(); + + $this->tarif = new Tarifsactes(); + + $_SESSION['modeDevis'] = "0"; + } + + public function index() { + $id = $_SESSION['idPoliceAjax']; + + $this->police->getContextePoliceId($id); + + $police = $this->police->getPoliceId($id); + + $modeprorata = $this->police->getModeProrata(); + + $totalquittance = $this->quittance->getTotalQuittance($id); + + $this->genererVue( + array( + 'police' => $police, + 'totalquittance' => $totalquittance, + 'modeprorata' => $modeprorata + ) + ); + } + + + public function imprimerquittance() { + $IdQuittance = $this->requete->getParametre("id"); + require_once 'Societes/'.$_SESSION['codeSociete'].'/Etats/Etquittance.php'; + $this->etat = new Etquittance(); + $this->etat->imprimer($IdQuittance); + } + + +} \ No newline at end of file diff --git a/Modele/Police.php b/Modele/Police.php index 91b5bfb..dc5f61c 100755 --- a/Modele/Police.php +++ b/Modele/Police.php @@ -88,5 +88,17 @@ class Police extends Modele { return $police->fetch(PDO::FETCH_ASSOC); } - + public function getModeProrata() + { + if (est_anglophone()){ + $sql = "SELECT codeModeProrata as code, libelleEng as libelle + FROM modeprorata ORDER BY ordre;"; + }else{ + $sql = "SELECT codeModeProrata as code, libelle + FROM modeprorata ORDER BY ordre;"; + } + + $resultat = $this->executerRequete($sql); + return $resultat->fetchAll(PDO::FETCH_ASSOC); + } } \ No newline at end of file diff --git a/Modele/Quittance.php b/Modele/Quittance.php new file mode 100644 index 0000000..57e2c74 --- /dev/null +++ b/Modele/Quittance.php @@ -0,0 +1,17 @@ +executerRequete($sql, array($idPolice, $dateJour)); + + return $totalquittance->fetch(PDO::FETCH_ASSOC); + + } + +} \ No newline at end of file diff --git a/Vue/Fichepolice/index.php b/Vue/Fichepolice/index.php new file mode 100644 index 0000000..1887639 --- /dev/null +++ b/Vue/Fichepolice/index.php @@ -0,0 +1,293 @@ +titre = "Fiche police"; + $gcactive = ($this->nettoyer($police['gestionConfiee'])=="1"); + $remplacementAdherent = ($this->nettoyer($police['remplacementAdherent'])=="1"); + + if (est_anglophone()) + { + $typeContrat = $police['typeContratEng']; + $typeAvenant = $police['typeAvenantEng']; + $etatPolice = $police['etatPoliceEng']; + } + else + { + $typeContrat = $police['typeContrat']; + $typeAvenant = $police['typeAvenant']; + $etatPolice = $police['etatPolice']; + } + + $codeEtatPolice = $this->nettoyer($police['codeEtatPolice']); + + if($codeEtatPolice == "EC"){ + $styleEtat = "background-color: green !important; color: white !important;"; + }elseif($codeEtatPolice == "RE" || $codeEtatPolice == "AN"){ + $styleEtat = "background-color: red !important; color: white !important;"; + }else{ + $styleEtat = "background-color: orange !important; color: white !important;"; + } + +?> + +