diff --git a/Bootstrap_new/css/style_office.css b/Bootstrap_new/css/style_office.css index 23c73c7..b62747a 100644 --- a/Bootstrap_new/css/style_office.css +++ b/Bootstrap_new/css/style_office.css @@ -779,8 +779,10 @@ body { /* Écrans larges : mêmes insets pour nav-tabs et content-area */ @media (min-width: 1400px) { .nav-bar > .nav-tabs { + /* padding-left: calc((100vw - 1400px) / 2); padding-right: calc((100vw - 1400px) / 2); + */ } .content-area { padding-left: calc((100vw - 1400px) / 2); diff --git a/Controleur/ControleurAjaxcontroleavenantpolice.php b/Controleur/ControleurAjaxcontroleavenantpolice.php new file mode 100644 index 0000000..9c67a9f --- /dev/null +++ b/Controleur/ControleurAjaxcontroleavenantpolice.php @@ -0,0 +1,32 @@ +police = new Police(); + } + + public function index() + { + $controler_avenant_info = "0"; + + $idPolice = $_SESSION['idPolice_C']; + + $controle = $this->requete->getParametreFormulaire("controle"); + + if($controle=="existequittance") + { + $controler_avenant_info = $this->police->getExisteQuittance($idPolice); + + if($controler_avenant_info=="0") + { + $controler_avenant_info = $this->police->getExisteConsommationPolice($idPolice); + } + } + + $this->genererVueAjax(array('controler_avenant_info' => $controler_avenant_info)); + } +} \ No newline at end of file diff --git a/Controleur/ControleurAjaxdetailretrait.php b/Controleur/ControleurAjaxdetailretrait.php new file mode 100644 index 0000000..9201748 --- /dev/null +++ b/Controleur/ControleurAjaxdetailretrait.php @@ -0,0 +1,37 @@ +avenant = new Police(); + $this->beneficiaire_temp = new Beneficiaire_temp(); + } + + public function index() + { + $idPolice = $_SESSION['idPolice_C']; + $avenant = $this->avenant->getAvenantTemp($idPolice); + $beneficiaires_sel = $this->beneficiaire_temp->getListeBeneficiaire_temp_Ret(); + + + $this->genererVueAjax(array('beneficiaires_sel' => $beneficiaires_sel, 'avenant' => $avenant)); + } + + public function recapituler() { + $this->beneficiaire_temp->recapitulerretrait(); + $this->executerAction("index"); + } + + public function appliquertauxristourne() + { + $tauxRistourne = $this->requete->getParametreFormulaire("tauxRistourne","numerique"); + $this->beneficiaire_temp->appliquertauxristourne($tauxRistourne); + $this->executerAction("index"); + } + +} \ No newline at end of file diff --git a/Controleur/ControleurAjaxselectionretrait.php b/Controleur/ControleurAjaxselectionretrait.php new file mode 100644 index 0000000..da07e6c --- /dev/null +++ b/Controleur/ControleurAjaxselectionretrait.php @@ -0,0 +1,32 @@ +beneficiaire_temp = new Beneficiaire_temp(); + } + + public function index() + { + $beneficiaires = $this->beneficiaire_temp->getListeBeneficiaire_temp_Ret_Selection(); + + $this->genererVueAjax(array('beneficiaires' => $beneficiaires)); + } + + public function selectionner() { + $idBeneficiaire = $this->requete->getParametre("idBeneficiaire"); + $choix = $this->requete->getParametreFormulaire("choix"); + + $this->beneficiaire_temp->selectionretrait($idBeneficiaire, $choix); + } + + public function recapituler() { + $idBeneficiaire = $this->requete->getParametre("idBeneficiaire"); + $choix = $this->requete->getParametreFormulaire("choix"); + + $this->beneficiaire_temp->recapitulerretrait($idBeneficiaire, $choix); + } +} \ No newline at end of file diff --git a/Controleur/ControleurConnexion.php b/Controleur/ControleurConnexion.php index d7abbdb..33cc27b 100644 --- a/Controleur/ControleurConnexion.php +++ b/Controleur/ControleurConnexion.php @@ -156,7 +156,18 @@ require_once 'Framework/Localisation.php'; } // Fin test Licence - + if($utilisateur['extranetActif']<>1) + { + if ($_SESSION['lang']=="en_US") + { + $this->genererVue(array('msgErreur' => 'Extranet disabled!'), "index"); + } + else + { + $this->genererVue(array('msgErreur' => 'Extranet désactivé!'), "index"); + } + exit(); + } if($utilisateur['actif']<>1) { @@ -529,6 +540,7 @@ require_once 'Framework/Localisation.php'; $_SESSION['deconnexion'] = "0"; $_SESSION['derniere_action'] = time(); + $_SESSION['superUser'] = '0'; if(($motCourt===true) or ($changerMotPassDefaut===true) or ($passExpired===true)) diff --git a/Controleur/ControleurCreeravenant.php b/Controleur/ControleurCreeravenant.php new file mode 100644 index 0000000..d2e06f8 --- /dev/null +++ b/Controleur/ControleurCreeravenant.php @@ -0,0 +1,56 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Creeravenant"); + + $this->police = new Police(); + $this->typeavenant = new Typeavenant; + } + public function index() { + $idPolice = $_SESSION['idPolice_C']; + $this->police->getContextePoliceId($idPolice); + $police = $this->police->getPoliceId($idPolice); + + $oldCodeTypeAvenant = $police['codeTypeAvenant']; + + $typeavenant = $this->typeavenant->getListeSuite($oldCodeTypeAvenant); + + $this->genererVue(array('police' => $police, 'typeavenant' => $typeavenant)); + } + + + public function enregistrer() + { + $idPolice = $_SESSION['idPolice_C']; + $codeTypeAvenant = $this->requete->getParametreFormulaire("codeTypeAvenant"); + $motifavenant = $this->requete->getParametreFormulaire("motifavenant"); + $dateAvenant = $this->requete->getParametreDate("dateAvenant"); + + $_SESSION['dateAvenant_C'] = $dateAvenant; + $_SESSION['motifavenant_C'] = $motifavenant; + + if($codeTypeAvenant=="RET") + { + $this->rediriger("Ficheretrait"); + } + else + if($codeTypeAvenant=="INC") + { + $this->police->creeravenant($idPolice, $codeTypeAvenant, $motifavenant, $dateAvenant); + + $this->police->getContexteAjaxPolice($idPolice); + + $this->rediriger("Listeadherent"); + } + } +} \ No newline at end of file diff --git a/Controleur/ControleurFicheretrait.php b/Controleur/ControleurFicheretrait.php new file mode 100644 index 0000000..6c4d1fe --- /dev/null +++ b/Controleur/ControleurFicheretrait.php @@ -0,0 +1,39 @@ +menuvue = new Menuvueutilisateur(); + $this->menuvue->getMenuVue("Ficheretrait"); + + $this->avenant = new Police(); + $this->beneficiaire_temp = new Beneficiaire_temp(); + } + public function index() { + $idPolice = $_SESSION['idPolice_C']; + $dateAvenant = $_SESSION['dateAvenant_C']; + + $this->avenant->initretrait($idPolice); + + $emission = $this->avenant->getEmissionTemp($idPolice); + $avenant = $this->avenant->getAvenantTemp($idPolice); + $sppolice = $this->avenant->getRapportSpPolice($idPolice, $dateAvenant); + + $beneficiaires_sel = $this->beneficiaire_temp->getListeBeneficiaire_temp_Ret(); + + $this->genererVue(array('emission' => $emission, 'avenant' => $avenant, 'sppolice' => $sppolice, 'beneficiaires_sel' => $beneficiaires_sel)); + } + + public function enregistrerretrait() + { + $this->avenant->enregistrerretrait(); + + $this->rediriger("Fichepolice"); + } +} \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index 3bf73e2..36da2fd 100755 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -1348,4 +1348,167 @@ function imprimer_cp(lienEtat) { } }); -} \ No newline at end of file +} + +function creer_avenant() +{ + etat=$("#codeEtatPolice_C").val(); + + if (etat=="RE") + { + v_msg="Attention! Police résiliée!"; + v_msgEng="Warning! Terminated policy!"; + alert_ebene(v_msg, v_msgEng); + + return; + } + + if (etat=="AN") + { + v_msg="Attention! Police annulée!"; + v_msgEng="Warning! Canceled policy!"; + alert_ebene(v_msg, v_msgEng); + + return; + } + + window.location.assign($("#racineWeb" ).val()+"Creeravenant/"); +} + +function enregistrer_avenant() +{ + codeTypeAvenant=$("#codeTypeAvenant").val(); + oldCodeTypeAvenant=$("#oldCodeTypeAvenant").val(); + + if ($("#codeTypeAvenant").val()<" ") + { + v_msg="Veuillez sélectionner le type d\'avenant!"; + v_msgEng="Please select the type of amendment!"; + alert_ebene(v_msg, v_msgEng); + + return; + } + + var d_effet = new Date($("#dateEffetSql").val()); + var d_fin = new Date($("#dateFinSql").val()); + var d_avenant = $("#dateAvenant").datepicker("getDate"); + + dt_effet = Math.round(Date.parse(d_effet)/(1000*3600*24)); + dt_fin = Math.round(Date.parse(d_fin)/(1000*3600*24)); + dt_avenant = Math.round(Date.parse(d_avenant)/(1000*3600*24)); + + /* + alert("dt_effet => "+dt_effet); + alert("dt_fin => "+dt_fin); + alert("dt_avenant => "+dt_avenant); + return; + */ + + if (dt_avenant>dt_fin || dt_avenant  ' + 'Chargement en cours! Veuillez patienter...' + ''); + $("#btn_enreg").click(); + } + */ + confirm_ebene(v_msg, v_msgEng).then(isConfirmed => { + if (isConfirmed) { + var div_attente = $('#div_attente'); + div_attente.html('
  ' + 'Chargement en cours! Veuillez patienter...' + '
'); + $("#btn_enreg").click(); + } + }); + +} + +function pop_afficher_selection_retrait() +{ + var div_selection_assure = $('#div_selection_assure'); + + div_selection_assure.html('
  ' + 'Veuillez patienter... / Please wait...' + '
'); + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxselectionretrait/", + type : 'post', + error: function(errorData) { + }, + success: function(data) { + div_selection_assure.html(data); + // $('#div_test_gabarit').html(data); + }, + complete: function() { + const modal = document.getElementById("popdetailassure"); + if (modal && modal.parentNode !== document.body) { + document.body.appendChild(modal); + } + // Ouvrir le modal via le bouton caché + document.getElementById("btn_pop").click(); + } + }); +} + +function beneficiaire_a_retirer(p_choix, p_id_beneficiaire) +{ + donnees = 'idBeneficiaire='+p_id_beneficiaire; + donnees += '&choix='+p_choix; + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxselectionretrait/selectionner/", + type: 'POST', + data: donnees, + success: function(data) { + }, + error: function(data) { + }, + complete: function() { + } + }); +} + +function recapituler_retrait() +{ + var div_assure_a_retirer = $('#div_assure_a_retirer'); + + $.ajax({ + url: $("#racineWeb").val()+"Ajaxdetailretrait/recapituler/", + type: 'POST', + success: function(data) { + div_assure_a_retirer.html(data); + + var oTable = $('.tabliste').DataTable(); + oTable.destroy(); + + setTimeout(function() { + appliquerDataTable(); + }, 500); + }, + error: function(data) { + }, + complete: function() { + } + }); +} diff --git a/Modele/Police.php b/Modele/Police.php index ee8e60f..7aecbf6 100644 --- a/Modele/Police.php +++ b/Modele/Police.php @@ -336,7 +336,8 @@ class Police extends Modele { public function creeravenant($idPolice, $codeTypeAvenant, $motifavenant, $dateAvenant) { $user = $_SESSION['login']; - $sql = 'call sp_creer_avenant(?, ?, ?, ?, ?)'; + // $sql = 'call sp_creer_avenant(?, ?, ?, ?, ?)'; + $sql = 'call sp_creer_avenant_client(?, ?, ?, ?, ?)'; $this->executerRequete($sql, array($idPolice, $codeTypeAvenant, $motifavenant, $dateAvenant, $user)); } diff --git a/Modele/Typeavenant.php b/Modele/Typeavenant.php new file mode 100644 index 0000000..f7a3b9e --- /dev/null +++ b/Modele/Typeavenant.php @@ -0,0 +1,40 @@ +executerRequete($sql); + return $liste->fetchAll(PDO::FETCH_ASSOC); + } + + public function getListeSuite($oldCodeTypeAvenant) + { + if (est_anglophone()) + { + $sql = 'SELECT A.codeTypeAvenant as `code`, A.libelleEng as libelle FROM typeavenant A + join suiteavenant B on (B.codeTypeAvenant=A.codeTypeAvenant) + where (B.oldCodeTypeAvenant=?) and A.order by A.libelle'; + } + else + { + $sql = 'SELECT A.codeTypeAvenant as `code`, A.libelle FROM typeavenant A + join suiteavenant B on (B.codeTypeAvenant=A.codeTypeAvenant) + where (B.oldCodeTypeAvenant=?) and A.extranetClient="1" order by A.libelle'; + } + + $liste = $this->executerRequete($sql, array($oldCodeTypeAvenant)); + return $liste->fetchAll(PDO::FETCH_ASSOC); + } +} \ No newline at end of file diff --git a/Societes/radiant/Tarifs/Vue/Consultercollege.php b/Societes/radiant/Tarifs/Vue/Consultercollege.php index b3b00ec..306f346 100644 --- a/Societes/radiant/Tarifs/Vue/Consultercollege.php +++ b/Societes/radiant/Tarifs/Vue/Consultercollege.php @@ -11,7 +11,7 @@ - +
@@ -320,7 +320,6 @@
-