85 lines
2.8 KiB
PHP
Executable File
85 lines
2.8 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Seance_temp.php';
|
|
require_once 'Modele/Detailtarifacte.php';
|
|
require_once 'Modele/Prescription.php';
|
|
require_once 'Modele/Garantiesbaremepriseencharge.php';
|
|
|
|
class ControleurAjaxfacturatioseancecso extends Controleur {
|
|
private $acte;
|
|
private $prescription;
|
|
private $garantie;
|
|
|
|
public function __construct() {
|
|
$this->prescription = new Seance_temp();
|
|
$this->acte = new Detailtarifacte();
|
|
$this->garantie = new Garantiesbaremepriseencharge();
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$idBeneficiaire = $_SESSION['p_idBeneficiaire_C'];
|
|
|
|
$numeroBonKine = $_SESSION['p_numeroBonKine_C'];
|
|
|
|
$numeroFeuilleMaladie = $_SESSION['p_numeroFeuilleMaladie_C'];
|
|
|
|
$prescription = $this->prescription->getprescription_sea($numeroBonKine);
|
|
|
|
|
|
//var_dump($numeroBonSeance);
|
|
|
|
$codeActe = $prescription['codeActePrescription'];
|
|
|
|
$datePrestation = $prescription['datePrescription'];
|
|
$codeGarantie = $this->acte->getGarantieActe($codeActe);
|
|
|
|
//var_dump($idBeneficiaire,$codeActe,$codeGarantie);
|
|
|
|
$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 modifierseancecso()
|
|
{
|
|
$quantite = $this->requete->getParametreFormulaire("quantite", "numerique");
|
|
$prixActe = $this->requete->getParametreFormulaire("prixActe", "numerique");
|
|
|
|
//var_dump($quantite, $prixActe);
|
|
|
|
$this->prescription->modifierseancecso($quantite, $prixActe);
|
|
|
|
}
|
|
|
|
public function facturerseance()
|
|
{
|
|
$this->prescription->facturerseance();
|
|
}
|
|
|
|
public function proformacso()
|
|
{
|
|
$codeActe = $this->requete->getParametreFormulaire("codeActe");
|
|
$numeroPrescriptionKine = $_SESSION['p_numeroPrescriptionKine_C'];
|
|
|
|
$_SESSION['proforma_envoye'] = (isset($_SESSION['proforma_envoye']) && $_SESSION['proforma_envoye'] > "0") ? $_SESSION['proforma_envoye'] : "0";
|
|
|
|
if($_SESSION['proforma_envoye']=="0"){
|
|
|
|
$_SESSION['proforma_envoye'] = "1";
|
|
|
|
//$this->prescription->majproformaenvoyecso($numeroPrescriptionKine, $_SESSION['proforma_envoye']);
|
|
$this->prescription->envoieproformasea($codeActe);
|
|
|
|
echo "0";
|
|
}else{
|
|
echo "2";
|
|
}
|
|
}
|
|
} |