80 lines
2.6 KiB
PHP
Executable File
80 lines
2.6 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Seance_temp.php';
|
|
require_once 'Modele/Prestationactes.php';
|
|
require_once 'Modele/Detailtarifacte.php';
|
|
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
|
|
|
class ControleurAjaxfacturatioseancesea extends Controleur {
|
|
private $acte;
|
|
private $prescription;
|
|
private $garantie;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Seance_temp();
|
|
$this->prestation = new Prestationactes();
|
|
$this->acte = new Detailtarifacte();
|
|
$this->garantie = new Garantiesbaremepriseencharge();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$codePrestataire = $_SESSION['p_codePrestataire_C'];
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
$numeroBonKine = $_SESSION['p_numeroBonKine_C'];
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
|
|
|
|
$prescription = $this->prescription->getprescription_sea($numeroBonKine);
|
|
|
|
$codeActe = $prescription['codeActePrescription'];
|
|
|
|
$datePrestation = $prescription['datePrescription'];
|
|
$_SESSION['datePrestation'] = $datePrestation;
|
|
|
|
$codeGarantie = $this->acte->getGarantieActe($codeActe);
|
|
|
|
|
|
$this->garantie->getsourcebaremegarantienew($idBeneficiaire, $codeGarantie, $datePrestation);
|
|
$statut = $this->garantie->getstatutacte($idBeneficiaire,$codeActe,$codeGarantie);
|
|
$motifStatut = $this->garantie->getlibellemotifdepassement($statut);
|
|
$this->garantie->baremesolde($idBeneficiaire,$codeActe,$codeGarantie,$numeroFeuilleMaladie);
|
|
$baremesolde = $this->garantie->getbaremesolde($idBeneficiaire,$codeActe,$codeGarantie,$numeroFeuilleMaladie);
|
|
|
|
|
|
$this->genererVueAjax(array('prescription' => $prescription,
|
|
'statut' => $statut, 'baremesolde' => $baremesolde, 'motifStatut' => $motifStatut));
|
|
}
|
|
|
|
public function facturerseance()
|
|
{
|
|
$user_id_substitut = $this->requete->getParametreFormulaire("user_id_substitut");
|
|
|
|
$codeGestionBon = $this->requete->getParametreFormulaire("codeGestionBon");
|
|
|
|
// echo "facturerseance codeGestionBon => $codeGestionBon";
|
|
// exit();
|
|
|
|
$this->prescription->facturerseance($user_id_substitut, $codeGestionBon);
|
|
|
|
// $this->genererVueAjax();
|
|
}
|
|
|
|
public function proformasea()
|
|
{
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
|
|
$_SESSION['proforma_envoye'] = isset($_SESSION['proforma_envoye']) ? $_SESSION['proforma_envoye'] : "0";
|
|
|
|
if($_SESSION['proforma_envoye']=="0"){
|
|
|
|
$_SESSION['proforma_envoye'] = "1";
|
|
|
|
$this->prescription->envoieproformasea($codeActe);
|
|
|
|
echo "0";
|
|
}else{
|
|
echo "2";
|
|
}
|
|
}
|
|
} |