facture = new Facturegarant(); $this->detailencaissement = new Detailencaissementgarant_temp(); $this->encaissement = new Encaissementgarant_temp(); } public function index() { $idEncaissementGarant_temp = $_SESSION['idEncaissementGarant_temp']; $encaissement = $this->encaissement->getEncaissementTemp($idEncaissementGarant_temp); $codeGcAssureur = $_SESSION['codeGcAssureur']; $factures = $this->facture->getFacturesimpayees($codeGcAssureur, $idEncaissementGarant_temp); $totalfactureImpayee = $this->facture->getTotalFactureImpayee($codeGcAssureur); $detailencaissements = $this->detailencaissement->getDetailsEncaissementTemp($idEncaissementGarant_temp); $totaldetailencaissement = $this->detailencaissement->getTotaldetailencaissement($idEncaissementGarant_temp); $nomGarant = $this->facture->getNomGarant($codeGcAssureur); $this->genererVueAjax(array('encaissement' => $encaissement, 'factures' => $factures, 'detailencaissements' => $detailencaissements, 'totalfactureImpayee' => $totalfactureImpayee, 'detailencaissements' => $detailencaissements, 'totaldetailencaissement' => $totaldetailencaissement, 'nomGarant' => $nomGarant)); } public function solderfacture() { $idFacture = $this->requete->getParametre("idFacture"); $this->facture->solderfacture($idFacture); $this->executerAction("index"); } public function ajouteracomptefacture() { $idFacture = $this->requete->getParametre("idFacture"); $montantAcpte = $this->requete->getParametre("montantAcpte"); //$montantTtcAcpte = $this->requete->getParametre("montantTtcAcpte"); $this->facture->ajouteracomptefacture($idFacture, $montantAcpte); $this->executerAction("index"); } public function supprimerfacture() { $idEncaissementGarant_temp = $_SESSION['idEncaissementGarant_temp']; $idDetailencaissement = $this->requete->getParametre("idDetailencaissement"); //var_dump($idEncaissementGarant_temp, $idDetailencaissement); $this->detailencaissement->supprimer($idDetailencaissement, $idEncaissementGarant_temp); $this->executerAction("index"); } }