06/06/23 - 19h

recette2
cherif 2023-06-06 19:24:59 +02:00
parent 7c50bf1d72
commit 673d6746cd
3 changed files with 79 additions and 40 deletions

View File

@ -1147,7 +1147,7 @@ function Abonnement(props) {
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }} className="block_remise">
<a data-tooltip-id="tooltip_id_1" data-tooltip-content="Saisir le code remise">
Code remise :
Code Remise :
<input type="text" id="discount_val" name="discount_val"
minlength="4" maxlength="20" size="20" style={{ "width": "50%", "float": "right" }}
onBlur={handleOnblur_Code_Promo}>
@ -1175,9 +1175,30 @@ function Abonnement(props) {
</div>
{code_promo_text_to_display && String(code_promo_text_to_display) != "" &&
<div style={{ "width": "100%", "float": "left" }} id="div_nb_formation" className="mob_heigh">
<div style={{ "textAlign": "left", "width": "50%", "float": "left", "color": "green", "fontSize": "bold" }}>
Montant Remise :
</div>
{String(handleOnblur_Code_Promo_api) === "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right", "color": "green", "fontSize": "bold" }}>
{String(code_promo_type) === "fix" && <nav>
- {(((packprice * new_nb_formations) - parseFloat(code_promo_valeur)) ).toFixed(2)}
</nav>}
{String(code_promo_type) === "percent" && <nav>
- {((((packprice * new_nb_formations) * ( (parseFloat(code_promo_valeur) / 100)))) ).toFixed(2)}
</nav>}
</div>}
</div>
}
<div style={{ "width": "100%", "float": "left" }} id="div_nb_formation" className="mob_heigh">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
TVA :
TVA (20%):
</div>
{String(handleOnblur_Code_Promo_api) !== "true" && <div style={{ "textAlign": "right", "width": "50%", "float": "left" }}>

View File

@ -511,7 +511,7 @@ function CheckOut(props) {
form1.append("discount_code", code_promo_code);
form1.append("discount_type", code_promo_type);
form1.append("discount_valeur", code_promo_valeur);
fetch(myurl, {
method: 'POST',
@ -1298,13 +1298,41 @@ function CheckOut(props) {
</div>
<div style={{ "width": "90%", "float": "left" }} id="div_ttc">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
Total HT :
</div>
{String(handleOnblur_Code_Promo_api) !== "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{(packprice * nb_formations).toFixed(2)}
</div>
}
{String(handleOnblur_Code_Promo_api) === "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{String(code_promo_type) === "fix" && <nav>
{(packprice * nb_formations).toFixed(2)}
</nav>}
{String(code_promo_type) === "percent" && <nav>
{(packprice * nb_formations).toFixed(2)}
</nav>}
</div>
}
</div>
<div style={{ "width": "90%", "float": "left" }}>
<Tooltip id="tooltip_id_1" />
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
<a data-tooltip-id="tooltip_id_1" data-tooltip-content="Saisir le code remise">
Code remise :
Code Remise :
<input type="text" id="discount_val" name="discount_val"
minlength="4" maxlength="20" size="20" style={{ "width": "50%", "float": "right" }}
onBlur={handleOnblur_Code_Promo}>
@ -1328,60 +1356,50 @@ function CheckOut(props) {
</div>
<div style={{ "width": "90%", "float": "left" }} id="div_ttc">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
Total HT :
</div>
{String(handleOnblur_Code_Promo_api) !== "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{(packprice * nb_formations).toFixed(2) }
{code_promo_text_to_display && String(code_promo_text_to_display) != "" &&
<div style={{ "width": "90%", "float": "left" }} id="div_nb_formation" className="mob_heigh">
<div style={{ "textAlign": "left", "width": "50%", "float": "left", "color": "green", "fontSize": "bold" }}>
Montant Remise :
</div>
}
{String(handleOnblur_Code_Promo_api) === "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{String(code_promo_type) === "fix" && <nav>
{(((packprice * nb_formations) - parseFloat(code_promo_valeur))).toFixed(2) }
</nav>}
{String(code_promo_type) === "percent" && <nav>
{((((packprice * nb_formations) * (1 - (parseFloat(code_promo_valeur) / 100))))).toFixed(2) }
</nav>}
</div>
}
<div> &nbsp;
{String(handleOnblur_Code_Promo_api) === "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right", "color": "green", "fontSize": "bold" }}>
{String(code_promo_type) === "fix" && <nav>
- {(((packprice * nb_formations) - parseFloat(code_promo_valeur))).toFixed(2)}
</nav>}
{String(code_promo_type) === "percent" && <nav>
- {((((packprice * nb_formations) * ((parseFloat(code_promo_valeur) / 100))))).toFixed(2)}
</nav>}
</div>}
</div>
</div>
}
<div style={{ "width": "90%", "float": "left" }}>
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
TVA :
TVA (20%):
</div>
{String(handleOnblur_Code_Promo_api) !== "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{(packprice * nb_formations * 0.2).toFixed(2)}
</div>}
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{(packprice * nb_formations * 0.2).toFixed(2)}
</div>}
{String(handleOnblur_Code_Promo_api) === "true" &&
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{String(code_promo_type) === "fix" && <nav>
{ ( ((packprice * nb_formations) - parseFloat(code_promo_valeur)) * 0.2).toFixed(2)}
<div style={{ "textAlign": "right", "width": "50%", "float": "right" }}>
{String(code_promo_type) === "fix" && <nav>
{(((packprice * nb_formations) - parseFloat(code_promo_valeur)) * 0.2).toFixed(2)}
</nav>}
{String(code_promo_type) === "percent" && <nav>
{((((packprice * nb_formations) * (1 - (parseFloat(code_promo_valeur) / 100)))) * 0.2).toFixed(2)}
</nav>}
</div>}
</div>}
</div>
<div style={{ "width": "90%", "float": "left" }} id="div_ttc">
<div style={{ "textAlign": "left", "width": "50%", "float": "left" }}>
Total TTC :

View File

@ -564,7 +564,7 @@ const Partner = (props) => {
my_lms_url = (JSON.parse(res.data.message).lms_virtualhost_url) + "user_portal.php?recid=" + encodeURIComponent(JSON.parse(res.data.message).lms_part_recid) +
"&mysytoken=" + encodeURIComponent(JSON.parse(res.data.message).lms_pwd_mask);
//console.log(" ### LMS url = ", my_lms_url);
console.log(" ### LMS url = ", my_lms_url);
setpartner_lms_url(my_lms_url);
}