a
This commit is contained in:
parent
25ab9724be
commit
c27f92bd96
|
|
@ -18841,4 +18841,76 @@ function add_selected_acte_medicaux(controle) {
|
|||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function telRwanda(valeur)
|
||||
{
|
||||
if (valeur == null) return null;
|
||||
// On enlève espaces, tirets, points, parenthèses
|
||||
let s = String(valeur).trim().replace(/[\s.\-()]/g, '');
|
||||
// Préfixe international : +250, 00250, 250
|
||||
s = s.replace(/^(?:\+|00)/, '');
|
||||
if (s.startsWith('250')) s = s.slice(3);
|
||||
else if (s.startsWith('0')) s = s.slice(1);
|
||||
// Numéro national significatif : 7 + [2389] + 7 chiffres
|
||||
return /^7[2389]\d{7}$/.test(s) ? '+250' + s : null;
|
||||
}
|
||||
|
||||
function envoyer_prescription_medicament()
|
||||
{
|
||||
smsOrdonnance = $('#smsOrdonnance').val();
|
||||
alert("envoyer_prescription_medicament => "+smsOrdonnance);
|
||||
|
||||
const numero = telRwanda(smsOrdonnance);
|
||||
if (numero === null) {
|
||||
alert('Numéro invalide : '+smsOrdonnance);
|
||||
console.error('Numéro invalide :', smsOrdonnance);
|
||||
} else {
|
||||
alert('Numéro valide : '+smsOrdonnance);
|
||||
console.log('Numéro valide :', numero); // ex. +250788123456
|
||||
}
|
||||
|
||||
/*
|
||||
if(smsOrdonnance<=" "){
|
||||
v_msg="No de téléphone obligatoire obligatoire!";
|
||||
v_msgEng="An appointment date is required!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
$("#dateRdvAccordee").focus();
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if(controle_numerique(controle))
|
||||
{
|
||||
if(quantite==0)
|
||||
{
|
||||
controle.focus();
|
||||
v_msg="Veuillez saisir la quantité!";
|
||||
v_msgEng="Please enter the quantity!";
|
||||
alert_ebene(v_msg, v_msgEng);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
donnees = 'idMedicament='+idMedicament+"&quantite="+quantite;
|
||||
|
||||
$.ajax({
|
||||
url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majquantitepha/",
|
||||
type: 'POST',
|
||||
data: donnees,
|
||||
success: function(data) {
|
||||
// $("#medicaments").html(data);
|
||||
$("#livraison").html(data);
|
||||
},
|
||||
error: function(data) {
|
||||
},
|
||||
complete: function() {
|
||||
alerter_depassement_limite();
|
||||
controle.focus();
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
|
|
|||
|
|
@ -269,17 +269,12 @@
|
|||
|
||||
<input class="sr-only" type="text" id="nbMedicamentSaisie" name="nbMedicamentSaisie" value="<?= $nbMedicamentSaisie ?>" >
|
||||
|
||||
<legend>
|
||||
<?= _("Médicaments prescrits") ?>
|
||||
<input class="form-control btn btn-primary" type="button" value="<?= _("Envoyer par SMS")."..." ?>" onClick="javascript:click_btn_add_drug();" style='font-size:10pt;'>
|
||||
</legend>
|
||||
|
||||
<table class="table table-responsive table-condensed" style='font-size:10pt;'>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td> <?= _("Médicaments prescrits") ?> </td>
|
||||
<td> <INPUT id="smsOrdonnance" name="smsOrdonnance" style='text-align:center' class="form-control" TYPE="text" value="<?= $this->nettoyer($prescription['telephonePortable']) ?>"> </td>
|
||||
<td > <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:prescription_medicament();"> <?= _("Envoyer par SMS") ?> </button> </td>
|
||||
<td > <button style='font-size:10pt;' type="button" class="form-control btn btn-primary" onclick="javascript:envoyer_prescription_medicament();"> <?= _("Envoyer par SMS") ?> </button> </td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@
|
|||
<link href="Bootstrap/css/simple-sidebar.css" rel="stylesheet">
|
||||
<link href="Bootstrap/css/jquery-ui.css" rel="stylesheet">
|
||||
|
||||
<link href="Bootstrap/css/style.css?ver=2026.03.03.07" rel="stylesheet">
|
||||
<link href="Bootstrap/css/style.css?ver=2026.07.07.31" rel="stylesheet">
|
||||
|
||||
<link href="Bootstrap/css/datatables.min.css" rel="stylesheet">
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user