diff --git a/Controleur/ControleurAjaxdetailprescription.php b/Controleur/ControleurAjaxdetailprescription.php index 76f17fc..fcdec54 100644 --- a/Controleur/ControleurAjaxdetailprescription.php +++ b/Controleur/ControleurAjaxdetailprescription.php @@ -93,4 +93,14 @@ class ControleurAjaxdetailprescription extends Controleur { $this->executerAction("index"); } + public function envoyerprescription() + { + $numeroBondonnance = $this->requete->getParametre("numeroBondonnance"); + $smsOrdonnance = $this->requete->getParametreFormulaire("smsOrdonnance"); + + $this->detailprescription->envoyerprescription($numeroBondonnance, $smsOrdonnance); + + $this->executerAction("index"); + } + } \ No newline at end of file diff --git a/Js/fonctions.js b/Js/fonctions.js index ea378ea..a18c88d 100644 --- a/Js/fonctions.js +++ b/Js/fonctions.js @@ -18843,6 +18843,17 @@ function envoyer_prescription_medicament() { numeroBondonnance = $('#numeroBon').val(); smsOrdonnance = $('#smsOrdonnance').val(); + const nbMedicamentSaisie = $('#nbMedicamentSaisie').val(); + + alert("nbMedicamentSaisie => "+nbMedicamentSaisie); + + if ( nbMedicamentSaisie <= "0") { + v_msg="Aucun médicament!"; + v_msgEng="No drug!"; + alert_ebene(v_msg, v_msgEng); + + return; + } const numero = telRwanda(smsOrdonnance); if (numero === null) { @@ -18858,7 +18869,8 @@ function envoyer_prescription_medicament() donnees = 'numeroBondonnance='+numeroBondonnance+"&smsOrdonnance="+numero; alert(donnees); - + return; + var div_wait = $('#div_wait'); div_wait.html('
' + 'Veuillez patienter...' + '