recette2
parent
a691d4e43a
commit
ec2f02a159
|
@ -700,13 +700,14 @@ const DisplayPartnerSession = (props) => {
|
|||
const columns_inscrit = [
|
||||
{ field: 'id', headerName: 'id', hide: true },
|
||||
{ field: '_id', headerName: '_id', hide: true },
|
||||
{ field: 'has_invoice_split', headerName: 'has_invoice_split', hide: true },
|
||||
{ field: 'civilite', headerName: 'Civ.', minWidth: 70, flex: 1, maxWidth: 100, hide: false, editable: false, editable: false },
|
||||
{
|
||||
field: 'nom', headerName: 'nom', minWidth: 150, flex: 1, hide: false, editable: false,
|
||||
renderCell: (params) => <ExpandableCell_50 {...params} />,
|
||||
},
|
||||
{ field: 'prenom', headerName: 'prenom', minWidth: 150, flex: 1, hide: false, editable: false, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'email', headerName: 'email', minWidth: 150, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'client_rattachement_nom', headerName: 'Client', minWidth: 150, flex: 1, maxWidth: 200, hide: false, editable: true, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'client_rattachement_id', headerName: 'Client_id', Width: 0, hide: true, editable: false, },
|
||||
|
||||
|
@ -740,8 +741,8 @@ const DisplayPartnerSession = (props) => {
|
|||
return "Non";
|
||||
},
|
||||
},
|
||||
{ field: 'invoiced_ref', headerName: 'Num Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'invoiced_date', headerName: 'Date Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: true, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'invoiced_ref', headerName: 'Num Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: false, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
{ field: 'invoiced_date', headerName: 'Date Fact.', minWidth: 100, flex: 1, maxWidth: 150, flex: 1, editable: false, hide: true, flex: 1, renderCell: (params) => <ExpandableCell_50 {...params} />, },
|
||||
|
||||
{
|
||||
field: "split_invoice", headerName: 'Eclat. Fact',
|
||||
|
@ -756,6 +757,8 @@ const DisplayPartnerSession = (props) => {
|
|||
setp_detail_invoice_split_facture_client_rattachement_id(cellValues.row.client_facture);
|
||||
setp_detail_invoice_split_inscrit_nom(cellValues.row.nom);
|
||||
setp_detail_invoice_split_inscrit_prenom(cellValues.row.prenom);
|
||||
setp_detail_invoice_split_facture_done(cellValues.row.has_invoice_split);
|
||||
|
||||
setp_detail_invoice_split_changed("");
|
||||
|
||||
Get_Inscription_Split_Invoice(cellValues.row._id);
|
||||
|
@ -763,7 +766,8 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
}}
|
||||
>
|
||||
<AccountTreeIcon />
|
||||
{cellValues.row.has_invoice_split && String(cellValues.row.has_invoice_split) !== "1" && <AccountTreeIcon style={{ color: "blue" }} />}
|
||||
{cellValues.row.has_invoice_split && String(cellValues.row.has_invoice_split) === "1" && <AccountTreeIcon style={{ color: "green" }} />}
|
||||
|
||||
</Button>
|
||||
|
||||
|
@ -10974,6 +10978,11 @@ const DisplayPartnerSession = (props) => {
|
|||
const [p_detail_invoice_split_facture_client_rattachement_id, setp_detail_invoice_split_facture_client_rattachement_id] = useState("");
|
||||
const [p_detail_invoice_split_facture_client_rattachement_value, setp_detail_invoice_split_facture_client_rattachement_value] = useState("");
|
||||
|
||||
|
||||
const [p_detail_invoice_split_facture_done, setp_detail_invoice_split_facture_done] = useState("");
|
||||
|
||||
|
||||
|
||||
const New_Option_Type_split_invoice = [
|
||||
|
||||
{ "id": "percent", "label": "Pourcentage", "value": "percent" },
|
||||
|
@ -11017,14 +11026,15 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
|
||||
onChange={(event, value) => {
|
||||
if (String(p_detail_invoice_split_facture_done) !== "1") {
|
||||
setp_detail_invoice_split_changed("1");
|
||||
if (value && value.id) {
|
||||
|
||||
setp_detail_invoice_split_changed("1");
|
||||
if (value && value.id) {
|
||||
setp_detail_invoice_split_type(value.id);
|
||||
|
||||
setp_detail_invoice_split_type(value.id);
|
||||
|
||||
} else {
|
||||
setp_detail_invoice_split_type("");
|
||||
} else {
|
||||
setp_detail_invoice_split_type("");
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
|
@ -11053,8 +11063,10 @@ const DisplayPartnerSession = (props) => {
|
|||
step="any"
|
||||
value={p_detail_invoice_split_client_rattachement_value}
|
||||
onChange={(e) => {
|
||||
setp_detail_invoice_split_client_rattachement_value(e.target.value);
|
||||
setp_detail_invoice_split_changed("1");
|
||||
if (String(p_detail_invoice_split_facture_done) !== "1") {
|
||||
setp_detail_invoice_split_client_rattachement_value(e.target.value);
|
||||
setp_detail_invoice_split_changed("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -11075,8 +11087,10 @@ const DisplayPartnerSession = (props) => {
|
|||
step="any"
|
||||
value={p_detail_invoice_split_facture_client_rattachement_value}
|
||||
onChange={(e) => {
|
||||
setp_detail_invoice_split_facture_client_rattachement_value(e.target.value);
|
||||
setp_detail_invoice_split_changed("1");
|
||||
if (String(p_detail_invoice_split_facture_done) !== "1") {
|
||||
setp_detail_invoice_split_facture_client_rattachement_value(e.target.value);
|
||||
setp_detail_invoice_split_changed("1");
|
||||
}
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
@ -11095,7 +11109,8 @@ const DisplayPartnerSession = (props) => {
|
|||
</DialogContent>
|
||||
|
||||
{p_detail_invoice_split_type && (String(p_detail_invoice_split_type) === "percent"
|
||||
|| String(p_detail_invoice_split_type) === "fixe") && <div>
|
||||
|| String(p_detail_invoice_split_type) === "fixe") && String(p_detail_invoice_split_facture_done) !== "1" &&
|
||||
<div>
|
||||
<DialogActions>
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
@ -11222,6 +11237,25 @@ const DisplayPartnerSession = (props) => {
|
|||
|
||||
</DialogActions>
|
||||
|
||||
</div>}
|
||||
{String(p_detail_invoice_split_facture_done) === "1" &&
|
||||
<div>
|
||||
<DialogActions>
|
||||
<div className="div_row">
|
||||
<div className="div_row_gauche">
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div className="div_row_droite" style={{ "textAlign": 'center' }}>
|
||||
<Button onClick={Dialog_SPLIT_INVOICE_handleClose_buton} className="bton_annule_dialog" >Fermer</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</DialogActions>
|
||||
|
||||
|
||||
</div>}
|
||||
</Dialog>
|
||||
|
||||
|
@ -17475,6 +17509,8 @@ const DisplayPartnerSession = (props) => {
|
|||
invoiced_ref: JSON.parse(item).invoiced_ref,
|
||||
invoiced_date: JSON.parse(item).invoiced_date,
|
||||
|
||||
has_invoice_split: JSON.parse(item).has_invoice_split,
|
||||
|
||||
client_facture: JSON.parse(item).facture_client_rattachement_id,
|
||||
|
||||
|
||||
|
|
|
@ -148,13 +148,14 @@ const Module_Editique = (props) => {
|
|||
const stored_cookie = getCookie('tokenmysypart');
|
||||
form.append("token", stored_cookie);
|
||||
form.append("session_id", selected_session_id);
|
||||
form.append("courrier_template_id", "64fde469da3a50338b92fb83");
|
||||
|
||||
form.append("email_test", "");
|
||||
form.append("email_production", "");
|
||||
form.append("tab_inscription_ids", "all");
|
||||
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Facture_From_Session_By_Email/";
|
||||
|
||||
//var myurl = process.env.REACT_APP_API_URL + "myclass/api/Prepare_and_Send_Facture_From_Session_By_Email/";
|
||||
|
||||
var myurl = process.env.REACT_APP_API_URL + "myclass/api/Invoice_Inscrption_With_Split_Session_By_Inscription_Id/";
|
||||
|
||||
|
||||
setLoading(true);
|
||||
axios.post(myurl, form).then(res => {
|
||||
|
|
Loading…
Reference in New Issue