Member since
07-08-2022
51
Posts
8
Kudos Received
2
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 982 | 07-30-2025 12:06 PM | |
| 2604 | 12-17-2022 10:54 PM |
11-02-2023
10:21 AM
Thanks For the reply @SAMSAL , this is working for Natura 3.5, for if natura not in 3.5. we don't need block related to (AltriDatiGestionali), but i'm getting block of "AltriDatiGestionali" : { "RiferimentoData" : "--" } since i'm using modify-overwrite-beta operation tocompute these values. Could you please help in getting rid of this AltriDatiGestionali tag fields for Natura other than 3.5 value. Regards, Pradeep G
... View more
10-31-2023
11:43 PM
Thanks A lot as Always @SAMSAL for answering all my Jolt Doubts and sharing the knowledge with detailed explanation. I've huge jolt this is one part of it, whenever i'm posting for only one specific issue always. Yeah i know this is hardest part to understand italian chars, the input is english and we are converting to italian whatever i've posted above is second jolt which i'm using. i would have given less input instead of all line items. sorry for that one doubt it is why modify-overwrite-beta logic is not working if i place this above Shift,
... View more
10-31-2023
11:59 AM
@SAMSAL @MattWho @araujo can you please help on this
... View more
10-31-2023
11:56 AM
Hi when i'm performing calculations for "Importo" attribute, it computing correctly , but since it is an array i'm getting repetitive of "Importo" : "." for each item level. Can you help in get rid of this unwanted "Importo" : "." values. INPUT: { "FatturaElettronicaBody": { "DatiGenerali": { "DatiGeneraliDocumento": { "Numero": "130889", "Data": "31.10.2023", "Causale": "22122013260655367-000180 DEL 20/12/2022", "Divisa": "EUR", "ImportoTotaleDocumento": "25369.31", "TipoDocumento": "${TipoDocumento}" }, "DatiDDT": [ { "NumeroDDT": "287421-30.10.2023" }, { "NumeroDDT": " 287419-30.10.2023" }, { "NumeroDDT": " 287423-30.10.2023" }, { "NumeroDDT": " 287422-30.10.2023" }, { "NumeroDDT": " 287420-30.10.2023" } ] }, "DatiBeniServizi": { "DettaglioLinee": { "AltriDatiGestionali": { "RiferimentoTesto": "22122013260655367-000180 DEL 20/12/2022", "RiferimentoData": "22122013260655367-000180 DEL 20/12/2022", "TipoDato": "INTENTO" }, "NumeroLinea": [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, "addnewline_1" ], "Quantita": [ "12.00000000", "2.00000000", "8.00000000", "5.00000000", "3.00000000", "12.00000000", "1.00000000", "3.00000000", "1.00000000", "6.00000000", "7.00000000", "1.00000000", "7.00000000", "6.00000000", "9.00000000", "4.00000000", "1.00" ], "PrezzoUnitario": [ "8.40000000", "209.04000000", "254.93000000", "2136.93000000", "2136.93000000", "8.40000000", "209.04000000", "254.93000000", "209.04000000", "253.45000000", "134.22000000", "134.22000000", "253.45000000", "2136.93000000", "254.93000000", "253.45000000", "169.20" ], "AliquotaIVA": [ "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00", "0.00" ], "ScontoMaggiorazione": { "Tipo": [ "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC", "SC" ], "Percentuale": [ "40.00", "42.00", "42.00", "42.00", "42.00", "40.00", "42.00", "42.00", "42.00", "15.00", "42.00", "42.00", "15.00", "42.00", "42.00", "15.00" ], "Importo": [ "40.32", "175.60", "856.56", "4487.55", "2692.53", "40.32", "87.80", "321.21", "87.80", "228.12", "394.59", "56.37", "266.14", "5385.06", "963.63", "152.08" ] }, "Descrizione": [ "A1661800209 KIT PZ. CARTUCCIA FILTRO", "A6510108918 COPERCHIO TESTATA CIL.", "A4634230112 DISCO DEL FRENO", "A2751500680 BOBINA DI ACCENSIONE", "A2751500680 BOBINA DI ACCENSIONE", "A1661800209 KIT PZ. CARTUCCIA FILTRO", "A6510108918 COPERCHIO TESTATA CIL.", "A4634230112 DISCO DEL FRENO", "A6510108918 COPERCHIO TESTATA CIL.", "A0009704902 SEGGIOLINO", "A6390100513 COPPA DELL'OLIO", "A6390100513 COPPA DELL'OLIO", "A0009704902 SEGGIOLINO", "A2751500680 BOBINA DI ACCENSIONE", "A4634230112 DISCO DEL FRENO", "A0009704902 SEGGIOLINO", "dettaglio 1" ], "PrezzoTotale": [ "60.48000000", "242.48000000", "1182.88000000", "6197.10000000", "3718.26000000", "60.48000000", "121.24000000", "443.58000000", "121.24000000", "1292.58000000", "544.95000000", "77.85000000", "1508.01000000", "7436.52000000", "1330.74000000", "861.72000000", "169.20" ], "Natura": "N3.5" }, "DatiRiepilogo": { "Natura": "N3.5", "EsigibilitaIVA": "I", "AliquotaIVA": "0.00", "ImponibileImporto": "25369.31", "Imposta": "0.00" } }, "Allegati": { "NomeAttachment": "${filename_pdf}", "Attachment": "${payload}" } } } SPEC: [ { "operation": "shift", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "NumeroLinea": { "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].NumeroLinea" } }, "Quantita": { "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Quantita" } }, "ScontoMaggiorazione": { "Tipo": { "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].ScontoMaggiorazione[&1].Tipo" } }, "Percentuale": { "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].ScontoMaggiorazione[&1].Percentuale" } }, "Importo": { "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].ScontoMaggiorazione[&1].Importo" } } } } } } } } , { "operation": "modify-overwrite-beta", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "ScontoMaggiorazione": { "*": { // "decImporto": "=divide(@(1,Importo),@(3,Quantita))", "decImporto": "=divideAndRound(2,@(1,Importo),@(3,Quantita))", "strImporto": "=toString(@(1,decImporto))", "array_importo": "=split('[.]',@(1,strImporto))", "pad_importo": "=rightPad(@(1,array_importo[1]), 8, '0')", "Importo": "=concat(@(1,array_importo[0]),'.',@(1,pad_importo))" } } } } } } } }, { "operation": "remove", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "ScontoMaggiorazione": { "*": { // "decImporto": "=divide(@(1,Importo),@(3,Quantita))", "decImporto": "", "strImporto": "", "array_importo": "", "pad_importo": "" } } } } } } } }, { "operation": "modify-overwrite-beta", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "ScontoMaggiorazione": { "*": { "Importo": { "*": { "*": "=lastElement(@(1,&))" } } } } } } } } } }, { "operation": "modify-overwrite-beta", "spec": { "*": "=recursivelySquashNulls" } } ]
... View more
Labels:
- Labels:
-
Apache NiFi
10-30-2023
05:49 AM
Hi Team, I would like to fetch values of tag"AltriDatiGestionali" into each line. whenever natura value is 3.5. I'm trying with the below logic but no luck can anyone help in this INPUT: { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": [ { "Natura": "N3.5", "NumeroLinea": 1, "Quantita": "3.00000000", "PrezzoUnitario": "209.04000000", "AliquotaIVA": "0.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "42.00", "Importo": "263.40" } ], "Descrizione": "A6510108918 COPERCHIO TESTATA CIL.", "PrezzoTotale": "363.72000000" }, { "Natura": "N3.5", "NumeroLinea": 2, "Quantita": "7.00000000", "PrezzoUnitario": "254.93000000", "AliquotaIVA": "0.00", "ScontoMaggiorazione": [ { "Tipo": "SC", "Percentuale": "42.00", "Importo": "749.49" } ], "Descrizione": "A4634230112 DISCO DEL FRENO", "PrezzoTotale": "1035.02000000" }, { "AltriDatiGestionali": { "RiferimentoTesto": "22122013260655367-000180 DEL 20/12/2022", "RiferimentoData": "22122013260655367-000180 DEL 20/12/2022", "TipoDato": "INTENTO" } } ] } } } JOLT SPEC: [ { "operation": "shift", "spec": { "FatturaElettronicaBody": { "DatiBeniServizi": { "DettaglioLinee": { "*": { "NumeroLinea": { "*": { "@(2,NumeroLinea)": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].NumeroLinea" } }, "Descrizione": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Descrizione", "Quantita": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Quantita", "PrezzoUnitario": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoUnitario", "ScontoMaggiorazione": { "*": { "Tipo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].ScontoMaggiorazione[&3].Tipo", "Percentuale": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].ScontoMaggiorazione[&3].Percentuale", "Importo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].ScontoMaggiorazione[&3].Importo" } }, "PrezzoTotale": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoTotale", "AliquotaIVA": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].AliquotaIVA", "Natura": { "#3.5": { "@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].Natura", "@(3,AltriDatiGestionali)": { "TipoDato": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&4].AltriDatiGestionali.TipoDato", "RiferimentoTesto": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].AltriDatiGestionali[&2].RiferimentoTesto", "RiferimentoData": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].AltriDatiGestionali[&3].RiferimentoData" } }, "*": { "@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&3].Natura" } }, "EsigibilitaIVA": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].EsigibilitaIVA" } } } } } }, { "operation": "modify-overwrite-beta", "spec": { "*": "=recursivelySquashNulls" } } ] Expected Output: { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DettaglioLinee" : [ { "NumeroLinea" : 1, "Descrizione" : "A6510108918 COPERCHIO TESTATA CIL.", "Quantita" : "3.00000000", "PrezzoUnitario" : "209.04000000", "ScontoMaggiorazione" : [ { "Tipo" : "SC", "Percentuale" : "42.00", "Importo" : "263.40" } ], "PrezzoTotale" : "363.72000000", "AliquotaIVA" : "0.00", "Natura" : "N3.5", "AltriDatiGestionali": { "RiferimentoTesto": "22122013260655367-000180 DEL 20/12/2022", "RiferimentoData": "22122013260655367-000180 DEL 20/12/2022", "TipoDato": "INTENTO" } }, { "NumeroLinea" : 2, "Descrizione" : "A4634230112 DISCO DEL FRENO", "Quantita" : "7.00000000", "PrezzoUnitario" : "254.93000000", "ScontoMaggiorazione" : [ { "Tipo" : "SC", "Percentuale" : "42.00", "Importo" : "749.49" } ], "PrezzoTotale" : "1035.02000000", "AliquotaIVA" : "0.00", "Natura" : "N3.5", "AltriDatiGestionali": { "RiferimentoTesto": "22122013260655367-000180 DEL 20/12/2022", "RiferimentoData": "22122013260655367-000180 DEL 20/12/2022", "TipoDato": "INTENTO" } } ] } } } Anyone help please. @SAMSAL , @MattWho
... View more
Labels:
- Labels:
-
Apache NiFi
10-12-2023
08:21 AM
Hi All in jolt i've specification that i've input as data headers and corresponding line items. now i need to add extra(append) line item(with same names but random values) to the existing line items based on one attribute value in the input. input: { "data": { "overview": { "shipmentDetails": { "additionalCosts": "45,00" } }, "items": [ { "pos": 1, "partNoDescriptionCode": { "partNo": "A205330410780", "description": null, "customsNumber": "870899970", "countryOfOrigin": "DE", "netWeight": "12,45 KG", "additionalInformation": null, "ecotaxLine": null, "chargeCode": null, "ecoTaxDescription": null }, "orderNumberDeliveryNote": { "orderNumber": "INV 06.2", "deliveryNoteNumber": "211347", "deliveryNoteDate": "28.07.2023" }, "invoiceReturnData": null, "quantity": "2,00", "nspType": "6", "pricePerUnit": "2.181,66", "listPriceInvoiced": "1.745,33", "totalPriceTaxPercentage": { "totalPrice": "4.363,32", "taxPercentage": "0,00%" }, "svhcIndicator": null, "orderReference": null, "originDeliveryNoteId": null, "discountPromotion": { "discount": "872,66", "discountPercentage": "20,00%", "promotionPercentage": "0,00%" }, "invoiceValue": "3.490,66", "ecoTaxValue": "0,00", "c-CodeDivisionCode": { "divisionCode": "CC", "c-Code": [ " " ] } } ] } } Spec: [ { "operation": "shift", "spec": { "data": { "overview": { "shipmentDetails": { "additionalCosts": { "0,00": { "*": "" }, "*": { "#0": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.NumeroLinea", "#dettaglio 1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.Descrizione", "#1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.Quantita", "@(2,additionalCosts)": ["FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.PrezzoUnitario", "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoTotale"], "AliquotaIVA": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee.AliquotaIVA" } } } }, "items": { "*": { "@(4,data.overview.shipmentDetails.taxCodeCustomer)": { "8": { "#N3.5": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura", "#INTENTO": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].AltriDatiGestionali[&2].TipoDato" }, "1": { "#N3.2": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura" }, "4": { "#N3.1": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Natura" }, "*": { "*": "" } }, "pos": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].NumeroLinea", "quantity": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].Quantita", "pricePerUnit": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoUnitario", "totalPriceTaxPercentage": { "taxPercentage": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].AliquotaIVA" }, "discountPromotion": { "Tipo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].&", "discountPercentage": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].Percentuale", "discount": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].ScontoMaggiorazione[&2].Importo" }, "partNoDescriptionCode": { "partNo": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&2].Descrizione" }, "invoiceValue": "FatturaElettronicaBody.DatiBeniServizi.DettaglioLinee[&1].PrezzoTotale" } } } } } ] Output: { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DettaglioLinee" : [ { "NumeroLinea" : 1, "Quantita" : "2,00", "PrezzoUnitario" : "2.181,66", "AliquotaIVA" : "0,00%", "ScontoMaggiorazione" : [ { "Percentuale" : "20,00%", "Importo" : "872,66" } ], "Descrizione" : "A205330410780", "PrezzoTotale" : "3.490,66" } ] } } } what i expect output as below. { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DettaglioLinee" : [ { "NumeroLinea" : 0, --(default value) "Descrizione" : “dettaglio 1",--(default value) "Quantita" : “1.00000000",--(default value) "PrezzoUnitario" : "183.97000000",(additional cost) "PrezzoTotale" : "367.94000000",(same value asprezzoUnitario) "AliquotaIVA" : "22.00" } , { "NumeroLinea" : 1, "Quantita" : "2,00", "PrezzoUnitario" : "2.181,66", "AliquotaIVA" : "0,00%", "ScontoMaggiorazione" : [ { "Percentuale" : "20,00%", "Importo" : "872,66" } ], "Descrizione" : "A205330410780", "PrezzoTotale" : "3.490,66" } ] } } } @SAMSAL , Could you please help on this, thank you!1
... View more
Labels:
- Labels:
-
Apache NiFi
10-10-2023
11:32 AM
Thank you So much @SAMSAL , if the input is array of values then its coming good, How about if input is nonarray value something like this { "DatiBeniServizi": { "DatiRiepilogo": { "AliquotaIVA": "22.00", "ImponibileImporto": "367.94", "Imposta": "80.95" } } i think without [&1] will work but how to accept both nonarray and array input using single spec? }
... View more
10-10-2023
07:25 AM
Hi All, Could you please help in getting below value to be splitted across the array , the value outside of arrray Input: { "DatiRiepilogo": { "Natura": "N3.5", "AliquotaIVA": [ "22.00", "5.00" ], "ImponibileImporto": [ "215.43", "6.70" ], "Imposta": [ "47.39", "0.34" ] } } SPEC: [ { "operation": "shift", "spec": { "DatiRiepilogo": { "Natura":{ "*":{ "@(2,Natura)": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].Natura" }}, "AliquotaIVA": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].AliquotaIVA", "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].AliquotaIVA" } }, "ImponibileImporto": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].ImponibileImporto", "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].ImponibileImporto" } }, "Imposta": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].Imposta", "*": { "@": "FatturaElettronicaBody.DatiBeniServizi.DatiRiepilogo[&1].Imposta" } } } } } ] Expected Output: { "FatturaElettronicaBody" : { "DatiBeniServizi" : { "DatiRiepilogo" : [ { "Natura": "N3.5", "AliquotaIVA" : "22.00", "ImponibileImporto" : "215.43", "Imposta" : "47.39" }, { "Natura": "N3.5", "AliquotaIVA" : "5.00", "ImponibileImporto" : "6.70", "Imposta" : "0.34" } ] } } } @SAMSAL , @MattWho Could you please help on this
... View more
Labels:
- Labels:
-
Apache NiFi
07-21-2023
04:25 AM
Thanks @SAMSAL for recommending @MattWho
... View more
07-20-2023
10:22 PM
@MattWho wow. that worked as i'm expecting. so it won't merge the file till it has exact match file comes, right? and it won't fail either. if one of the file missed/delayed seems it is waiting till that file comes in. Thanks a lot Regards, pradeep
... View more