Files
api-collections/collections/elixForms API v2/EFTL processing/CCT - Liquidazione Compensi/CSV attività per export.yml
T
administrator 93b72924dc aggiunti altri eftl per liquidazione
- calcolo corretto per limite annuale ore
- creazione struttura dati per esportazione dati DSAN
- creazione stringa con indicazione del limite ore annuali
2026-05-28 16:36:05 +02:00

54 lines
1.7 KiB
YAML

info:
name: CSV attività per export
type: http
seq: 31
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: "31470"
body:
type: json
data: |-
{
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
"userContext": {
"lang": "IT",
"crlf": "\r\n",
"useTestCF": false
}
}
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="importoAssegnato" type="number"][TAG]SCHEMAID,709,COL0118,IUQOID, ,,,0.00[/TAG][/VAR]
[VAR name="oreTotali" type="number"][TAG]SCHEMAID,709,COL0119,IUQOID, ,,,0[/TAG][/VAR]
[VAR name="anno" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_ANNO,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR]
[VAR name="ore" type="string"][TAG]GETVALUEBYTAG,ATTIVITA_ORE;ORE_DENTRO_ORARIO,REQUEST,IUQOID,UPDATED_LAST[/TAG][/VAR]
[VAR name="importoProporzionato" type="number"][% importoProporzionato = (importoAssegnato * ore) / oreTotali; %][/VAR]
[%= anno %];[%= ore %];[FORMAT type="number" pattern="0.00"][% importoProporzionato %][/FORMAT]
[/EFTL]
`);
settings:
encodeUrl: true
timeout: 0
followRedirects: true
maxRedirects: 5