20/08/2024 - 21h55
parent
d7f84c506e
commit
1f68cf0bb2
|
@ -1410,7 +1410,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
if (String(res.data.status) === String("true")) {
|
||||
//console.log(" In Getall_TrainingSession res.data.status = " + res.data.status);
|
||||
//console.log(" In Getall_TrainingSession res.data.message r_class = " + res.data.message);
|
||||
// console.log(" In Getall_TrainingSession res.data.message r_class = " + res.data.message);
|
||||
setGetall_TrainingSession_api("true");
|
||||
setGetall_TrainingSession_result(res.data.message);
|
||||
setRows(res.data.message);
|
||||
|
@ -4533,7 +4533,7 @@ const DisplayPartnerSession = (props) => {
|
|||
if (document.getElementById("code_session") && document.getElementById("code_session").value != "")
|
||||
code_session = document.getElementById("code_session").value;
|
||||
|
||||
|
||||
|
||||
|
||||
//form.append("token","K3cw63eKokKSbV4spjQ48SUNnfy80yrXfA");
|
||||
const stored_cookie = getCookie('tokenmysypart');
|
||||
|
@ -5037,13 +5037,13 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
|
||||
|
||||
}else{
|
||||
if( New_Getall_Parter_OR_Default_Session_Steps_result && New_Getall_Parter_OR_Default_Session_Steps_result.length > 0 ){
|
||||
|
||||
} else {
|
||||
if (New_Getall_Parter_OR_Default_Session_Steps_result && New_Getall_Parter_OR_Default_Session_Steps_result.length > 0) {
|
||||
|
||||
setp_session_etape(New_Getall_Parter_OR_Default_Session_Steps_result[0].session_step_name);
|
||||
setp_session_etape_label(New_Getall_Parter_OR_Default_Session_Steps_result[0].label);
|
||||
// console.log(" ### iciii")
|
||||
|
||||
// console.log(" ### iciii")
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -11216,6 +11216,8 @@ const DisplayPartnerSession = (props) => {
|
|||
const [selected_emargement_user, setselected_emargement_user] = useState("");
|
||||
const [selected_emargement_date, setselected_emargement_date] = useState("");
|
||||
|
||||
const [selected_row_data_json, setselected_row_data_json] = useState([]);
|
||||
|
||||
return (
|
||||
<div className="displaypartnersession">
|
||||
|
||||
|
@ -13645,7 +13647,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>}
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
@ -13728,7 +13730,7 @@ const DisplayPartnerSession = (props) => {
|
|||
/>
|
||||
}
|
||||
/>}
|
||||
|
||||
|
||||
</div>
|
||||
<div className="div_row_droite texte_area_filter" >
|
||||
{String(p_filtre2).length > 3 &&
|
||||
|
@ -14290,9 +14292,12 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
setselected_session_id(newSelectionModel.row._id);
|
||||
|
||||
setsession_selected_row_id(newSelectionModel.row.id);
|
||||
|
||||
setDialog_2_message(String(JSON.parse(rowss[newSelectionModel.row.id]).title));
|
||||
var result = JSON.parse(rowss.filter((data) => (JSON.parse(data))._id === newSelectionModel.row._id));
|
||||
|
||||
setsession_selected_row_id(result.id);
|
||||
|
||||
setDialog_2_message(String(newSelectionModel.row.title));
|
||||
setDialog_2_open(true);
|
||||
|
||||
}}
|
||||
|
@ -14979,7 +14984,7 @@ const DisplayPartnerSession = (props) => {
|
|||
}
|
||||
/>
|
||||
|
||||
|
||||
|
||||
</div>}
|
||||
|
||||
{!edit_session_form && <div className="session_caract">Etape <br />
|
||||
|
@ -15647,7 +15652,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
{sessionChanged && <div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
/!\ Pensez à enregistrer les modifications
|
||||
/!\ Pensez à enregistrer les modifications
|
||||
</div>}
|
||||
|
||||
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
@ -17710,7 +17715,7 @@ const DisplayPartnerSession = (props) => {
|
|||
{<div className="div_row" style={{ "border": "None", "color": "orange", "textAlign": "center" }}>
|
||||
|
||||
<div className="div_row_gauche" style={{ "textAlign": 'left', 'marginLeft': '15px' }}>
|
||||
<Button variant="contained" className="bton_envoyer" onClick={One_Create_Participant}>Enregistrer le participant
|
||||
<Button variant="contained" className="bton_envoyer" onClick={One_Create_Participant}>Enregistrer le participant
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
|
@ -20290,7 +20295,7 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
{String(submenu) === String("planification_session") && <div style={{ "border": "None" }}>
|
||||
|
||||
|
||||
|
||||
<Module_Session_Planification conntected_employee_id={props.conntected_employee_id} related_collection={"session_formation"}
|
||||
related_collection_recid={selected_session_id} SessionstartDate={new Date(moment(SessionstartDate, "DD/MM/YYYY"))}
|
||||
SessionendDate={new Date(moment(SessionendDate, "DD/MM/YYYY"))} selected_session_invoiced_statut={selected_session_invoiced_statut}
|
||||
|
|
|
@ -266,18 +266,18 @@ const Partner_Commande = (props) => {
|
|||
<nav style={{ width: '100%', 'textAlign': 'center' }}>
|
||||
{String(cellValues.row.order_line_session_id).length > 3 && <div>
|
||||
|
||||
{cellValues.row.order_line_session_code}
|
||||
{cellValues.row.order_line_session_code}
|
||||
|
||||
</div>}
|
||||
|
||||
{String(cellValues.row.order_line_session_id).length <= 3 &&
|
||||
String(cellValues.row.order_line_class_id).length >= 3 &&
|
||||
(String(cellValues.row.order_line_status) === "1" ||
|
||||
String(cellValues.row.order_line_status) === "3") &&
|
||||
String(cellValues.row.order_line_type) === "devis" &&
|
||||
String(cellValues.row.order_line_type_article) === "formation" &&
|
||||
|
||||
<nav>
|
||||
String(cellValues.row.order_line_status) === "3") &&
|
||||
String(cellValues.row.order_line_type) === "devis" &&
|
||||
String(cellValues.row.order_line_type_article) === "formation" &&
|
||||
|
||||
<nav>
|
||||
|
||||
<Button
|
||||
|
||||
|
@ -314,6 +314,11 @@ const Partner_Commande = (props) => {
|
|||
{ field: 'order_line_montant_hors_taxes', headerName: 'Total HT', width: 100, hide: false, editable: false },
|
||||
{ field: 'order_line_tax_amount', headerName: 'Taxe', width: 100, hide: false, editable: false },
|
||||
|
||||
{ field: 'order_line_type_reduction', headerName: 'Reduc. Type', width: 100, hide: true, editable: false },
|
||||
{ field: 'order_line_type_valeur', headerName: 'Reduc. Val', width: 100, hide: true, editable: false },
|
||||
{ field: 'order_line_montant_reduction', headerName: 'Reduc. Mont.', width: 100, hide: false, editable: false },
|
||||
|
||||
|
||||
{ field: 'order_line_taux_taxe', headerName: '% Taxe', width: 100, hide: false, editable: false },
|
||||
|
||||
{ field: 'order_line_montant_toutes_taxes', headerName: 'Montant TTC', width: 100, hide: false, editable: false },
|
||||
|
@ -2264,21 +2269,22 @@ const Partner_Commande = (props) => {
|
|||
document.getElementsByName("detail_header_total_ttc")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("detail_header_type_reduction")[0]) {
|
||||
document.getElementsByName("detail_header_type_reduction")[0].disabled = false;
|
||||
document.getElementsByName("detail_header_type_reduction")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_header_type_reduction_valeur")[0]) {
|
||||
document.getElementsByName("detail_header_type_reduction_valeur")[0].disabled = false;
|
||||
document.getElementsByName("detail_header_type_reduction_valeur")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
/*
|
||||
if (document.getElementsByName("detail_header_type_reduction")[0]) {
|
||||
document.getElementsByName("detail_header_type_reduction")[0].disabled = false;
|
||||
document.getElementsByName("detail_header_type_reduction")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
if (document.getElementsByName("detail_header_type_reduction_valeur")[0]) {
|
||||
document.getElementsByName("detail_header_type_reduction_valeur")[0].disabled = false;
|
||||
document.getElementsByName("detail_header_type_reduction_valeur")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
|
||||
|
||||
if (document.getElementsByName("detail_header_montant_reduction")[0]) {
|
||||
document.getElementsByName("detail_header_montant_reduction")[0].disabled = false;
|
||||
document.getElementsByName("detail_header_montant_reduction")[0].style.backgroundColor = "#FFFFFF";
|
||||
}
|
||||
}*/
|
||||
|
||||
if (document.getElementsByName("detail_header_devis_nb_relance_auto")[0]) {
|
||||
document.getElementsByName("detail_header_devis_nb_relance_auto")[0].disabled = false;
|
||||
|
@ -2825,15 +2831,18 @@ const Partner_Commande = (props) => {
|
|||
|
||||
const montant_ttc = (total_base1_total_reduction * total_taux_tax).toFixed(2);
|
||||
|
||||
console.log(" GLOBAL #### total_taux_tax = ", total_taux_tax);
|
||||
console.log(" GLOBAL #### total_base1_total_reduction = ", total_base1_total_reduction);
|
||||
console.log(" GLOBAL #### montant_ttc = ", montant_ttc);
|
||||
//console.log(" GLOBAL #### total_taux_tax = ", total_taux_tax);
|
||||
//console.log(" GLOBAL #### total_base1_total_reduction = ", total_base1_total_reduction);
|
||||
//console.log(" GLOBAL #### montant_ttc = ", montant_ttc);
|
||||
|
||||
|
||||
var montant_taxe_tva = ((total_base1 - total_reduction) * total_taux_tax_bef).toFixed(2);
|
||||
// var montant_ttc = ((total_base1 - total_reduction) * (1 + [parseFloat(String(partner_taux_tva)) / 100])).toFixed(2); //(total_base2 + montant_taxe_tva).toFixed(2);
|
||||
|
||||
console.log(" GLOBAL #### montant_taxe_tva = ", montant_taxe_tva, " ### montant_ttc = ", montant_ttc);
|
||||
// 20/08/2024 - enlever la réduction du total ht
|
||||
total_base1 = total_base1 - total_reduction;
|
||||
|
||||
//console.log(" GLOBAL #### montant_taxe_tva = ", montant_taxe_tva, " ### montant_ttc = ", montant_ttc);
|
||||
|
||||
setp_add_line_item_reduction_total_amount(String(total_reduction));
|
||||
setp_add_line_item_total_amount_ht(String(total_base1));
|
||||
|
@ -3366,8 +3375,6 @@ const Partner_Commande = (props) => {
|
|||
console.log("fixe : p_add_line_item_reduction_value = ", reduct_value);
|
||||
total_reduction = (parseFloat(String(reduct_value)) * qty).toFixed(2);
|
||||
|
||||
|
||||
|
||||
} if (String(p_add_line_item_type_reduction) === "percent") {
|
||||
console.log("percent p_add_line_item_reduction_value = ", reduct_value);
|
||||
total_reduction = ((unit_price * parseFloat(String(reduct_value)) * qty) / 100).toFixed(2);
|
||||
|
@ -3381,6 +3388,9 @@ const Partner_Commande = (props) => {
|
|||
var montant_taxe_tva = ((total_base1 - total_reduction) * [parseFloat(String(partner_taux_tva)) / 100]).toFixed(2);
|
||||
var montant_ttc = ((total_base1 - total_reduction) * (1 + [parseFloat(String(partner_taux_tva)) / 100])).toFixed(2); //(total_base2 + montant_taxe_tva).toFixed(2);
|
||||
|
||||
// 20/08/2024 - enlever la réduction du total ht
|
||||
total_base1 = total_base1 - total_reduction;
|
||||
|
||||
console.log(" #### montant_taxe_tva = ", montant_taxe_tva, " ### montant_ttc = ", montant_ttc);
|
||||
|
||||
setp_add_line_item_reduction_total_amount(String(total_reduction));
|
||||
|
@ -6675,7 +6685,7 @@ const Partner_Commande = (props) => {
|
|||
<Button variant="outlined" onClick={Send_Order_By_Email} className="detail_class_submenu" id='order_header_main' name='order_header_main'>envoyer par mail</Button>
|
||||
</div>*/}
|
||||
|
||||
|
||||
{/*
|
||||
{String(order_data_edit_mode) === "1" && <div className="session_caract"> Type de Reduction (entete) <br />
|
||||
<TextField
|
||||
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
|
||||
|
@ -6767,7 +6777,7 @@ const Partner_Commande = (props) => {
|
|||
/>
|
||||
</div>
|
||||
|
||||
|
||||
*/}
|
||||
|
||||
<div className="session_caract"> Total Ligne HT avant reduction <br />
|
||||
<TextField
|
||||
|
@ -7522,6 +7532,10 @@ const Partner_Commande = (props) => {
|
|||
order_line_taux_taxe: JSON.parse(item).order_line_taux_taxe,
|
||||
order_line_class_id: JSON.parse(item).class_id,
|
||||
|
||||
order_line_type_reduction: JSON.parse(item).order_line_type_reduction,
|
||||
order_line_type_valeur: JSON.parse(item).order_line_type_valeur,
|
||||
order_line_montant_reduction: JSON.parse(item).order_line_montant_reduction,
|
||||
|
||||
}
|
||||
))}
|
||||
|
||||
|
|
Loading…
Reference in New Issue