diff --git a/RFXtoRP_HfLvTypeList.ftl b/RFXtoRP_HfLvTypeList.ftl index 468dd64..584df9a 100644 --- a/RFXtoRP_HfLvTypeList.ftl +++ b/RFXtoRP_HfLvTypeList.ftl @@ -10,8 +10,8 @@ <#case "U"> <#case "D"> - <#--<#stop "no generic FTL file available yet for LV types"> --> - <#stop> + <#stop "no generic FTL file available yet for LV types"> + <#break> diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 7715ea3..be73034 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -1,4 +1,4 @@ -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -9,13 +9,13 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)> - + <#assign reflexMvtStockInterface = JsonUtil.jsonToMap(dataRfx)> + <#-- exclusion of the cases of an IPG move with quantity = 0 (weight modification) --> <#if reflexMvtStockInterface.ipg_move_quantity_in_base_lvs != 0> - + <#-- IPG moves translated into Stock moves --> - <#if reflexMvtStockInterface.ipg_move_type == "130" || + <#if reflexMvtStockInterface.ipg_move_type == "130" || reflexMvtStockInterface.ipg_move_type == "200" || reflexMvtStockInterface.ipg_move_type == "210" || reflexMvtStockInterface.ipg_move_type == "220" || @@ -25,50 +25,49 @@ reflexMvtStockInterface.ipg_move_type == "290" || reflexMvtStockInterface.ipg_move_type == "300" || reflexMvtStockInterface.ipg_move_type == "400" || - reflexMvtStockInterface.ipg_move_type == "410" || - reflexMvtStockInterface.ipg_move_type == "420" + reflexMvtStockInterface.ipg_move_type == "410" || + reflexMvtStockInterface.ipg_move_type == "420" > - [ + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> + <#assign apiReflexPlatformID = ApiReflexPlatformID.StockMoved> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : + "datas" : <#include "RFXtoRP_HsaIpgMove_StockMoved.ftl"> - + } ] <#else> - <#-- IPG moves translated into goods received (all type of receipt) --> - <#if reflexMvtStockInterface.ipg_move_type == "100" || - reflexMvtStockInterface.ipg_move_type == "110" || - reflexMvtStockInterface.ipg_move_type == "120" - > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> - - } - ] - <#else> - <#-- Case of IPG move type volontarilly ignored--> - <#stop "Move type not supported"> - - - <#else> - <#-- cases of an IPG move with quantity = 0 (weight modification)--> - <#stop "move ignored quantity = 0"> + <#-- IPG moves translated into goods received (all type of receipt) --> + <#if reflexMvtStockInterface.ipg_move_type == "100" || + reflexMvtStockInterface.ipg_move_type == "110" || + reflexMvtStockInterface.ipg_move_type == "120" + > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitGoodsReceived> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaIpgMove_GoodsReceived.ftl"> + } + ] + <#else> + <#-- Case of IPG move type volontarilly ignored--> + <#stop> + + <#else> + <#-- cases of an IPG move with quantity = 0 (weight modification)--> + <#stop> + <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#stop "event not supported - Case D "> <#break> - - + + <#default> <#stop "event not supported"> diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 2161718..042b49b 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -58,7 +58,7 @@ <#include "RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl"> } <#else> - <#stop "Reflex WMS status not supported on Reflex Platform"> + <#stop> diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 318d8e9..f633216 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -34,7 +34,7 @@ <#stop "preparation order type not supported"> <#else> - <#stop "PRO reference is null"> + <#stop "PRO reference is empty"> } diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 477456f..6d55a0f 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -1,87 +1,87 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - { + { <#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) /> <#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) /> "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { "RefID": "${receipt.receipt_reference}", "RefDate": { "DateTime": "${receipt_creation_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" + "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload": { "CreationDateTime": { "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" - }, - + }, + <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_HeaderMetadata.ftl">, - - "ShipFrom": + + "ShipFrom": { "ActorID": "${receipt.original_code}" }, - "ShipTo" : + "ShipTo" : { "ActorID": "${receipt.physical_depot_code}" }, - "ShipToAcked": true, - + "ShipToAcked": true, + <#if receipt.carrier_informations.carrier_code != ""> - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"}, - - - - <#if receipt.line_list??> + "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"}, + + + + <#if receipt.line_list??> "Lines" : [ <#list receipt.line_list as line> { "LineID": "${line.receipt_line_number}", <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, - "RequestedContent": - { - "Goods": + "RequestedContent": + { + "Goods": { "ItemID": "${line.item_code!"0"}", - "LVBranchID": "${line.item_lv_code!"0"}", - <#if line.line_without_detail??> + "LVBranchID": "${line.item_lv_code!"0"}", + <#if line.line_without_detail??> <#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> - <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${line_without_detail_priority_date}", + <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${line_without_detail_priority_date}", <#else> - <#stop "line with detail"> + <#stop > <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_SegmentationKeys.ftl"> }, - "Quantity" : + "Quantity" : { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": "${line.order_quantity_in_lv!0}" + "Value": "${line.order_quantity_in_lv!0}" } } - + } <#sep>, - + ], - + "RequestedMilestones" : { - "RequestedDeliveryDateTime" : + "RequestedDeliveryDateTime" : { - "DateTime": "${receipt_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } + "DateTime": "${receipt_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } } } }