13/05/2024 - 18h30
parent
dbb12bfa47
commit
917a93e350
|
@ -826,6 +826,11 @@ const AddParnerClient = (props) => {
|
||||||
else
|
else
|
||||||
setclient_invoice_pays("");
|
setclient_invoice_pays("");
|
||||||
|
|
||||||
|
if (mylocalclient.invoice_automatique)
|
||||||
|
setp_detail_facturation_automatique(mylocalclient.invoice_automatique);
|
||||||
|
else
|
||||||
|
setp_detail_facturation_automatique("");
|
||||||
|
|
||||||
setdatamodification("0");
|
setdatamodification("0");
|
||||||
setdatamodification_invoice("0");
|
setdatamodification_invoice("0");
|
||||||
|
|
||||||
|
@ -932,6 +937,11 @@ const AddParnerClient = (props) => {
|
||||||
else
|
else
|
||||||
setclient_invoice_pays("");
|
setclient_invoice_pays("");
|
||||||
|
|
||||||
|
if (mylocalclient.invoice_automatique)
|
||||||
|
setp_detail_facturation_automatique(mylocalclient.invoice_automatique);
|
||||||
|
else
|
||||||
|
setp_detail_facturation_automatique("");
|
||||||
|
|
||||||
Disable_invoice_fields();
|
Disable_invoice_fields();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1220,6 +1230,11 @@ const AddParnerClient = (props) => {
|
||||||
document.getElementsByName("client_telephone")[0].style.backgroundColor = "#ECEFF1";
|
document.getElementsByName("client_telephone")[0].style.backgroundColor = "#ECEFF1";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.getElementsByName("facturation_automatique")) {
|
||||||
|
document.getElementsByName("facturation_automatique")[0].disabled = true;
|
||||||
|
document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#ECEFF1";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1289,6 +1304,11 @@ const AddParnerClient = (props) => {
|
||||||
document.getElementsByName("client_telephone")[0].style.backgroundColor = "#FFFFFF";
|
document.getElementsByName("client_telephone")[0].style.backgroundColor = "#FFFFFF";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.getElementsByName("facturation_automatique")) {
|
||||||
|
document.getElementsByName("facturation_automatique")[0].disabled = false;
|
||||||
|
document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#FFFFFF";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1558,6 +1578,8 @@ const AddParnerClient = (props) => {
|
||||||
else
|
else
|
||||||
form.append("is_client", "0");
|
form.append("is_client", "0");
|
||||||
|
|
||||||
|
form.append("invoice_automatique", p_detail_facturation_automatique);
|
||||||
|
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Client/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Add_Partner_Client/";
|
||||||
|
|
||||||
|
@ -1836,6 +1858,10 @@ const AddParnerClient = (props) => {
|
||||||
}
|
}
|
||||||
form.append("invoice_pays", client_invoice_pays);
|
form.append("invoice_pays", client_invoice_pays);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
form.append("invoice_automatique", p_detail_facturation_automatique);
|
||||||
|
|
||||||
form.append("_id", props.client_id);
|
form.append("_id", props.client_id);
|
||||||
|
|
||||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/";
|
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Update_Partner_Client/";
|
||||||
|
@ -1966,6 +1992,13 @@ const AddParnerClient = (props) => {
|
||||||
console.log("iiiiii");
|
console.log("iiiiii");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.getElementsByName("facturation_automatique")) {
|
||||||
|
document.getElementsByName("facturation_automatique")[0].disabled = true;
|
||||||
|
document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#ECEFF1";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Enable_invoice_fields() {
|
function Enable_invoice_fields() {
|
||||||
|
@ -2013,6 +2046,11 @@ const AddParnerClient = (props) => {
|
||||||
document.getElementsByName("client_invoice_pays")[0].disabled = false;
|
document.getElementsByName("client_invoice_pays")[0].disabled = false;
|
||||||
document.getElementsByName("client_invoice_pays")[0].style.backgroundColor = "#FFFFFF";
|
document.getElementsByName("client_invoice_pays")[0].style.backgroundColor = "#FFFFFF";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (document.getElementsByName("facturation_automatique")) {
|
||||||
|
document.getElementsByName("facturation_automatique")[0].disabled = false;
|
||||||
|
document.getElementsByName("facturation_automatique")[0].style.backgroundColor = "#FFFFFF";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function close_detail_client() {
|
function close_detail_client() {
|
||||||
|
@ -2494,10 +2532,18 @@ const AddParnerClient = (props) => {
|
||||||
{ "id": "m", "label": "M", "value": "m" },
|
{ "id": "m", "label": "M", "value": "m" },
|
||||||
{ "id": "neutre", "label": "Neutre", "value": "neutre" },
|
{ "id": "neutre", "label": "Neutre", "value": "neutre" },
|
||||||
|
|
||||||
|
{ "id": "", "label": "", "value": "" },
|
||||||
|
]
|
||||||
|
|
||||||
|
const New_Option_Facturation_Automatique = [
|
||||||
|
{ "id": "mois", "label": "Mensuelle", "value": "mois" },
|
||||||
|
{ "id": "0", "label": "Facturation Manuelle", "value": "0" },
|
||||||
|
|
||||||
{ "id": "", "label": "", "value": "" },
|
{ "id": "", "label": "", "value": "" },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const [p_detail_facturation_automatique, setp_detail_facturation_automatique] = useState("");
|
||||||
|
|
||||||
const [p_client_is_financeur, setp_client_is_financeur] = useState(false);
|
const [p_client_is_financeur, setp_client_is_financeur] = useState(false);
|
||||||
const [p_client_is_fournisseur, setp_client_is_fournisseur] = useState(false);
|
const [p_client_is_fournisseur, setp_client_is_fournisseur] = useState(false);
|
||||||
const [p_client_is_client, setp_client_is_client] = useState(true);
|
const [p_client_is_client, setp_client_is_client] = useState(true);
|
||||||
|
@ -3628,7 +3674,7 @@ const AddParnerClient = (props) => {
|
||||||
|
|
||||||
{String(submenu).trim() === "submenu_donnees_facturation" && <div className="training_data" onChange={DataUpdated_Invoice_Data}>
|
{String(submenu).trim() === "submenu_donnees_facturation" && <div className="training_data" onChange={DataUpdated_Invoice_Data}>
|
||||||
|
|
||||||
<div className="session_caract"> Email de Facturation<br />
|
<div className="session_caract"><b> Email de Facturation </b> <br />
|
||||||
<TextField
|
<TextField
|
||||||
required
|
required
|
||||||
name="client_invoice_email"
|
name="client_invoice_email"
|
||||||
|
@ -3785,10 +3831,56 @@ const AddParnerClient = (props) => {
|
||||||
disabled={false}
|
disabled={false}
|
||||||
className="disabled_style"
|
className="disabled_style"
|
||||||
value={p_client_invoice_pays}
|
value={p_client_invoice_pays}
|
||||||
onChange={(e) => setclient_invoice_pays(e.target.value)}
|
|
||||||
|
onChange={(e) => {
|
||||||
|
setclient_invoice_pays(e.target.value);
|
||||||
|
DataUpdated_Invoice_Data();
|
||||||
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
<hr className="hr_break" />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="session_caract"> Facturation automatique<br />
|
||||||
|
|
||||||
|
{New_Option_Facturation_Automatique && String(formedit_mode_invoice) !== "1" && <TextField
|
||||||
|
required
|
||||||
|
name="facturation_automatique"
|
||||||
|
//label="Adresse"
|
||||||
|
InputLabelProps={{
|
||||||
|
shrink: true,
|
||||||
|
}}
|
||||||
|
disabled={false}
|
||||||
|
className="disabled_style"
|
||||||
|
value={New_Option_Facturation_Automatique.filter((data) => (data).value === String(p_detail_facturation_automatique))[0].label}
|
||||||
|
|
||||||
|
/>}
|
||||||
|
|
||||||
|
{String(formedit_mode_invoice) === "1" && New_Option_Facturation_Automatique && <Autocomplete
|
||||||
|
disablePortal
|
||||||
|
name="facturation_automatique"
|
||||||
|
id="facturation_automatique"
|
||||||
|
className="disabled_style enable_style"
|
||||||
|
value={New_Option_Facturation_Automatique.filter((data) => (data).value === String(p_detail_facturation_automatique))[0].label}
|
||||||
|
options={New_Option_Facturation_Automatique}
|
||||||
|
onChange={(event, value) => {
|
||||||
|
if (value && value.value) {
|
||||||
|
setp_detail_facturation_automatique(value.value);
|
||||||
|
DataUpdated_Invoice_Data();
|
||||||
|
} else {
|
||||||
|
setp_detail_facturation_automatique("");
|
||||||
|
DataUpdated_Invoice_Data();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
renderInput={(params) => <TextField {...params} label="" placeholder="Choisir une option"
|
||||||
|
inputProps={{ ...params.inputProps, style: { fontSize: 12, height: "1.4rem" } }}
|
||||||
|
|
||||||
|
/>
|
||||||
|
}
|
||||||
|
/>}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="div_row" style={{ "border": "None" }}>
|
<div className="div_row" style={{ "border": "None" }}>
|
||||||
|
|
||||||
|
@ -4356,7 +4448,7 @@ const AddParnerClient = (props) => {
|
||||||
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
{Get_List_Of_All_PJ_result && Get_List_Of_All_PJ_result.map((val) => (
|
||||||
<div className="div_row_list_pj" >
|
<div className="div_row_list_pj" >
|
||||||
<nav name={(JSON.parse(val).file_name)}
|
<nav name={(JSON.parse(val).file_name)}
|
||||||
id={(JSON.parse(val).file_name)}> <i> <AttachFileIcon />{(JSON.parse(val).file_business_object)} </i> <br/><font style={{ "color": "green", "cursor": "pointer" }}
|
id={(JSON.parse(val).file_name)}> <i> <AttachFileIcon />{(JSON.parse(val).file_business_object)} </i> <br /><font style={{ "color": "green", "cursor": "pointer" }}
|
||||||
name={(JSON.parse(val).file_name)}
|
name={(JSON.parse(val).file_name)}
|
||||||
id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger </font></nav>
|
id={(JSON.parse(val).file_name)} onClick={Download_one_attached_document}> Télécharger </font></nav>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue