17/07/2024 - 11h30

recette2
cherif 2024-07-17 11:16:33 +02:00
parent 3838a87879
commit 5eed52a57e
8 changed files with 246 additions and 171 deletions

View File

@ -6135,7 +6135,7 @@ const AddClassManual = (props) => {
<br /> <br />
{Global_Getall_Qry_Survey_Data_result_JSON && <div> {Global_Getall_Qry_Survey_Data_result_JSON && <div>
Nombre total d'enquetes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_nb_question_response']} <br /> Nombre total d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_nb_question_response']} <br />
{String(selected_statistic_question_type) === "Somme" && {String(selected_statistic_question_type) === "Somme" &&
<nav> <nav>
@ -6145,7 +6145,7 @@ const AddClassManual = (props) => {
{String(selected_statistic_question_type) === "Moyenne" && {String(selected_statistic_question_type) === "Moyenne" &&
<nav> <nav>
Somme totale d'enquetes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_somme_question_response']} <br /> Somme totale d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_somme_question_response']} <br />
Moyenne Globale sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_moyenne_question_response']} <br /> Moyenne Globale sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_moyenne_question_response']} <br />
</nav>} </nav>}

View File

@ -743,6 +743,7 @@ const DisplayPartnerSession = (props) => {
<div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}> <div style={{ paddingLeft: "5px", paddingRight: "10px", "display": "block", wordBreak: "break-all" }}>
{New_civilite && New_civilite.length > 0 && cellValues.row.civilite && {New_civilite && New_civilite.length > 0 && cellValues.row.civilite &&
<nav> <nav>
{New_civilite.filter((data) => (data).id === String(cellValues.row.civilite))[0].label} {New_civilite.filter((data) => (data).id === String(cellValues.row.civilite))[0].label}
</nav> </nav>

View File

@ -10567,7 +10567,7 @@ const Employes = (props) => {
<br /> <br />
{Global_Getall_Qry_Survey_Data_result_JSON && <div> {Global_Getall_Qry_Survey_Data_result_JSON && <div>
Nombre total d'enquetes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_nb_question_response']} <br /> Nombre total d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_nb_question_response']} <br />
{String(selected_statistic_question_type) === "Somme" && {String(selected_statistic_question_type) === "Somme" &&
<nav> <nav>
@ -10577,8 +10577,10 @@ const Employes = (props) => {
{String(selected_statistic_question_type) === "Moyenne" && {String(selected_statistic_question_type) === "Moyenne" &&
<nav> <nav>
Somme totale d'enquetes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_somme_question_response']} <br /> Somme totale d'enquêtes sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_somme_question_response']} <br />
Moyenne Globale sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_moyenne_question_response']} <br /> Moyenne Globale sur la période : {Global_Getall_Qry_Survey_Data_result_JSON['global_moyenne_question_response']} <br />
</nav>} </nav>}
</div>} </div>}

View File

@ -789,6 +789,11 @@ const Module_Session_Evaluation = (props) => {
}) })
} }
const [Survey_formateur_evaluation_nom_prenom, setSurvey_formateur_evaluation_nom_prenom] = useState("");
const [Getall_Survey_formateur_evaluation_By_Session_api, setGetall_Survey_formateur_evaluation_By_Session_api] = useState(); const [Getall_Survey_formateur_evaluation_By_Session_api, setGetall_Survey_formateur_evaluation_By_Session_api] = useState();
const [Getall_Survey_formateur_evaluation_By_Session_message, setGetall_Survey_formateur_evaluation_By_Session_message] = useState(); const [Getall_Survey_formateur_evaluation_By_Session_message, setGetall_Survey_formateur_evaluation_By_Session_message] = useState();
const [Getall_Survey_formateur_evaluation_By_Session_result, setGetall_Survey_formateur_evaluation_By_Session_result] = useState([]); const [Getall_Survey_formateur_evaluation_By_Session_result, setGetall_Survey_formateur_evaluation_By_Session_result] = useState([]);
@ -814,6 +819,15 @@ const Module_Session_Evaluation = (props) => {
if (String(res.data.status) === String("true")) { if (String(res.data.status) === String("true")) {
// console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.status = " + res.data.status); // console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.status = " + res.data.status);
//console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message); //console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class = " + res.data.message);
//console.log(" In Getall_Survey_formateur_evaluation_By_Session res.data.message r_class[0] = " + res.data.message[0]);
if (res.data.message[0]) {
var local_jon = JSON.parse(res.data.message[0]);
//console.log(" ### local_jon = ", local_jon);
setSurvey_formateur_evaluation_nom_prenom(local_jon['rh_prenom'] + " " + local_jon['rh_nom'])
}
setGetall_Survey_formateur_evaluation_By_Session_api("true"); setGetall_Survey_formateur_evaluation_By_Session_api("true");
setGetall_Survey_formateur_evaluation_By_Session_result(res.data.message); setGetall_Survey_formateur_evaluation_By_Session_result(res.data.message);
setRows_evaluation_formateur(res.data.message); setRows_evaluation_formateur(res.data.message);
@ -1834,7 +1848,7 @@ const Module_Session_Evaluation = (props) => {
{actionmass_eval_val && String(actionmass_eval_val).length > 1 && String(actionmass_eval_val) !== "" && {actionmass_eval_val && String(actionmass_eval_val).length > 1 && String(actionmass_eval_val) !== "" &&
selectionModel_evaluation.length > 0 && selectionModel_evaluation.length > 0 &&
<Popup <Popup
trigger={<Button className="bton_enreg" > trigger={<Button className="bton_enreg" >
@ -2189,7 +2203,7 @@ const Module_Session_Evaluation = (props) => {
<div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem", "width": "100%", "float": "right" }}> <div className="div_row" style={{ "textAlign": "right", "marginTop": "0.5rem", "width": "100%", "float": "right" }}>
<div className="titre1"> Evaluation à Enseignant </div> <div className="titre1"> Evaluation Enseignant <b> {Survey_formateur_evaluation_nom_prenom} </b> </div>
<div style={{ width: "100%", float: "left" }}> <div style={{ width: "100%", float: "left" }}>

View File

@ -1051,7 +1051,7 @@ const Mon_Tableau_De_Bord = (props) => {
<div className="div_row"> <div className="div_row">
<Button variant="outlined" onClick={submenu_montbd} className="detail_class_submenu" id='montbd' name='montbd' >Mon tableau de bord </Button> {/* <Button variant="outlined" onClick={submenu_montbd} className="detail_class_submenu" id='montbd' name='montbd' >Mon tableau de bord </Button> */}
<Button variant="outlined" onClick={submenu_rapport_activite} className="detail_class_submenu" id='rapport_activite' name='rapport_activite' >Rapport Activite </Button> <Button variant="outlined" onClick={submenu_rapport_activite} className="detail_class_submenu" id='rapport_activite' name='rapport_activite' >Rapport Activite </Button>
<Button variant="outlined" onClick={submenu_rapport_financier} className="detail_class_submenu" id='rapport_financier' name='rapport_financier' >Rapports Financiers </Button> <Button variant="outlined" onClick={submenu_rapport_financier} className="detail_class_submenu" id='rapport_financier' name='rapport_financier' >Rapports Financiers </Button>
<Button variant="outlined" onClick={submenu_rapport_rh} className="detail_class_submenu" id='rapport_rh' name='rapport_rh' >Ressources Humaine </Button> <Button variant="outlined" onClick={submenu_rapport_rh} className="detail_class_submenu" id='rapport_rh' name='rapport_rh' >Ressources Humaine </Button>
@ -1508,7 +1508,7 @@ const Mon_Tableau_De_Bord = (props) => {
{JSON.parse(my_data).total_duration && {JSON.parse(my_data).total_duration &&
<nav style={{ <nav style={{
"paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem", "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem",
"color": '#6495ED', "marginBottom":"10px" "color": '#6495ED', "marginBottom": "10px"
}}> }}>
Durée totale : {JSON.parse(my_data).total_duration} Durée totale : {JSON.parse(my_data).total_duration}
@ -1527,177 +1527,181 @@ const Mon_Tableau_De_Bord = (props) => {
<br /> <br />
<Box > <Box >
&nbsp; &nbsp;
<div className="session_data"> <div className="session_data">
<div style={{ "border": "None" }}> <div style={{ "border": "None" }}>
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}> <div style={{ height: 550, width: '100%', paddingRight: '5px' }}>
&nbsp; &nbsp;
<Box <Box
sx={{ sx={{
height: 500, height: 500,
width: '100%', width: '100%',
paddingRight: '1px', paddingRight: '1px',
"& .MuiDataGrid-columnHeaders": { "& .MuiDataGrid-columnHeaders": {
backgroundColor: "#c8cfd5", backgroundColor: "#c8cfd5",
color: "black", color: "black",
fontSize: 14 fontSize: 14
}, },
'& .line--statut--selected': { '& .line--statut--selected': {
backgroundColor: '#FBF2EF', backgroundColor: '#FBF2EF',
color: 'black', color: 'black',
}, },
'& .line--statut--pair': { '& .line--statut--pair': {
backgroundColor: 'rgba(235, 235, 235, .7)', backgroundColor: 'rgba(235, 235, 235, .7)',
color: 'black', color: 'black',
}, },
'& .line--statut--impair': { '& .line--statut--impair': {
backgroundColor: '#FFFFFF', backgroundColor: '#FFFFFF',
color: 'black', color: 'black',
}, },
}}
>
<DataGrid
checkboxSelection
onSelectionModelChange={(newSelectionModel) => {
setSelectionModel_task_cost(newSelectionModel);
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
/* setaddOneParticipant();
setdisplay_detail_insc();
setselected_code_session();
setsubmenu();*/
}
}}
selectionModel={selectionModel_task_cost}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => (
{
id: index,
_id: JSON.parse(item)._id,
rh_civilite: JSON.parse(item).rh_civilite,
rh_nom: JSON.parse(item).rh_nom,
rh_prenom: JSON.parse(item).rh_prenom,
rh_email: JSON.parse(item).rh_email,
rh_ismanager: JSON.parse(item).rh_ismanager,
rh_fonction: JSON.parse(item).rh_fonction,
rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile,
rh_adr_adresse: JSON.parse(item).rh_adr_adresse,
rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal,
rh_adr_ville: JSON.parse(item).rh_adr_ville,
rh_adr_pays: JSON.parse(item).rh_adr_pays,
rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut,
rh_contrat_date_fin: JSON.parse(item).rh_contrat_date_fin,
rh_contrat_type_contrat: JSON.parse(item).rh_contrat_type_contrat,
rh_contrat_type_employe: JSON.parse(item).rh_contrat_type_employe,
rh_contrat_cout: JSON.parse(item).rh_contrat_cout,
rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite,
rh_contrat_quantite: JSON.parse(item).rh_contrat_quantite,
rh_contrat_groupe_prix_achat_id: JSON.parse(item).rh_contrat_groupe_prix_achat_id,
rh_contrat_groupe_prix_achat_code: JSON.parse(item).rh_contrat_groupe_prix_achat_code,
rh_contrat_groupe_prix_achat_cout: JSON.parse(item).rh_contrat_groupe_prix_achat_cout,
rh_contrat_groupe_prix_achat_periodicite: JSON.parse(item).rh_contrat_groupe_prix_achat_periodicite,
rh_event_planning_event_title: JSON.parse(item).rh_event_planning_event_title,
rh_event_planning_even_comment: JSON.parse(item).rh_event_planning_even_comment,
rh_event_planning_event_type: JSON.parse(item).rh_event_planning_event_type,
rh_event_planning_event_duration_hour: JSON.parse(item).rh_event_planning_event_duration_hour,
rh_event_planning_agenda_date_jour: JSON.parse(item).rh_event_planning_agenda_date_jour,
rh_event_planning_event_start: JSON.parse(item).rh_event_planning_event_start,
rh_event_planning_event_end: JSON.parse(item).rh_event_planning_event_end,
rh_event_planning_event_cost: JSON.parse(item).rh_event_planning_event_cost,
}
))}
columns={columns_task_cost}
pageSize={10}
className="datagridclass"
onRowDoubleClick={(newSelectionModel) => {
}} }}
>
<DataGrid
checkboxSelection
onSelectionModelChange={(newSelectionModel) => {
setSelectionModel_task_cost(newSelectionModel);
/*if (newSelectionModel.length === 1)
handleClick_edit_session_From_Line(newSelectionModel);*/
if (newSelectionModel.length !== 1) {
/* setaddOneParticipant();
setdisplay_detail_insc();
setselected_code_session();
setsubmenu();*/
}
}}
selectionModel={selectionModel_task_cost}
localeText={frFR.components.MuiDataGrid.defaultProps.localeText}
rows={Getall_Qry_RH_Task_Cost_Data_result.map((item, index) => (
{
id: index,
_id: JSON.parse(item)._id,
rh_civilite: JSON.parse(item).rh_civilite,
rh_nom: JSON.parse(item).rh_nom,
rh_prenom: JSON.parse(item).rh_prenom,
rh_email: JSON.parse(item).rh_email,
rh_ismanager: JSON.parse(item).rh_ismanager,
rh_fonction: JSON.parse(item).rh_fonction,
rh_telephone_mobile: JSON.parse(item).rh_telephone_mobile,
rh_adr_adresse: JSON.parse(item).rh_adr_adresse,
rh_adr_code_postal: JSON.parse(item).rh_adr_code_postal,
rh_adr_ville: JSON.parse(item).rh_adr_ville,
rh_adr_pays: JSON.parse(item).rh_adr_pays,
rh_contrat_date_debut: JSON.parse(item).rh_contrat_date_debut,
rh_contrat_date_fin: JSON.parse(item).rh_contrat_date_fin,
rh_contrat_type_contrat: JSON.parse(item).rh_contrat_type_contrat,
rh_contrat_type_employe: JSON.parse(item).rh_contrat_type_employe,
rh_contrat_cout: JSON.parse(item).rh_contrat_cout,
rh_contrat_periodicite: JSON.parse(item).rh_contrat_periodicite,
rh_contrat_quantite: JSON.parse(item).rh_contrat_quantite,
rh_contrat_groupe_prix_achat_id: JSON.parse(item).rh_contrat_groupe_prix_achat_id,
rh_contrat_groupe_prix_achat_code: JSON.parse(item).rh_contrat_groupe_prix_achat_code,
rh_contrat_groupe_prix_achat_cout: JSON.parse(item).rh_contrat_groupe_prix_achat_cout,
rh_contrat_groupe_prix_achat_periodicite: JSON.parse(item).rh_contrat_groupe_prix_achat_periodicite,
rh_event_planning_event_title: JSON.parse(item).rh_event_planning_event_title,
rh_event_planning_even_comment: JSON.parse(item).rh_event_planning_even_comment,
rh_event_planning_event_type: JSON.parse(item).rh_event_planning_event_type,
rh_event_planning_event_duration_hour: JSON.parse(item).rh_event_planning_event_duration_hour,
rh_event_planning_agenda_date_jour: JSON.parse(item).rh_event_planning_agenda_date_jour,
rh_event_planning_event_start: JSON.parse(item).rh_event_planning_event_start,
rh_event_planning_event_end: JSON.parse(item).rh_event_planning_event_end,
rh_event_planning_event_cost: JSON.parse(item).rh_event_planning_event_cost,
}
))}
columns={columns_task_cost}
pageSize={10}
className="datagridclass"
onRowDoubleClick={(newSelectionModel) => {
}}
rowsPerPageOptions={[10]} rowsPerPageOptions={[10]}
disableSelectionOnClick disableSelectionOnClick
components={{ components={{
Toolbar: GridToolbar, Toolbar: GridToolbar,
}} }}
//sx={datagridSx} //sx={datagridSx}
getCellClassName={(params) => { getCellClassName={(params) => {
/* // Pour la gestion de la couleur de zone double cliquée /* // Pour la gestion de la couleur de zone double cliquée
if (String(params.row.id) === String(gridline_id)) { if (String(params.row.id) === String(gridline_id)) {
return 'line--statut--selected'; return 'line--statut--selected';
} }
else if (parseInt(String(params.row.id)) % 2 === 0) { else if (parseInt(String(params.row.id)) % 2 === 0) {
return 'line--statut--pair'; return 'line--statut--pair';
} }
else if (parseInt(String(params.row.id)) % 2 !== 0) { else if (parseInt(String(params.row.id)) % 2 !== 0) {
return 'line--statut--impair'; return 'line--statut--impair';
}*/ }*/
}} }}
getRowClassName={(params) => { getRowClassName={(params) => {
/* // Pour la gestion de la couleur de zone double cliquée /* // Pour la gestion de la couleur de zone double cliquée
if (String(params.row.id) === String(gridline_id)) { if (String(params.row.id) === String(gridline_id)) {
return 'line--statut--selected'; return 'line--statut--selected';
} }
else if (parseInt(String(params.row.id)) % 2 === 0) { else if (parseInt(String(params.row.id)) % 2 === 0) {
return 'line--statut--pair'; return 'line--statut--pair';
} }
else if (parseInt(String(params.row.id)) % 2 !== 0) { else if (parseInt(String(params.row.id)) % 2 !== 0) {
return 'line--statut--impair'; return 'line--statut--impair';
}*/ }*/
}} }}
getEstimatedRowHeight={() => 200} getEstimatedRowHeight={() => 200}
getRowHeight={() => "auto"} getRowHeight={() => "auto"}
/> />
</Box> </Box>
<br /> <br />
</div> </div>
{Getall_Qry_RH_Task_Cost_Data_result && {Getall_Qry_RH_Task_Cost_Data_result &&
Getall_Qry_RH_Task_Cost_Data_result.map((my_data) => ( Getall_Qry_RH_Task_Cost_Data_result.map((my_data) => (
<div > <div >
{JSON.parse(my_data).total_duration && {JSON.parse(my_data).total_duration &&
<nav style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem", <nav style={{
"color":'#6495ED' }}> "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem",
"color": '#6495ED'
}}>
Durée totale : {JSON.parse(my_data).total_duration} Durée totale : {JSON.parse(my_data).total_duration}
</nav>} </nav>}
{JSON.parse(my_data).total_cost && {JSON.parse(my_data).total_cost &&
<nav style={{ "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem", <nav style={{
"color":'#FF7F50', "marginBottom":"10px" }}> "paddingLeft": "5px", "textAlign": "left", "width": "100%", "fontWeight": "600", "fontSize": "1.3rem",
"color": '#FF7F50', "marginBottom": "10px"
}}>
Coût total : {JSON.parse(my_data).total_cost} Coût total : {JSON.parse(my_data).total_cost}
</nav>} </nav>}
</div> </div>
))} ))}
</div>
</div> </div>
</div>
</Box>
</Box>
</div>} </div>}

View File

@ -238,8 +238,42 @@ const Partner_Commande = (props) => {
{ field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false }, { field: 'order_header_ref_interne', headerName: 'Ref_Interne', hide: true, editable: false },
{ field: 'order_line_type', headerName: 'Type', width: 100, hide: false, editable: false }, { field: 'order_line_type', headerName: 'Type', width: 100, hide: false, editable: false },
{ field: 'order_line_type_article', headerName: 'Type Article', width: 100, hide: false, editable: false }, { field: 'order_line_type_article', headerName: 'Type Article', width: 100, hide: false, editable: false },
{ field: 'related_order_internal_ref', headerName: 'Cmd. Associé', width: 100, hide: true, editable: false },
{ {
field: 'order_line_status', headerName: 'Statut', width: 150, hide: false, editable: false, field: 'order_line_status', headerName: 'Statut', width: 150, hide: false, editable: false,
renderCell: (cellValues) => {
return (
<div style={{ paddingLeft: "5px", paddingRight: "15px", "display": "block", wordBreak: "break-all" }}>
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "-1" && "Annulé"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "0" && "Brouillon"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "1" && "En cours"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "2"
&& String(cellValues.row.order_line_type) === "commande" && "Traité"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "2"
&& String(cellValues.row.order_line_type) === "devis" && "Fermé"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "3"
&& String(cellValues.row.order_line_type) === "commande" && "Facturé"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "3"
&& String(cellValues.row.order_line_type) === "devis" && "Gagné"}
{cellValues.row.order_line_status && String(cellValues.row.order_line_status) === "4"
&& String(cellValues.row.order_line_type) === "devis" && "Perdu"}
</div>
);
},
valueFormatter: (params) => { valueFormatter: (params) => {
if (String(params.value) === "-1") if (String(params.value) === "-1")
return "Annulé"; return "Annulé";
@ -3156,7 +3190,7 @@ const Partner_Commande = (props) => {
function Recalcul_Item_Amounts() { function Recalcul_Item_Amounts() {
var qty = parseFloat(document.getElementById("ref_article_qty").value); var qty = parseFloat(document.getElementById("ref_article_qty").value);
var unit_price = parseFloat(document.getElementById("ref_article_unit_price").value); var unit_price = parseFloat(document.getElementById("ref_article_unit_price").value);
var total_base1 = (unit_price * qty).toFixed(3); var total_base1 = (unit_price * qty).toFixed(2);
var total_reduction = 0; var total_reduction = 0;
@ -3171,13 +3205,13 @@ const Partner_Commande = (props) => {
if (String(p_add_line_item_type_reduction) === "fixe") { if (String(p_add_line_item_type_reduction) === "fixe") {
console.log("fixe : p_add_line_item_reduction_value = ", reduct_value); console.log("fixe : p_add_line_item_reduction_value = ", reduct_value);
total_reduction = (parseFloat(String(reduct_value)) * qty).toFixed(3); total_reduction = (parseFloat(String(reduct_value)) * qty).toFixed(2);
} if (String(p_add_line_item_type_reduction) === "percent") { } if (String(p_add_line_item_type_reduction) === "percent") {
console.log("percent p_add_line_item_reduction_value = ", reduct_value); console.log("percent p_add_line_item_reduction_value = ", reduct_value);
total_reduction = ((unit_price * parseFloat(String(reduct_value)) * qty) / 100).toFixed(3); total_reduction = ((unit_price * parseFloat(String(reduct_value)) * qty) / 100).toFixed(2);
} }
@ -3185,8 +3219,8 @@ const Partner_Commande = (props) => {
//console.log(" ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value); //console.log(" ### qty = ", qty, " ### unit_price = ", unit_price, " ### total_base1 = ", total_base1, " ### total_reduction = ", total_reduction, " ### reduct_value = ", reduct_value);
var montant_taxe_tva = ((total_base1 - total_reduction) * [parseFloat(String(partner_taux_tva)) / 100]).toFixed(3); 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(3); //(total_base2 + montant_taxe_tva).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);
setp_add_line_item_reduction_total_amount(String(total_reduction)); setp_add_line_item_reduction_total_amount(String(total_reduction));
setp_add_line_item_total_amount_ht(String(total_base1)); setp_add_line_item_total_amount_ht(String(total_base1));
@ -4128,7 +4162,7 @@ const Partner_Commande = (props) => {
<DialogTitle>MySy Information</DialogTitle> <DialogTitle>MySy Information</DialogTitle>
<DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}> <DialogContent className="DialogContent_width" style={{ "minHeight": "20rem" }}>
<DialogContentText> <DialogContentText>
Envoi devis par email Envoi devis par email
</DialogContentText> </DialogContentText>
@ -6712,8 +6746,25 @@ const Partner_Commande = (props) => {
String(p_detail_header_statut_label).toLowerCase() === "traité" && String(p_detail_header_statut_label).toLowerCase() === "traité" &&
<Button variant="outlined" onClick={Invoice_Order_Data} className="detail_class_submenu bton_add_sous_menu_cmd_gauche"> Facturer </Button>} <Button variant="outlined" onClick={Invoice_Order_Data} className="detail_class_submenu bton_add_sous_menu_cmd_gauche"> Facturer </Button>}
{String(selected_order_header_type) === "devis" && String(p_detail_header_statut_label).toLowerCase() === "en cours" &&
<Button variant="outlined" onClick={Convert_Quotation_To_Order_Data} className="detail_class_submenu bton_add_sous_menu_cmd_gauche"> Convertir en Cmd </Button>} {String(selected_order_header_type) === "devis" &&
(String(p_detail_header_statut_label).toLowerCase().trim() === "en cours" || String(p_detail_header_statut_label).toLowerCase().trim() === "gagné") &&
String(p_detail_header_order_header_ref_interne) === "" &&
<Button variant="outlined" onClick={Convert_Quotation_To_Order_Data} className="detail_class_submenu bton_add_sous_menu_cmd_gauche"> Convertir en Cmd </Button>
}
{String(selected_order_header_type) === "devis" &&
(String(p_detail_header_statut_label).toLowerCase().trim() === "en cours" || String(p_detail_header_statut_label).toLowerCase().trim() === "gagné") &&
String(p_detail_header_order_header_ref_interne) !== "" &&
<Button variant="outlined" className="detail_class_submenu bton_add_sous_menu_cmd_gauche">
<Tooltip className="tooltip_css" id="info_ref_cmd_01" style={{ "fontSize": "12px" }} />
<a data-tooltip-id="info_ref_cmd_01" data-tooltip-html=" Ce devis est associé à la ce numero de commande ">
Cmd: {p_detail_header_order_header_ref_interne} &nbsp;
<FcInfo /> </a>
</Button>
}
{String(selected_order_header_type) === "devis" && String(p_detail_header_statut_label).toLowerCase() === "en cours" && {String(selected_order_header_type) === "devis" && String(p_detail_header_statut_label).toLowerCase() === "en cours" &&
<Popup <Popup
@ -6975,6 +7026,7 @@ const Partner_Commande = (props) => {
order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code, order_line_formation_external_code: JSON.parse(item).order_line_formation_external_code,
order_line_type_article: JSON.parse(item).order_line_type_article, order_line_type_article: JSON.parse(item).order_line_type_article,
order_line_montant_hors_taxes: JSON.parse(item).order_line_montant_hors_taxes, order_line_montant_hors_taxes: JSON.parse(item).order_line_montant_hors_taxes,
related_order_internal_ref: JSON.parse(item).related_order_internal_ref,
} }
))} ))}

View File

@ -1021,7 +1021,7 @@ const Partner_Facture = (props) => {
var line = JSON.parse(rowss[selected_row_id]); var line = JSON.parse(rowss[selected_row_id]);
//console.log("### line = ", line); console.log("### line = ", line);
var invoice_id = line._id; var invoice_id = line._id;
setselected_id(invoice_id); setselected_id(invoice_id);

View File

@ -306,7 +306,7 @@ const Partner_Product_Service = (props) => {
var node = { var node = {
"_id": local_id, "_id": local_id,
"id": localid, "id": localid,
"label": local_code+"-"+local_nom, "label": local_code + "-" + local_nom,
"code": local_code, "code": local_code,
"nom": local_nom, "nom": local_nom,
"type": local_type, "type": local_type,
@ -1812,7 +1812,7 @@ const Partner_Product_Service = (props) => {
<Button variant="outlined" onClick={submenu_ressource_associe} className="detail_class_submenu" id='ressource_associe' name='affectation'>Ressources Associées </Button> <Button variant="outlined" onClick={submenu_ressource_associe} className="detail_class_submenu" id='ressource_associe' name='affectation'>Ressources Associées </Button>
*/} */}
</div> </div>
<nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un nouveau materiel </nav> <nav style={{ "border": "None", "fontSize": "22px", "fontWeight": "600" }}> Ajouter un nouveau produit/service </nav>
<div className="session_data" > <div className="session_data" >
<div className="session_caract"> <b>Code produit </b> <br /> <div className="session_caract"> <b>Code produit </b> <br />
<TextField <TextField
@ -1903,7 +1903,7 @@ const Partner_Product_Service = (props) => {
/> />
</div> </div>
<div className="session_caract"> Code Taxe<br /> <div className="session_caract"> Taux TVA<br />
<TextField <TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }} sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}
required required
@ -1914,6 +1914,8 @@ const Partner_Product_Service = (props) => {
shrink: true, shrink: true,
}} }}
disabled={false} disabled={false}
type={"number"}
inputProps={{ min: "1", max: "999999", step: "0.1" }}
className="disabled_style" className="disabled_style"
value={p_one_detail_code_taxe} value={p_one_detail_code_taxe}
onChange={(e) => { onChange={(e) => {