533 lines
16 KiB
PHP
Executable File
533 lines
16 KiB
PHP
Executable File
<?php
|
|
require_once 'Framework/Controleur.php';
|
|
require_once 'Modele/Facturegarant.php';
|
|
require_once 'Modele/Periodicite.php';
|
|
require_once 'Modele/Periode.php';
|
|
|
|
class ControleurAjaxfacturegarant extends Controleur {
|
|
private $facture;
|
|
private $periodicite;
|
|
private $periode;
|
|
|
|
public function __construct() {
|
|
$this->facture = new Facturegarant();
|
|
$this->periodicite = new Periodicite;
|
|
$this->periode = new Periode();
|
|
}
|
|
|
|
public function index() {
|
|
|
|
}
|
|
|
|
public function filtretypefacture() {
|
|
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire('codeGcAssureur');
|
|
|
|
$typefacture = $this->facture->getTypeFactureGarant($codeGcAssureur);
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'typefacture' => $typefacture
|
|
));
|
|
|
|
}
|
|
|
|
public function initierfacturegarant() {
|
|
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire('codeGcAssureur');
|
|
$codeNatureFacturationGarant = $this->requete->getParametreFormulaire('codeNatureFacturationGarant');
|
|
$codePeriodicite = $this->requete->getParametreFormulaire('codePeriodicite');
|
|
$codeExercice = $this->requete->getParametreFormulaire('codeExercice');
|
|
$dateFacture = $this->requete->getParametreDate('dateFacture');
|
|
|
|
$typefacture = $this->facture->initierfacturegarant($codeGcAssureur, $codeNatureFacturationGarant,
|
|
$codePeriodicite, $codeExercice, $dateFacture);
|
|
|
|
|
|
}
|
|
|
|
public function filtreperiodicite() {
|
|
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire('codeGcAssureur');
|
|
$codeNatureFacturationGarant = $this->requete->getParametreFormulaire('codeNatureFacturationGarant');
|
|
|
|
$periodicites = $this->periodicite->getPeriodiciteFactureGarant();
|
|
|
|
$codePeriodicite = $this->facture->getPeriodicitePrevue($codeGcAssureur, $codeNatureFacturationGarant);
|
|
|
|
$this->genererVueAjax(array(
|
|
'periodicites' => $periodicites,
|
|
'codePeriodicite' => $codePeriodicite
|
|
));
|
|
|
|
}
|
|
|
|
public function majmontantht()
|
|
{
|
|
$montantHt = $this->requete->getParametreFormulaire('montantHt','numerique');
|
|
|
|
$this->facture->majmontantht($montantHt);
|
|
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVueAjax(array(
|
|
'entetefacturegarant' => $entetefacturegarant
|
|
));
|
|
}
|
|
|
|
public function genererfacturecaution()
|
|
{
|
|
$this->facture->genererfacturecaution();
|
|
|
|
}
|
|
|
|
public function majaccessoirehonorairePrime()
|
|
{
|
|
$idAvenant = $this->requete->getParametreFormulaire('id');
|
|
|
|
$accessoire = $this->requete->getParametreFormulaire('accessoire','numerique');
|
|
|
|
$this->facture->majaccessoirehonoraireprime($idAvenant, $accessoire);
|
|
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$listeavenants = $this->facture->getListeAvenants();
|
|
|
|
$this->genererVueAjax(array(
|
|
'entetefacturegarant' => $entetefacturegarant,
|
|
'listeavenants' => $listeavenants
|
|
));
|
|
|
|
}
|
|
|
|
public function genererfacturehonoraireprime()
|
|
{
|
|
$this->facture->genererfacturehonoraireprime();
|
|
|
|
}
|
|
|
|
public function genererfacturesinistre()
|
|
{
|
|
$this->facture->genererfacturesinitresgarant();
|
|
|
|
}
|
|
|
|
public function genererfacturehonorairesinistre()
|
|
{
|
|
$this->facture->genererfacturehonorairesinistre();
|
|
|
|
}
|
|
|
|
|
|
public function selectiongarant()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnerGarant($id,$choix);
|
|
|
|
$listeGarants = $this->facture->getFactureGarant();
|
|
$nbreGarantsSelection = $this->facture->getNbreGarantsSelection();
|
|
$choixTousGarant = $this->facture->getChoixTousGarants();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeGarants' => $listeGarants,
|
|
'choixTousGarant' => $choixTousGarant,
|
|
'nbreGarantsSelection' => $nbreGarantsSelection
|
|
));
|
|
}
|
|
|
|
public function selectiontypefacture()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnertypefacture($id,$choix);
|
|
|
|
|
|
$listeTypeFacture = $this->facture->getTypeFactureGarantTemp();
|
|
$nbreTypeFacSelection = $this->facture->getNbreTypesFactureSelection();
|
|
|
|
$choixTousTypesFacture = $this->facture->getChoixTousTypesFacture();
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeTypeFacture' => $listeTypeFacture,
|
|
'choixTousTypesFacture' => $choixTousTypesFacture,
|
|
'nbreTypeFacSelection' => $nbreTypeFacSelection
|
|
));
|
|
|
|
}
|
|
|
|
public function tousgarants()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtousgarants($choix);
|
|
|
|
$listeGarants = $this->facture->getFactureGarant();
|
|
$nbreGarantsSelection = $this->facture->getNbreGarantsSelection();
|
|
|
|
$choixTousGarant = $this->facture->getChoixTousGarants();
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeGarants' => $listeGarants,
|
|
'choixTousGarant' => $choixTousGarant,
|
|
'nbreGarantsSelection' => $nbreGarantsSelection
|
|
));
|
|
}
|
|
|
|
public function toustypefacture()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtoustypesfacture($choix);
|
|
|
|
$listeTypeFacture = $this->facture->getTypeFactureGarantTemp();
|
|
$nbreTypeFacSelection = $this->facture->getNbreTypesFactureSelection();
|
|
|
|
$choixTousTypesFacture = $this->facture->getChoixTousTypesFacture();
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeTypeFacture' => $listeTypeFacture,
|
|
'choixTousTypesFacture' => $choixTousTypesFacture,
|
|
'nbreTypeFacSelection' => $nbreTypeFacSelection
|
|
));
|
|
}
|
|
|
|
public function finperiode()
|
|
{
|
|
$codeMoisDebut = $this->requete->getParametreFormulaire("codeMoisDebut");
|
|
|
|
$moisFin = $this->periode->getListe();
|
|
$codeMoisFin = $this->facture->getMoisFinFacture($codeMoisDebut);
|
|
|
|
$this->genererVueAjax(array(
|
|
'codeMoisFin' => $codeMoisFin,
|
|
'moisFin' => $moisFin
|
|
));
|
|
}
|
|
|
|
//filtrergroupefacturegarants
|
|
public function filtrerfacturegarants()
|
|
{
|
|
$debut = $this->requete->getParametreDate("debut");
|
|
$fin = $this->requete->getParametreDate("fin");
|
|
|
|
$this->facture->filtrerfacturegarants($debut, $fin);
|
|
}
|
|
|
|
|
|
|
|
public function listerfacturegarants()
|
|
{
|
|
$listeFacture = $this->facture->getListeFacture();
|
|
|
|
$choixToutesFactures = $this->facture->getChoixTousGroupeFactures();
|
|
|
|
$nbFactureSelection = $this->facture->getNbreGroupeFactureSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeFacture' => $listeFacture,
|
|
'choixToutesFactures' => $choixToutesFactures,
|
|
'nbFactureSelection' => $nbFactureSelection
|
|
));
|
|
|
|
}
|
|
|
|
public function honoraireforfaitgarant()
|
|
{
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
|
$codeAssietteFacturationGarant = $this->requete->getParametreFormulaire("codeAssietteFacturationGarant");
|
|
$codeTypeFacturationGarant = $this->requete->getParametreFormulaire("codeTypeFacturationGarant");
|
|
|
|
$this->facture->majHonaireForfaitaireGarant($codeGcAssureur, $codeAssietteFacturationGarant);
|
|
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listepolices' => $listepolices,
|
|
'listecolleges' => $listecolleges,
|
|
'listeassiettes' => $listeassiettes,
|
|
'entetefacturegarant' => $entetefacturegarant
|
|
));
|
|
}
|
|
|
|
public function genererfacturehonoraireforfaitaire()
|
|
{
|
|
$this->facture->genererfacturehonoraireforfaitaire();
|
|
|
|
}
|
|
|
|
|
|
public function appelfondgarant()
|
|
{
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
|
$codeAssietteFacturationGarant = $this->requete->getParametreFormulaire("codeAssietteFacturationGarant");
|
|
$codeTypeFacturationGarant = $this->requete->getParametreFormulaire("codeTypeFacturationGarant");
|
|
|
|
$this->facture->majAppelFondGarant($codeGcAssureur, $codeAssietteFacturationGarant);
|
|
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listepolices' => $listepolices,
|
|
'listecolleges' => $listecolleges,
|
|
'listeassiettes' => $listeassiettes,
|
|
'entetefacturegarant' => $entetefacturegarant
|
|
));
|
|
}
|
|
|
|
public function genererfactureappelfond()
|
|
{
|
|
$this->facture->genererfactureappelfond();
|
|
|
|
}
|
|
|
|
public function appelcotisationgarant()
|
|
{
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
|
$codeAssietteFacturationGarant = $this->requete->getParametreFormulaire("codeAssietteFacturationGarant");
|
|
$codeTypeFacturationGarant = $this->requete->getParametreFormulaire("codeTypeFacturationGarant");
|
|
|
|
$this->facture->majAppelCotisationGarant($codeGcAssureur, $codeAssietteFacturationGarant);
|
|
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listepolices' => $listepolices,
|
|
'listecolleges' => $listecolleges,
|
|
'listeassiettes' => $listeassiettes,
|
|
'entetefacturegarant' => $entetefacturegarant
|
|
));
|
|
}
|
|
|
|
public function genererfactureappelcotisationgarant()
|
|
{
|
|
$this->facture->genererfactureappelcotisationgarant();
|
|
|
|
}
|
|
|
|
public function honorairebudgetgarant()
|
|
{
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire("codeGcAssureur");
|
|
$codeAssietteFacturationGarant = $this->requete->getParametreFormulaire("codeAssietteFacturationGarant");
|
|
$codeTypeFacturationGarant = $this->requete->getParametreFormulaire("codeTypeFacturationGarant");
|
|
|
|
$this->facture->majHonoraireBudgetGarant($codeGcAssureur, $codeAssietteFacturationGarant);
|
|
|
|
|
|
$listepolices = $this->facture->getListePolices();
|
|
$listecolleges = $this->facture->getListeColleges();
|
|
$listeassiettes = $this->facture->getListeAssiettesFactureGarant($codeTypeFacturationGarant);
|
|
$entetefacturegarant = $this->facture->getEnteteFactureGarant();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listepolices' => $listepolices,
|
|
'listecolleges' => $listecolleges,
|
|
'listeassiettes' => $listeassiettes,
|
|
'entetefacturegarant' => $entetefacturegarant
|
|
));
|
|
}
|
|
|
|
public function genererfacturehonorairebudgetgarant()
|
|
{
|
|
$this->facture->genererfacturehonorairebudgetgarant();
|
|
|
|
}
|
|
|
|
|
|
public function toutesfacturesedition()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtoutesgroupefacturesedition($choix);
|
|
}
|
|
|
|
|
|
public function unefactureedition()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnerunefactureedition($id, $choix);
|
|
}
|
|
|
|
public function filtrerfacturegarantsencaissement()
|
|
{
|
|
$debut = $this->requete->getParametreDate("debut");
|
|
$fin = $this->requete->getParametreDate("fin");
|
|
$encaisse = $this->requete->getParametreFormulaire("encaisse");
|
|
|
|
$this->facture->filtrerfacturegarantsencaissement($debut, $fin, $encaisse);
|
|
}
|
|
|
|
public function filtrerencaissements()
|
|
{
|
|
$debut = $this->requete->getParametreDate("debut");
|
|
$fin = $this->requete->getParametreDate("fin");
|
|
|
|
$this->facture->filtrerencaissementsgarant($debut, $fin);
|
|
}
|
|
|
|
public function listerencaissementsgarants()
|
|
{
|
|
$listeEncaissement = $this->facture->getListeEncaissements();
|
|
|
|
$choixTousEncaisses = $this->facture->getChoixTousEncaisses();
|
|
|
|
$nbEncaisseSelection = $this->facture->getNbEncaisseSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeEncaissement' => $listeEncaissement,
|
|
'choixTousEncaisses' => $choixTousEncaisses,
|
|
'nbEncaisseSelection' => $nbEncaisseSelection
|
|
));
|
|
|
|
}
|
|
|
|
public function unencaisseselection()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnerunencaissement($id, $choix);
|
|
}
|
|
|
|
public function tousencaissegarant()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtousencaissegarant($choix);
|
|
}
|
|
|
|
public function gettypegarant() {
|
|
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire('codeGcAssureur');
|
|
|
|
$typeGarant = $this->facture->getTypeGarant($codeGcAssureur);
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'typeGarant' => $typeGarant
|
|
));
|
|
|
|
}
|
|
|
|
public function initiergroupefacturegarant() {
|
|
|
|
$codeGcAssureur = $this->requete->getParametreFormulaire('codeGcAssureur');
|
|
$codeNatureFacturationGarant = $this->requete->getParametreFormulaire('codeNatureFacturationGarant');
|
|
$codePeriodicite = $this->requete->getParametreFormulaire('codePeriodicite');
|
|
$codeExercice = $this->requete->getParametreFormulaire('codeExercice');
|
|
$dateFacture = $this->requete->getParametreDate('dateFacture');
|
|
|
|
/*
|
|
$typefacture = $this->facture->initierfacturegarant($codeGcAssureur, $codeNatureFacturationGarant,
|
|
$codePeriodicite, $codeExercice, $dateFacture);
|
|
*/
|
|
$typefacture = $this->facture->initiergroupefacturegarant($codeGcAssureur, $codeNatureFacturationGarant,
|
|
$codePeriodicite, $codeExercice, $dateFacture);
|
|
}
|
|
|
|
public function genererfactureperiodique()
|
|
{
|
|
$this->facture->genererfactureperiodique();
|
|
|
|
}
|
|
|
|
public function toutesnaturesfacture()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtoutesnaturesfacture($choix);
|
|
|
|
$listeNatureFacture = $this->facture->getTypeListeFactureGarantTemp();
|
|
$nbreNatureFacSelection = $this->facture->getNbreNatureFactureSelection();
|
|
|
|
$choixToutesNaturesFacture = $this->facture->getChoixToutesNaturesFacture();
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeNatureFacture' => $listeNatureFacture,
|
|
'choixToutesNaturesFacture' => $choixToutesNaturesFacture,
|
|
'nbreNatureFacSelection' => $nbreNatureFacSelection
|
|
));
|
|
}
|
|
|
|
public function selectionnaturefacture()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnernaturefacture($id,$choix);
|
|
|
|
|
|
$listeNatureFacture = $this->facture->getTypeListeFactureGarantTemp();
|
|
$nbreNatureFacSelection = $this->facture->getNbreNatureFactureSelection();
|
|
|
|
$choixToutesNaturesFacture = $this->facture->getChoixToutesNaturesFacture();
|
|
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeNatureFacture' => $listeNatureFacture,
|
|
'choixToutesNaturesFacture' => $choixToutesNaturesFacture,
|
|
'nbreNatureFacSelection' => $nbreNatureFacSelection
|
|
));
|
|
|
|
}
|
|
|
|
public function listerfactuegarantsencaissement()
|
|
{
|
|
$listeFacture = $this->facture->getListeFactureGarantEncaissement();
|
|
|
|
$choixToutesFacturesEnc = $this->facture->getChoixTouTesFactures();
|
|
|
|
$nbFactureSelection = $this->facture->getNbreFactureSelection();
|
|
|
|
$this->genererVueAjax(array(
|
|
'listeFacture' => $listeFacture,
|
|
'choixToutesFacturesEnc'=> $choixToutesFacturesEnc,
|
|
'nbFactureSelection' => $nbFactureSelection
|
|
));
|
|
|
|
}
|
|
|
|
public function toutesfactureseditionencaissement()
|
|
{
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->majtoutesfacturesedition($choix);
|
|
}
|
|
|
|
public function unefactureeditionencaissement()
|
|
{
|
|
$id = $this->requete->getParametreFormulaire("id");
|
|
|
|
$choix = $this->requete->getParametreFormulaire("choix");
|
|
|
|
$this->facture->selectionnerunefactureeditionencaissement($id, $choix);
|
|
}
|
|
|
|
public function genererfacturedeficit()
|
|
{
|
|
$this->facture->genererfacturedeficit();
|
|
|
|
}
|
|
}
|