From 19ae67de4436c3e4785a36b3d38f3351e7e16f60 Mon Sep 17 00:00:00 2001 From: Pier-Paolo Mammi Date: Fri, 27 Feb 2026 15:09:04 +0100 Subject: [PATCH] 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] `));