117 lines
3.4 KiB
PHP
Executable File
117 lines
3.4 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Detailoptique.php';
|
|
require_once 'Modele/Optique_temp.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
|
|
class ControleurAjaxdetailopticien extends Controleur {
|
|
private $prescription;
|
|
private $detailprescription;
|
|
private $prestation;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Optique_temp();
|
|
$this->detailprescription = new Detailoptique();
|
|
$this->prestation = new Prestationactes();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
$numeroBonOptique = $_SESSION['p_numeroBonOptique_C'];
|
|
$numeroOptique = $_SESSION['p_numeroOptique_C'];
|
|
|
|
$prescription = $this->prescription->getoptique_opt($numeroBonOptique);
|
|
|
|
$detailprescriptions = $this->detailprescription->getdetailoptique_opt($numeroBonOptique);
|
|
|
|
$detailnonlivres = $this->prescription->getdetailnonlivre();
|
|
|
|
$detaillivres = $this->prescription->getdetaillivre();
|
|
|
|
$garantieadherent_temp = $this->prestation->getgarantieadherent_temp($numeroFeuilleMaladie, $codePrestataire);
|
|
|
|
$limite_beneficiaire = $this->prestation->getLimitesBeneficiaireTemp();
|
|
|
|
$this->genererVueAjax(array('prescription' => $prescription, 'detailprescriptions' => $detailprescriptions,
|
|
'detailnonlivres' => $detailnonlivres, 'detaillivres' => $detaillivres, 'garantieadherent_temp' => $garantieadherent_temp,
|
|
'limite_beneficiaire' => $limite_beneficiaire));
|
|
}
|
|
|
|
public function ajouterverre()
|
|
{
|
|
$idOptique = $this->requete->getParametreFormulaire("idOptique");
|
|
|
|
$this->prescription->ajouterverre($idOptique);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajouterverretous()
|
|
{
|
|
$this->prescription->ajouterverretous();
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirerverre()
|
|
{
|
|
$idOptique = $this->requete->getParametreFormulaire("idOptique");
|
|
|
|
$this->prescription->retirerverre($idOptique);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function retirerverretous()
|
|
{
|
|
$this->prescription->retirerverretous();
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function enregistreroptique()
|
|
{
|
|
$this->prescription->factureropotique();
|
|
}
|
|
|
|
public function majmonture()
|
|
{
|
|
$idOptique = $this->requete->getParametreFormulaire("idOptique");
|
|
$monture = $this->requete->getParametreFormulaire("monture");
|
|
|
|
$this->prescription->majmonturetemp($idOptique, $monture);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function ajouterverreprescription()
|
|
{
|
|
$codeOptique = $this->requete->getParametreFormulaire("codeOptique");
|
|
|
|
$this->detailprescription->ajouterverreopt($codeOptique);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function creerverre()
|
|
{
|
|
$libelleOptique = $this->requete->getParametreFormulaire("libelleOptique");
|
|
$prixVerre = $this->requete->getParametreFormulaire("prixVerre", "numerique");
|
|
|
|
$this->prescription->creerverre($libelleOptique, $prixVerre);
|
|
|
|
// $this->genererVueAjax();
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
public function demanderaccordopt()
|
|
{
|
|
$idOptique = $this->requete->getParametreFormulaire("idOptique");
|
|
|
|
$this->detailprescription->demanderaccordopt($idOptique);
|
|
|
|
$this->executerAction("index");
|
|
}
|
|
|
|
} |