recette2
cherif 2024-10-03 21:03:35 +02:00
parent 4b57d4503e
commit 96afb9c28b
4 changed files with 122 additions and 8 deletions

View File

@ -6358,7 +6358,6 @@ const DisplayPartnerStagiaires = (props) => {
{ "id": "2", "label": "Apprentis", "value": "2" },
{ "id": "3", "label": "Particuliers", "value": "3" },
{ "id": "4", "label": "Rech. Emploi", "value": "4" },
]
const New_Option_Filter = [

View File

@ -2092,6 +2092,13 @@ const Partner_Commande = (props) => {
setp_add_line_item_title(mylocal_order.title);
}
if (mylocal_order.order_line_type_apprenant) {
setp_add_line_item_type_apprenant(mylocal_order.order_line_type_apprenant);
}else{
setp_add_line_item_type_apprenant("");
}
if (mylocal_order.order_line_montant_hors_taxes) {
setp_add_line_item_total_amount_ht(mylocal_order.order_line_montant_hors_taxes);
@ -2963,9 +2970,14 @@ const Partner_Commande = (props) => {
form.append("order_line_type_article", article_formation_ou_produit);
form.append("order_line_type_apprenant", String(p_add_line_item_type_apprenant));
form.append("order_line_type_reduction", p_add_line_item_type_reduction);
form.append("order_line_type_valeur", p_add_line_item_reduction_value);
form.append("order_line_montant_reduction", String(total_reduction));
form.append("order_line_montant_hors_taxes", String(total_base1));
form.append("order_line_taux_taxe", partner_taux_tva);
@ -3070,6 +3082,8 @@ const Partner_Commande = (props) => {
const [p_add_line_item_status, setp_add_line_item_status] = useState();
const [p_add_line_item_type, setp_add_line_item_type] = useState();
const [p_add_line_item_type_apprenant, setp_add_line_item_type_apprenant] = useState("");
function clean_article_detail_fields() {
setp_add_line_item();
@ -3082,6 +3096,7 @@ const Partner_Commande = (props) => {
setp_add_line_item_type();
setp_add_line_session_id("");
setp_add_line_session_code("");
setp_add_line_item_type_apprenant("");
}
function Ajouter_une_ligne_article() {
@ -3603,7 +3618,7 @@ const Partner_Commande = (props) => {
for (let i = 0; i < tab_convention_pieces_jointes_result.length; i++) {
form.append('File', tab_convention_pieces_jointes_result[i]);
}
//console.log("### form = ", form);
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Send_Partner_Order_By_Email/";
@ -4521,6 +4536,15 @@ const Partner_Commande = (props) => {
const [tab_convention_pieces_jointes_result, settab_convention_pieces_jointes_result] = useState([]);
const New_type_apprenant = [
{ "id": "0", "label": "Autre", "value": "0" },
{ "id": "1", "label": "Salariés", "value": "1" },
{ "id": "2", "label": "Apprentis", "value": "2" },
{ "id": "3", "label": "Particuliers", "value": "3" },
{ "id": "4", "label": "Rech. Emploi", "value": "4" },
{ "id": "", "label": "", "value": "" },
]
@ -4881,7 +4905,7 @@ const Partner_Commande = (props) => {
</div>}
<div>
<div>
<div>
<div className="div_row" style={{ "border": "None" }}>
@ -5251,6 +5275,47 @@ const Partner_Commande = (props) => {
type="number"
/>
</div>
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog" > Type apprenant
<Autocomplete
disablePortal
name="detail_type_apprenant"
id="detail_type_apprenant"
// className="disabled_style"
options={New_type_apprenant}
value={New_type_apprenant.filter((val) => val.value === String(p_add_line_item_type_apprenant))[0].label}
onChange={(event, value) => {
if (value && value.id) {
setp_add_line_item_type_apprenant(value.id);
} else {
setp_add_line_item_type_apprenant("");
}
}}
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
/>
}
/>
</div>}
{String(p_detail_header_statut_label).toLowerCase() === "facturé" && <div className="session_caract_Dialog" > Type apprenant
<TextField
margin="dense"
id="detail_type_apprenant"
name="detail_type_apprenant"
//label="Prix Unitaire"
fullWidth
//variant="standard"
value={New_type_apprenant.filter((val) => val.value === String(p_add_line_item_type_apprenant))[0].label}
disabled
type="text"
/>
</div>}
</div>}
@ -5415,6 +5480,8 @@ const Partner_Commande = (props) => {
type="number"
/>
</div>
</div>}
@ -5516,6 +5583,8 @@ const Partner_Commande = (props) => {
</div>
{String(p_detail_header_statut_label).toLowerCase() !== "facturé" && <div className="session_caract_Dialog_comment_2_lines" > Commentaire
<TextField
sx={{ '& legend': { display: 'none' }, '& fieldset': { top: 0 }, }}

View File

@ -528,6 +528,9 @@ const Partner_Facture = (props) => {
const [selected_invoice_line_id, setselected_invoice_line_id] = useState();
const [p_add_line_item, setp_add_line_item] = useState();
const [p_add_line_item_type_article, setp_add_line_item_type_article] = useState("");
const [p_add_line_item_internal_url, setp_add_line_item_internal_url] = useState();
const [p_add_line_item_title, setp_add_line_item_title] = useState();
const [p_add_line_item_qty, setp_add_line_item_qty] = useState();
@ -545,6 +548,7 @@ const Partner_Facture = (props) => {
const [p_add_line_item_total_amount_ttc, setp_add_line_item_total_amount_ttc] = useState();
const [p_add_line_item_duration_concat, setp_add_line_item_duration_concat] = useState();
const [p_add_line_item_type_apprenant, setp_add_line_item_type_apprenant] = useState("");
@ -742,6 +746,12 @@ const Partner_Facture = (props) => {
setp_add_line_item(mylocal_order.title);
}
if (mylocal_order.order_line_type_article) {
setp_add_line_item_type_article(mylocal_order.order_line_type_article);
} else {
setp_add_line_item_type_article("");
}
if (mylocal_order.order_line_qty) {
setp_add_line_item_qty(mylocal_order.order_line_qty);
@ -787,6 +797,12 @@ const Partner_Facture = (props) => {
setp_add_line_item_taxe_amount("");
}
if (mylocal_order.order_line_type_apprenant) {
setp_add_line_item_type_apprenant(mylocal_order.order_line_type_apprenant);
} else {
setp_add_line_item_type_apprenant("");
}
if (mylocal_order.order_line_type_reduction) {
setp_add_line_item_type_reduction(mylocal_order.order_line_type_reduction);
@ -1007,7 +1023,7 @@ const Partner_Facture = (props) => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Parter_Invoice_No_Filter res.data.status = " + res.data.status);
//console.log(" In Getall_Parter_Invoice_No_Filter res.data.message r_class = " + res.data.message);
console.log(" In Getall_Parter_Invoice_No_Filter res.data.total_data r_class = ", res.data.total_data);
console.log(" In Getall_Parter_Invoice_No_Filter res.data.total_data r_class = ", res.data.total_data);
setGetall_Parter_Invoice_No_Filter_api("true");
setGetall_Parter_Invoice_No_Filter_result(res.data.message);
setRows(res.data.message);
@ -1047,7 +1063,7 @@ const Partner_Facture = (props) => {
if (String(res.data.status) === String("true")) {
//console.log(" In Getall_Parter_Invoice_With_Filter_On_Client_Id res.data.status = " + res.data.status);
// console.log(" In Getall_Parter_Invoice_With_Filter_On_Client_Id res.data.message r_class = " + res.data.message);
// console.log(" In Getall_Parter_Invoice_With_Filter_On_Client_Id res.data.message r_class = " + res.data.message);
setGetall_Parter_Invoice_With_Filter_On_Client_Id_api("true");
setGetall_Parter_Invoice_With_Filter_On_Client_Id_result(res.data.message);
setRows(res.data.message);
@ -2496,6 +2512,15 @@ const Partner_Facture = (props) => {
console.log(" III ");
}
const New_type_apprenant = [
{ "id": "0", "label": "Autre", "value": "0" },
{ "id": "1", "label": "Salariés", "value": "1" },
{ "id": "2", "label": "Apprentis", "value": "2" },
{ "id": "3", "label": "Particuliers", "value": "3" },
{ "id": "4", "label": "Rech. Emploi", "value": "4" },
{ "id": "", "label": "", "value": "" },
]
return (
<div className="partner_facture">
@ -2585,6 +2610,22 @@ const Partner_Facture = (props) => {
/>
</div>
{p_add_line_item_type_article && String(p_add_line_item_type_article) === "formation" &&
<div className="session_caract_Dialog" > Type apprenant
<TextField
margin="dense"
id="ref_type_apprenant"
name="ref_type_apprenant"
//label="Prix Unitaire"
fullWidth
//variant="standard"
value={New_type_apprenant.filter((val) => val.value === String(p_add_line_item_type_apprenant))[0].label}
disabled
type="text"
/>
</div>}
<div className="session_caract_Dialog" > Type reduction
<TextField
@ -3206,8 +3247,8 @@ const Partner_Facture = (props) => {
<div className="div_row" style={{ "border": "None", paddingRight: '10px' }}>
<div className="session_data">
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight":"600", "fontSize":"15px", "paddingTop":"2px" }}> {parseFloat(String(val.somme_header_ca_ht)).toLocaleString()} () / {val.nb_header_invoice} Factures </nav> ))}
{rowss_total_data && rowss_total_data.length > 0 && rowss_total_data.map((val) => (<nav style={{ "textAlign": 'right', 'marginRight': '15px', "fontWeight": "600", "fontSize": "15px", "paddingTop": "2px" }}> {parseFloat(String(val.somme_header_ca_ht)).toLocaleString()} () / {val.nb_header_invoice} Factures </nav>))}
<div style={{ "border": "None" }}>
<div style={{ height: 550, width: '100%', paddingRight: '5px' }}>

View File

@ -11584,7 +11584,7 @@
font-size: 18px;
font-weight: 400;
width: 100%;
line-height: 15px;
line-height: 1px;
margin-top: 20px;
}
@ -14744,6 +14744,11 @@
}
// end media
.css-1v4ccyo{
height: 3rem !important;
}
.message_hili {
color: #619e31;
font-weight: bold;