diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index c2bf457..4b0b7d5 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -47,7 +47,6 @@ <#if (reflexMvtStockInterface.ipg_move_type == "100" || reflexMvtStockInterface.ipg_move_type == "110" || reflexMvtStockInterface.ipg_move_type == "120") > - <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> @@ -56,10 +55,6 @@ <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> } ] - <#else> - <#-- Case of IPG move type volontarilly ignored, Reference receipt is empty--> - <#stop > - <#else> <#stop> diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 0b78db9..5b586db 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -37,6 +37,9 @@ <#if reflexMvtStockInterface.receipt_reference?? && reflexMvtStockInterface.receipt_reference!=""> "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", + <#else> + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", + "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", <#else> @@ -44,8 +47,8 @@ "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", <#else> - "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", - "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", + "OrderID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", <#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0> diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index 86f016d..0fe883c 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -18,14 +18,10 @@ <#assign item = JsonUtil.jsonToMap(dataRfx)> [ { - <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaItm_ItemCreated.ftl"> - <#else> - <#stop "no LV for the item"> - } ] <#break> diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 1f22d6b..4433f6e 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -21,15 +21,17 @@ }, <#-- Item metadata inclusion --> - <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, + <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl"> <#-- Item Photo URI could be added here --> <#if item.url?? && item.url!=""> - "PhotoURI": "${item.url?json_string}", + , + "PhotoURI": "${item.url?json_string}" <#-- Loop for the Logistical Variants - LV --> - <#if item.logistical_variant_list??> + <#if item.logistical_variant_list?? && (item.logistical_variant_list?size == item.logistical_variant_list?filter(l ->l??)?size)> + , "LogisticVariants": [ <#list item.logistical_variant_list as logistical_variant> diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index 1bd4e22..792be9a 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -15,7 +15,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> - <#if receipt.receipt_reference ?? && receipt.receipt_reference!=""> <#if receipt.receipt_type == "030"> <#stop "ignored message because receipt type = transfert"> <#else> @@ -40,18 +39,13 @@ <#-- No line--> <#stop> - - <#else> - <#-- "Receipt reference is empty"--> - <#stop> - + <#break> <#case "U"> <#-- *********************************************** Action = UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.receipt_confirmed == "true" && receipt.confirmation_total_level_1==0 && receipt.confirmation_total_level_2==0 && receipt.confirmation_total_level_3==0> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowCancelled> @@ -91,10 +85,6 @@ - <#else> - <#-- Receipt reference is empty--> - <#stop > - ] <#break> @@ -103,7 +93,6 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign receipt = JsonUtil.jsonToMap(dataRfx)> [ - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> <#if receipt.line_list ??> { @@ -116,10 +105,6 @@ <#-- No line--> <#stop> - <#else> - <#-- Receipt reference is empty--> - <#stop > - ] <#break> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index 1c838f8..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -25,11 +25,14 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -39,7 +42,6 @@ } } <#break> - diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 6d21132..0d3b976 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -9,7 +9,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference?trim?json_string}", + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -44,7 +48,11 @@ "ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}" }, - "OrderID": "${receipt.receipt_reference?trim?json_string}", + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> + "OrderID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "OrderID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + <#if receipt.line_list??> "Lines" : [ <#list receipt.line_list as line> diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index 1c838f8..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -25,11 +25,14 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -39,7 +42,6 @@ } } <#break> - diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 1c838f8..c94a309 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -25,11 +25,14 @@ } <#else> - <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> { "Header": {"ProjectID": "${projectRP}"}, "ID": { + <#if receipt.receipt_reference?? && receipt.receipt_reference!=""> "RefID": "${receipt.receipt_reference?trim?json_string}", + <#else> + "RefID": "${receipt.physical_depot_code?trim?json_string}${receipt.activity_code?trim?json_string}${receipt.originator_code?trim?json_string}${receipt.receipt_year}${receipt.receipt_number}", + "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -39,7 +42,6 @@ } } <#break> - diff --git a/VERSION b/VERSION index b0b5047..ea6f0b4 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.45+3 +1.2.45+4