63 lines
1.8 KiB
YAML
63 lines
1.8 KiB
YAML
info:
|
|
name: Calcolo D.1.3 5% con virgole
|
|
type: http
|
|
seq: 3
|
|
|
|
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: "22748"
|
|
body:
|
|
type: json
|
|
data: |-
|
|
{
|
|
"userDocument": "{{elixBase64EftlDocument}}", // see the pre-request script
|
|
"userContext": {
|
|
"lang": "IT",
|
|
"crlf": "\r\n",
|
|
"qualificheDocenti": ";Docente;Ricercatore;"
|
|
}
|
|
}
|
|
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="D1_1" type="number"][TAG]GETVALUEBYTAG,PROPOSTA_CCT_CONTRATTO_D_1_1,REQUEST,IUQOID[/TAG][/VAR]
|
|
[VAR name="D1_2" type="number"][TAG]GETVALUEBYTAG,PROPOSTA_CCT_CONTRATTO_D_1_2,REQUEST,IUQOID[/TAG][/VAR]
|
|
[VAR name="A" type="number"][TAG]SCHEMAID,338,COL0001,IUQOID, , [/TAG][/VAR]
|
|
[VAR name="D1_3" type="number"][% D1_3 = D1_1 + D1_2 - (A * 0.20); %][/VAR]
|
|
[VAR name="QuotaAteneo" type="number"][% QuotaAteneo = 0; %][/VAR]
|
|
|
|
[IF]
|
|
[CONDITION][% D1_3 > 0 %][/CONDITION]
|
|
[THEN][% QuotaAteneo = D1_3 * 0.05; %][/THEN]
|
|
[/IF]
|
|
|
|
[FORMAT type="number" pattern="#,##0.00"][% QuotaAteneo %][/FORMAT]
|
|
[/EFTL]
|
|
`);
|
|
|
|
settings:
|
|
encodeUrl: true
|
|
timeout: 0
|
|
followRedirects: true
|
|
maxRedirects: 5
|