From d2f2a5c8a942ec259f2f38cf8eb8637166aeedce Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 27 Feb 2026 15:07:56 +0100 Subject: [PATCH 1/2] add: elixFormsAPI check richiedente DSAN --- .../Nuovo check richiedente DSAN.yml | 88 +++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml new file mode 100644 index 0000000..260220e --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Nuovo check richiedente DSAN.yml @@ -0,0 +1,88 @@ +info: + name: Nuovo check richiedente DSAN + type: http + seq: 19 + +http: + method: POST + url: "{{elixFormsApiUrl}}/eftl/process/v1" + headers: + - name: x-requested-with + value: XMLHttpRequest + - name: x-api-key + value: "{{elixFormsWsAuthenticationToken}}" + - name: x-ef-request-id + value: "24281" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n", + "codiciFiscaliAmmessi": ";MMMPPL74T17E463A;" + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + // Copy-pasta your EFTL document below inside the template literals (`) + var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + [VAR name="checkUtentePartecipante" type="string"][% utentePartecipante = "Il richiedente non è ammesso alla compilazione perché non partecipa alle ripartizioni"; %][/VAR] + [VAR name="richiedenteCF" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="richiedentePropostaCF" type="string"][TAG]GETVALUEBYTAG,PROPOSTA_RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="coppieRipartizioniProposta" type="string"][TAG]GETVALUEBYTAG,COPPIE_RIPARTIZIONI,REQUEST,IUQOID,CONCAT,#[/TAG][/VAR] + [VAR name="exitIf" type="boolean"][% exitIf = false; %][/VAR] + + [!-- Il richiedente non deve essere il RS che ha presentato la Proposta --] + [!-- Il richiedente deve comparire fra le ripartizioni --] + [!-- Il richiedente deve comparire fra i nominativi ammessi (DEBUG) --] + [IF] + [CONDITION][IS_EMPTY varname="richiedenteCF" /][/CONDITION] + [THEN][% checkUtentePartecipante = "Nessun richiedente trovato"; exitIf = true; %][/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][% richiedenteCF == richiedentePropostaCF %][/CONDITION] + [THEN][% checkUtentePartecipante = "Il Responsabile Scientifico proponente della Proposta non deve compilare la DSAN"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][CONTAINS varname="coppieRipartizioniProposta"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION] + [THEN][% checkUtentePartecipante = "trovato in coppie"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [IF] + [CONDITION][% exitIf == false %][/CONDITION] + [THEN] + [IF] + [CONDITION][CONTAINS varname="codiciFiscaliAmmessi"][VALUE_OF varname="richiedenteCF" /][/CONTAINS][/CONDITION] + [THEN][% checkUtentePartecipante = "trovato in CF ammessi"; exitIf = true; %][/THEN] + [/IF] + [/THEN] + [/IF] + + [%= checkUtentePartecipante %] + [/EFTL] + `)); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 From 19ae67de4436c3e4785a36b3d38f3351e7e16f60 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 27 Feb 2026 15:09:04 +0100 Subject: [PATCH 2/2] fix: elixFormsAPI - calcolo ore equivalenti --- .../Calcolo ore equivalenti.yml | 26 +++++++++++++------ 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml index 4830c07..a93497c 100644 --- a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml @@ -40,17 +40,27 @@ runtime: var eftlDocumentToBeProcessed = bru.setVar("elixBase64EftlDocument", btoa(String.raw` [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] - [VAR name="importo" type="number"][TAG]GETVALUEBYTAG,IMPORTO_RIPARTIZIONE_ASSEGNATA,REQUEST,IUQOID[/TAG][/VAR] - [VAR name="fattore" type="number"][TAG]GETVALUEBYTAG,FATTORE_CONVERSIONE_ORE,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="codiceFiscaleRichiedente" type="string"][TAG]GETVALUEBYTAG,RICHIEDENTE_CODFIS,REQUEST,IUQOID[/TAG][/VAR] + [VAR name="ripartizioniIterable" type="iterable"][SPLIT regex="#"][TAG]GETVALUEBYTAG,COPPIE_RIPARTIZIONI,REQUEST,IUQOID,CONCAT,#[/TAG][/SPLIT][/VAR] - [VAR name="importo2" type="number"][TAG]SCHEMAID,709,COL0118,IUQOID, , [/TAG][/VAR] - [VAR name="fattore2" type="number"][TAG]SCHEMAID,709,COL0120,IUQOID, , [/TAG][/VAR] + [VAR name="firstItem" type="number"][% firstItem = 0; %][/VAR] + [VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR] + [VAR name="importoRichiedente" type="number"][% importoRichiedente = 0; %][/VAR] - [VAR name="oreEquivalenti" type="number"][% oreEquivalenti = importo2 * fattore2; %][/VAR] + [FOR varname="coppia" iterable="ripartizioniIterable"] + [VAR name="coppiaiIterable" type="iterable"][SPLIT regex=":"][VALUE_OF varname="coppia" /][/SPLIT][/VAR] + [VAR name="codiceFiscale" type="string"][VALUE_OF varname="coppiaiIterable" index="firstItem" /][/VAR] + [VAR name="importo" type="number"][VALUE_OF varname="coppiaiIterable" index="secondItem" /][/VAR] - [%= importo * fattore %] - [%= crlf %] - [%= oreEquivalenti %] + [IF] + [CONDITION][% codiceFiscale == codiceFiscaleRichiedente %][/CONDITION] + [THEN][% importoRichiedente = importo; %][/THEN] + [/IF] + [/FOR] + + [VAR name="fattore" type="number"][TAG]SCHEMAID,709,COL0120,IUQOID, , ,,0.00000[/TAG][/VAR] + + [%= importoRichiedente * fattore %] [/EFTL] `));