a
This commit is contained in:
parent
13cb908241
commit
067f2cb2a8
|
|
@ -3436,20 +3436,15 @@ function controle_numerique(controle)
|
||||||
|
|
||||||
function ajax_maj_prix_medicament_pha(idMedicament, tarifPublic, prix, controle)
|
function ajax_maj_prix_medicament_pha(idMedicament, tarifPublic, prix, controle)
|
||||||
{
|
{
|
||||||
alert("ajax_maj_prix_medicament_pha");
|
|
||||||
|
|
||||||
var appliquerMargePrixMedicament = $('#appliquerMargePrixMedicament').val();
|
var appliquerMargePrixMedicament = $('#appliquerMargePrixMedicament').val();
|
||||||
var margePrixMedicament = $('#margePrixMedicament').val();
|
var margePrixMedicament = $('#margePrixMedicament').val();
|
||||||
var typeMargePrixMedicament = $('#typeMargePrixMedicament').val();
|
var typeMargePrixMedicament = $('#typeMargePrixMedicament').val();
|
||||||
var devise = $("#devise").val();
|
var devise = $("#devise").val();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
prix=prix.replace(",",".");
|
prix=prix.replace(",",".");
|
||||||
prix=prix.replace(/ /g,"");
|
prix=prix.replace(/ /g,"");
|
||||||
controle.value=prix;
|
controle.value=prix;
|
||||||
|
|
||||||
|
|
||||||
/*if(prix==0)
|
/*if(prix==0)
|
||||||
{
|
{
|
||||||
controle.focus();
|
controle.focus();
|
||||||
|
|
@ -3462,12 +3457,9 @@ function ajax_maj_prix_medicament_pha(idMedicament, tarifPublic, prix, controle)
|
||||||
|
|
||||||
if(typeMargePrixMedicament=="Taux")
|
if(typeMargePrixMedicament=="Taux")
|
||||||
{
|
{
|
||||||
|
pourcentage = parseInt(tarifPublic) * parseInt(margePrixMedicament);
|
||||||
pourcentage = parseInt(tarifPublic) * parseInt(margePrixMedicament);
|
prixMarge = parseInt(pourcentage) / 100;
|
||||||
prixMarge = parseInt(pourcentage) / 100;
|
prixMarjore =parseInt(tarifPublic) + parseInt(prixMarge);
|
||||||
prixMarjore =parseInt(tarifPublic) + parseInt(prixMarge);
|
|
||||||
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
prixMarjore =parseInt(tarifPublic) + parseInt(margePrixMedicament);
|
prixMarjore =parseInt(tarifPublic) + parseInt(margePrixMedicament);
|
||||||
}
|
}
|
||||||
|
|
@ -3476,41 +3468,38 @@ function ajax_maj_prix_medicament_pha(idMedicament, tarifPublic, prix, controle)
|
||||||
|
|
||||||
if(controle_numerique(controle))
|
if(controle_numerique(controle))
|
||||||
{
|
{
|
||||||
|
|
||||||
if(appliquerMargePrixMedicament == "1")
|
if(appliquerMargePrixMedicament == "1")
|
||||||
{
|
{
|
||||||
|
if(prix > prixMarjore){
|
||||||
|
controle.value = tarifPublic;
|
||||||
|
controle.focus();
|
||||||
|
v_msg="D\u00e9sol\u00e9! Le prix saisi est sup\u00e9rieur \u00e0 la valeur de la marge de "+formatCurrency(prixMarge)+" "+devise+" appliquable au le prix syst\u00e8me de ce m\u00e9dicament.";
|
||||||
|
v_msgEng="Sorry! but the price entered is higher than the value of the margin "+formatCurrency(prixMarge)+" "+devise+" applicable to the system price of this medicine.";
|
||||||
|
|
||||||
|
alert_ebene(v_msg, v_msgEng);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
donnees = 'idMedicament='+idMedicament+"&prix="+prix;
|
||||||
|
|
||||||
if(prix > prixMarjore){
|
$.ajax({
|
||||||
controle.value = tarifPublic;
|
url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/",
|
||||||
controle.focus();
|
type: 'POST',
|
||||||
v_msg="D\u00e9sol\u00e9! Le prix saisi est sup\u00e9rieur \u00e0 la valeur de la marge de "+formatCurrency(prixMarge)+" "+devise+" appliquable au le prix syst\u00e8me de ce m\u00e9dicament.";
|
data: donnees,
|
||||||
v_msgEng="Sorry! but the price entered is higher than the value of the margin "+formatCurrency(prixMarge)+" "+devise+" applicable to the system price of this medicine.";
|
success: function(data) {
|
||||||
|
// $("#medicaments").html(data);
|
||||||
|
$("#livraison").html(data);
|
||||||
|
|
||||||
alert_ebene(v_msg, v_msgEng);
|
getstatutacte("PH");
|
||||||
return;
|
|
||||||
}
|
|
||||||
donnees = 'idMedicament='+idMedicament+"&prix="+prix;
|
|
||||||
|
|
||||||
$.ajax({
|
},
|
||||||
url: $("#racineWeb").val()+"Ajaxdetailpharmacien/majprixpha/",
|
error: function(data) {
|
||||||
type: 'POST',
|
},
|
||||||
data: donnees,
|
complete: function() {
|
||||||
success: function(data) {
|
|
||||||
// $("#medicaments").html(data);
|
|
||||||
$("#livraison").html(data);
|
|
||||||
|
|
||||||
getstatutacte("PH");
|
alerter_depassement_limite();
|
||||||
|
controle.focus();
|
||||||
},
|
}
|
||||||
error: function(data) {
|
});
|
||||||
},
|
|
||||||
complete: function() {
|
|
||||||
|
|
||||||
alerter_depassement_limite();
|
|
||||||
controle.focus();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
donnees = 'idMedicament='+idMedicament+"&prix="+prix;
|
donnees = 'idMedicament='+idMedicament+"&prix="+prix;
|
||||||
|
|
@ -3549,10 +3538,8 @@ function ajax_maj_prix_medicament_cso(idMedicament, tarifPublic, prix, controle)
|
||||||
prix=prix.replace(/ /g,"");
|
prix=prix.replace(/ /g,"");
|
||||||
controle.value=prix;
|
controle.value=prix;
|
||||||
|
|
||||||
|
|
||||||
prixMarge = parseInt(tarifPublic) + parseInt(margePrixMedicament);
|
prixMarge = parseInt(tarifPublic) + parseInt(margePrixMedicament);
|
||||||
|
|
||||||
|
|
||||||
margePrixMedicament = parseInt(margePrixMedicament);
|
margePrixMedicament = parseInt(margePrixMedicament);
|
||||||
|
|
||||||
if(controle_numerique(controle))
|
if(controle_numerique(controle))
|
||||||
|
|
@ -3694,7 +3681,6 @@ function ajax_maj_prix_medicament_cso(idMedicament, tarifPublic, prix, controle)
|
||||||
type: 'POST',
|
type: 'POST',
|
||||||
data: donnees,
|
data: donnees,
|
||||||
success: function(data) {
|
success: function(data) {
|
||||||
// $("#medicaments").html(data);
|
|
||||||
$("#livraison").html(data);
|
$("#livraison").html(data);
|
||||||
},
|
},
|
||||||
error: function(data) {
|
error: function(data) {
|
||||||
|
|
@ -3705,8 +3691,6 @@ function ajax_maj_prix_medicament_cso(idMedicament, tarifPublic, prix, controle)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -3715,8 +3699,6 @@ function ajax_maj_prix_medicament_cso(idMedicament, tarifPublic, prix, controle)
|
||||||
|
|
||||||
function maj_prixmanuel_pha(idLivre, nbreLivre, valeurActeManuel, controle)
|
function maj_prixmanuel_pha(idLivre, nbreLivre, valeurActeManuel, controle)
|
||||||
{
|
{
|
||||||
alert("maj_prixmanuel_pha");
|
|
||||||
|
|
||||||
valeurActeManuel=valeurActeManuel.replace(/ /g,"");
|
valeurActeManuel=valeurActeManuel.replace(/ /g,"");
|
||||||
valeurActeManuel=parseInt(valeurActeManuel.replace(",","."),10);
|
valeurActeManuel=parseInt(valeurActeManuel.replace(",","."),10);
|
||||||
controle.value=valeurActeManuel;
|
controle.value=valeurActeManuel;
|
||||||
|
|
|
||||||
|
|
@ -892,7 +892,7 @@
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.css" crossorigin="anonymous">
|
||||||
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js" crossorigin="anonymous"></script>
|
<script src="https://cdn.jsdelivr.net/npm/toastr@2.1.4/build/toastr.min.js" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<script src="Js/fonctions.js?ver=2026.06.10.00"></script>
|
<script src="Js/fonctions.js?ver=2026.06.10.01"></script>
|
||||||
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
<script src="Bootstrap/js/bootstrap.min.js"></script>
|
||||||
|
|
||||||
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
|
<script src="https://cdn.jsdelivr.net/npm/vue@3/dist/vue.global.prod.js"></script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user