From e8fdd3c85042e680d9ccbdce8ccd52740ad4db91 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 6 Mar 2026 12:22:01 +0100 Subject: [PATCH 1/3] upd: elixFormsAPI - ore equivalenti come intero --- .../CCT - Liquidazione Compensi/Calcolo ore equivalenti.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 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 9539018..5afc12b 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 @@ -18,7 +18,7 @@ http: value: "22224" disabled: true - name: x-ef-request-id - value: "23719" + value: "24829" body: type: json data: |- @@ -61,7 +61,7 @@ runtime: [VAR name="fattore" type="number"][TAG]SCHEMAID,709,COL0120,IUQOID, , ,,0.00000[/TAG][/VAR] - [%= importoRichiedente * fattore %] + [FORMAT type="number" pattern="integer"][% importoRichiedente * fattore %][/FORMAT] [/EFTL] `); From 75445fbfb5bfaa3841628c0de70b532b8df59879 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 6 Mar 2026 12:22:26 +0100 Subject: [PATCH 2/3] new: elixFormsAPI - calcolo ore qeuivalenti corretto --- .../Calcolo ore IN o OUT servizio.yml | 58 +++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml new file mode 100644 index 0000000..0191929 --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml @@ -0,0 +1,58 @@ +info: + name: Calcolo ore IN o OUT servizio + type: http + seq: 25 + +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: "24829" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n" + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + const { prepareEftlDocument } = require("./elixFormsJs.js") + // Copy-pasta your EFTL document below inside the template literals (`) + prepareEftlDocument(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + [VAR name="tipoAttivita" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_TIPO,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + [VAR name="oreAttivita" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_ORE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + + [VAR name="oreOrarioIn" type="string"][% oreOrarioIn = "0"; %][/VAR] + [VAR name="oreOrarioOut" type="string"][% oreOrarioOut = "0"; %][/VAR] + + [IF] + [CONDITION][% tipoAttivita == "in orario di lavoro" %][/CONDITION] + [THEN][% oreOrarioIn = oreAttivita; %][/THEN] + [ELSE][% oreOrarioOut = oreAttivita; %][/ELSE] + [/IF] + + [%= oreOrarioIn %] + [%= crlf %] + [%= oreOrarioOut %] + [/EFTL] + `); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 From 3eeb52fee75e91e783d58fb5edaad35a49b5819a Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 6 Mar 2026 12:22:26 +0100 Subject: [PATCH 3/3] add: elixFormsAPI - calcolo ore equivalenti intere --- .../Calcolo dinamico ore equivalenti.yml | 111 ++++++++++++++++++ .../Calcolo ore IN o OUT servizio.yml | 58 +++++++++ 2 files changed, 169 insertions(+) create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo dinamico ore equivalenti.yml create mode 100644 collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo dinamico ore equivalenti.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo dinamico ore equivalenti.yml new file mode 100644 index 0000000..9b4879f --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo dinamico ore equivalenti.yml @@ -0,0 +1,111 @@ +info: + name: Calcolo dinamico ore equivalenti + type: http + seq: 26 + +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: "22737" + disabled: true + - name: x-ef-request-id + value: "22224" + disabled: true + - name: x-ef-request-id + value: "24829" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n", + "fattoreDivisioneImporto": 1500, + "IS_OP": "OP0", + "IS_CO": "CO0", + "IS_FU": "FU0", + "IS_EP": "EP0", + "OP": 0.0431, + "CO": 0.0405, + "FU": 0.0350, + "EP": 0.0307 + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + const { prepareEftlDocument } = require("./elixFormsJs.js") + // Copy-pasta your EFTL document below inside the template literals (`) + prepareEftlDocument(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + + [VAR name="codiceRuoloRichiedente" type="string"][TAG]GETVALUEBYTAG,RUOLO_DIPENDENTE,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="firstItem" type="number"][% firstItem = 0; %][/VAR] + [VAR name="secondItem" type="number"][% secondItem = 1; %][/VAR] + [VAR name="importoRichiedente" type="number"][% importoRichiedente = 0; %][/VAR] + [VAR name="fattoreConversione" type="number"][% fattoreConversione = OP; %][/VAR] + + [FOR varname="coppia" iterable="ripartizioniIterable"] + [VAR name="coppiaIterable" type="iterable"][SPLIT regex=":"][VALUE_OF varname="coppia" /][/SPLIT][/VAR] + [VAR name="codiceFiscale" type="string"][VALUE_OF varname="coppiaIterable" index="firstItem" /][/VAR] + [VAR name="importo" type="number"][VALUE_OF varname="coppiaIterable" index="secondItem" /][/VAR] + + [IF] + [CONDITION][% codiceFiscale == codiceFiscaleRichiedente %][/CONDITION] + [THEN][% importoRichiedente = importo; %][/THEN] + [/IF] + [/FOR] + + [!-- + codiceRuoloRichiedente: [%= codiceRuoloRichiedente %] + codiceFiscaleRichiedente: [%= codiceFiscaleRichiedente %] + importoRichiedente: [%= importoRichiedente %] + fattoreDivisioneImporto: [%= fattoreDivisioneImporto %] + --] + + [IF] + [CONDITION][CONTAINS varname="IS_OP"][% codiceRuoloRichiedente %][/CONTAINS][/CONDITION] + [THEN][% fattoreConversione = OP; %][/THEN] + [ELSE IF] + [CONDITION][CONTAINS varname="IS_CO"][% codiceRuoloRichiedente %][/CONTAINS][/CONDITION] + [THEN][% fattoreConversione = CO; %][/THEN] + [/ELSE IF] + [ELSE IF] + [CONDITION][CONTAINS varname="IS_FU"][% codiceRuoloRichiedente %][/CONTAINS][/CONDITION] + [THEN][% fattoreConversione = FU; %][/THEN] + [/ELSE IF] + [ELSE IF] + [CONDITION][CONTAINS varname="IS_EP"][% codiceRuoloRichiedente %][/CONTAINS][/CONDITION] + [THEN][% fattoreConversione = EP; %][/THEN] + [/ELSE IF] + [/IF] + + [!-- + fattoreConversione: [%= fattoreConversione %] + [%= crlf %] + --] + + [VAR name="oreEquivalenti" type="number"][% oreEquivalenti = (importoRichiedente * fattoreConversione); %][/VAR] + + [%= oreEquivalenti %] + [/EFTL] + `); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml new file mode 100644 index 0000000..0191929 --- /dev/null +++ b/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/Calcolo ore IN o OUT servizio.yml @@ -0,0 +1,58 @@ +info: + name: Calcolo ore IN o OUT servizio + type: http + seq: 25 + +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: "24829" + body: + type: json + data: |- + { + "userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script + "userContext": { + "lang": "IT", + "crlf": "\r\n" + } + } + auth: inherit + +runtime: + scripts: + - type: before-request + code: |- + const { prepareEftlDocument } = require("./elixFormsJs.js") + // Copy-pasta your EFTL document below inside the template literals (`) + prepareEftlDocument(String.raw` + [EFTL][HEADER name="trimDocument" value="true" type="boolean" /] + [VAR name="tipoAttivita" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_TIPO,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + [VAR name="oreAttivita" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_ORE,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR] + + [VAR name="oreOrarioIn" type="string"][% oreOrarioIn = "0"; %][/VAR] + [VAR name="oreOrarioOut" type="string"][% oreOrarioOut = "0"; %][/VAR] + + [IF] + [CONDITION][% tipoAttivita == "in orario di lavoro" %][/CONDITION] + [THEN][% oreOrarioIn = oreAttivita; %][/THEN] + [ELSE][% oreOrarioOut = oreAttivita; %][/ELSE] + [/IF] + + [%= oreOrarioIn %] + [%= crlf %] + [%= oreOrarioOut %] + [/EFTL] + `); + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5