From f98e963b761074d3194a60eebe3dae933744adde Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 19 Jul 2024 11:22:18 +0200 Subject: [PATCH 001/132] modifs HsrPRo --- RFXtoRP_HsrPro.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index 998fa70..f6a0241 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -21,16 +21,16 @@ <#-- check preparation type code (internal order and reservation are ignored) --> <#if preparation_order.preparation_type_code == "010" || preparation_order.preparation_type_code == "030"> <#-- Only if preparation order not confirmed --> - <#-- <#if preparation_order.preparation_order_confirmed == "false" > --> + <#if preparation_order.preparation_order_confirmed == "false" > { <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowDetected> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> } - <#-- <#else> + <#else> <#stop "preparation order already confirmed"> - --> + <#else> <#stop "preparation order type not supported"> From 3eb072f36de4afe081183b84ccf4aa777274f809 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 26 Jul 2024 14:06:19 +0200 Subject: [PATCH 002/132] Mouvements --- RFXtoRP_HsaIpgMove.ftl | 5 ++++- RFXtoRP_HsaIpgMove_StockMoved.ftl | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 18a4a46..13d3698 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -28,7 +28,10 @@ reflexMvtStockInterface.ipg_move_type == "370" || reflexMvtStockInterface.ipg_move_type == "400" || reflexMvtStockInterface.ipg_move_type == "410" || - reflexMvtStockInterface.ipg_move_type == "420" + reflexMvtStockInterface.ipg_move_type == "420" || + reflexMvtStockInterface.ipg_move_type == "455" || + reflexMvtStockInterface.ipg_move_type == "460" || + reflexMvtStockInterface.ipg_move_type == "465" > [ { diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index c09d3ae..9d7e808 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -14,7 +14,11 @@ "370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS", "400":"STOCK_MOVEMENT_TYPE_FIX", "410":"STOCK_MOVEMENT_TYPE_FIX", - "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}> + "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", + "455":"STOCK_MOVEMENT_TYPE_FIX", + "460":"STOCK_MOVEMENT_TYPE_FIX", + "465":"STOCK_MOVEMENT_TYPE_FIX" + }> <#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> From b5ef671512b0da5f5d394b7f7b11eebe816459ae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 31 Jul 2024 17:15:44 +0200 Subject: [PATCH 003/132] MD Actor --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaCons_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaSup_ActorCreated.ftl | 4 ++-- RFXtoRP_HsrDepot_ActorCreated.ftl | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 8c35239..b0f2fe5 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -14,9 +14,9 @@ <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - <#-- + <#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">, - --> + "Address": diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 97b21f8..9c29965 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -14,9 +14,9 @@ <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - <#-- + <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, - --> + "Address": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index fb804ac..bc3719a 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -14,9 +14,9 @@ <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - <#-- + <#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">, - --> + "Address": { diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 31774f9..3d66640 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -14,9 +14,9 @@ <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - <#-- + <#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">, - --> + "Address": { From 9ee9743b81b4713fdd161aa82a5b6dfbd5bb7158 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 6 Aug 2024 10:54:28 +0200 Subject: [PATCH 004/132] Code ico controle --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 7 ++++++- RFXtoRP_HsaCons_ActorCreated.ftl | 6 +++++- RFXtoRP_HsaSup_ActorCreated.ftl | 6 +++++- RFXtoRP_HsrDepot_ActorCreated.ftl | 6 +++++- 4 files changed, 21 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index b0f2fe5..44922a3 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -29,7 +29,12 @@ "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", - "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", + <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#if isCountryCode> + "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", + <#else> + "CountryCode" : "", + "ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}", "State": "${carrier.carrier_structured_address.country_designation?json_string}" diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 9c29965..23998f4 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -29,7 +29,11 @@ "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", - "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", + <#if isCountryCode> + "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", + <#else> + "CountryCode" : "", + "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", "State": "${actor.consignee_structured_address.country_designation?json_string}" diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index bc3719a..7b5f47b 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -28,7 +28,11 @@ "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", - "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", + <#if isCountryCode> + "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", + <#else> + "CountryCode" : "", + "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", "State": "${actor.supplier_structured_address.country_designation?json_string}" diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 3d66640..1eb3941 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -28,7 +28,11 @@ "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", - "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", + <#if isCountryCode> + "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", + <#else> + "CountryCode" : "", + "ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}", "State": "${depot.physical_depot_structured_address.country_designation?json_string}" From d21a86306053e878330d1bb8f2e1f0b07cf900ea Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 6 Aug 2024 11:21:18 +0200 Subject: [PATCH 005/132] country code --- RFXtoRP_HsaCons_ActorCreated.ftl | 1 + RFXtoRP_HsaSup_ActorCreated.ftl | 1 + RFXtoRP_HsrDepot_ActorCreated.ftl | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 23998f4..e16c546 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -29,6 +29,7 @@ "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> <#if isCountryCode> "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 7b5f47b..ae85613 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -28,6 +28,7 @@ "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> <#if isCountryCode> "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 1eb3941..4213196 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -28,7 +28,8 @@ "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", - <#if isCountryCode> + <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#if isCountryCode > "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", <#else> "CountryCode" : "", From b7f383d531a15f9cdb7c2db57f7aaa626054eaa3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 6 Aug 2024 11:26:18 +0200 Subject: [PATCH 006/132] country code 2 --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 2 +- RFXtoRP_HsaCons_ActorCreated.ftl | 2 +- RFXtoRP_HsaSup_ActorCreated.ftl | 2 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 44922a3..a4eca60 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -29,7 +29,7 @@ "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#assign isCountryCode = isCountryCode(carrier.carrier_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index e16c546..c6b463d 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -29,7 +29,7 @@ "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#assign isCountryCode = isCountryCode(actor.consignee_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index ae85613..071f916 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -28,7 +28,7 @@ "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#assign isCountryCode = isCountryCode(actor.supplier_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 4213196..db25bab 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -28,7 +28,7 @@ "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(preparation_line.countryCode) /> + <#assign isCountryCode = isCountryCode(depot.physical_depot_structured_address.country_code) /> <#if isCountryCode > "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", <#else> From a9fec0b5f9c032d14a9a204023418ff4db7e52a3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 6 Aug 2024 11:29:02 +0200 Subject: [PATCH 007/132] country --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 2 +- RFXtoRP_HsaCons_ActorCreated.ftl | 2 +- RFXtoRP_HsaSup_ActorCreated.ftl | 2 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index a4eca60..49071bf 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -29,7 +29,7 @@ "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(carrier.carrier_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index c6b463d..f0660d8 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -29,7 +29,7 @@ "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(actor.consignee_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 071f916..39aeb39 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -28,7 +28,7 @@ "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(actor.supplier_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code) /> <#if isCountryCode> "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", <#else> diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index db25bab..c80d1e3 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -28,7 +28,7 @@ "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = isCountryCode(depot.physical_depot_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code) /> <#if isCountryCode > "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", <#else> From 2b828c2f4b57446a68dd7dbc7e176c337f89633f Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 6 Aug 2024 14:18:02 +0200 Subject: [PATCH 008/132] code country ISO --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaCons_ActorCreated.ftl | 4 ++-- RFXtoRP_HsaSup_ActorCreated.ftl | 4 ++-- RFXtoRP_HsrDepot_ActorCreated.ftl | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 49071bf..fc0715e 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -29,9 +29,9 @@ "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) /> <#if isCountryCode> - "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", + "CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index f0660d8..acccbc8 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -29,9 +29,9 @@ "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) /> <#if isCountryCode> - "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", + "CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 39aeb39..d5fca0c 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -28,9 +28,9 @@ "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> <#if isCountryCode> - "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", + "CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index c80d1e3..73319fb 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -28,9 +28,9 @@ "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code) /> + <#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) /> <#if isCountryCode > - "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", + "CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", From 949d4c6a8d2fb0e4afe6bcab4bc8dbafc0026e9c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 6 Aug 2024 17:13:04 +0200 Subject: [PATCH 009/132] CC vide --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 3 ++- RFXtoRP_HsaCons_ActorCreated.ftl | 3 ++- RFXtoRP_HsaSup_ActorCreated.ftl | 3 ++- RFXtoRP_HsrDepot_ActorCreated.ftl | 3 ++- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 49071bf..78b6938 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -44,7 +44,8 @@ "Name": "${carrier.address.company_name?json_string}", "StreetAddressOne" : "${carrier.address.address_1?json_string}", "StreetAddressTwo" : "${carrier.address.address_2?json_string}", - "StreetAddressThree" : "${carrier.address.address_3?json_string}" + "StreetAddressThree" : "${carrier.address.address_3?json_string}", + "CountryCode" : "" }, diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index f0660d8..ecf4ad8 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -45,7 +45,8 @@ "Name": "${actor.address.company_name?json_string}", "StreetAddressOne" : "${actor.address.address_1?json_string}", "StreetAddressTwo" : "${actor.address.address_2?json_string}", - "StreetAddressThree" : "${actor.address.address_3?json_string}" + "StreetAddressThree" : "${actor.address.address_3?json_string}", + "CountryCode" : "" }, diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 39aeb39..7e7e5fd 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -43,7 +43,8 @@ "Name": "${actor.optional_attributes.company_name?json_string}", "StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}", "StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}", - "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}" + "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}", + "CountryCode" : "" diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index c80d1e3..5aea948 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -42,7 +42,8 @@ "Name": "${depot.physical_depot_address.company_name?json_string}", "StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}", "StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}", - "StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}" + "StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}", + "CountryCode" : "" }, From 08cf8ec1a62db90134020217e77f7bb07549af66 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 6 Aug 2024 17:40:16 +0200 Subject: [PATCH 010/132] add hsaDispute flow --- RFXtoRP_HsaDispute.ftl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 RFXtoRP_HsaDispute.ftl diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl new file mode 100644 index 0000000..1c5fd05 --- /dev/null +++ b/RFXtoRP_HsaDispute.ftl @@ -0,0 +1,19 @@ +<#-- *********************************************** Parameter global ******************** --> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#case "D"> + <#stop "no generic FTL file available yet for Dispute"> + <#break> + + + <#default> + <#stop "event not supported"> + + From d4b927b7f71de766ed99f0f02ec274e38a88d9c4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 8 Aug 2024 10:55:39 +0200 Subject: [PATCH 011/132] hsrdispute --- RFXtoRP_HsaDispute.ftl => RFXtoRP_HsrDispute.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) rename RFXtoRP_HsaDispute.ftl => RFXtoRP_HsrDispute.ftl (72%) diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsrDispute.ftl similarity index 72% rename from RFXtoRP_HsaDispute.ftl rename to RFXtoRP_HsrDispute.ftl index 1c5fd05..90f674f 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsrDispute.ftl @@ -1,5 +1,5 @@ <#-- *********************************************** Parameter global ******************** --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -9,10 +9,10 @@ <#case "C"> <#case "U"> <#case "D"> - <#stop "no generic FTL file available yet for Dispute"> + <#stop "no generic FTL file available yet for Dispute"> <#break> - - + + <#default> <#stop "event not supported"> From c183ade00199b46c6d345f60fefd58346c6517a0 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 8 Aug 2024 11:47:14 +0200 Subject: [PATCH 012/132] hsadispute --- RFXtoRP_HsrDispute.ftl => RFXtoRP_HsaDispute.ftl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename RFXtoRP_HsrDispute.ftl => RFXtoRP_HsaDispute.ftl (100%) diff --git a/RFXtoRP_HsrDispute.ftl b/RFXtoRP_HsaDispute.ftl similarity index 100% rename from RFXtoRP_HsrDispute.ftl rename to RFXtoRP_HsaDispute.ftl From ca33a85694e8b3a7a2f32a40b32453c533cd9ba8 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 29 Aug 2024 10:34:55 +0200 Subject: [PATCH 013/132] SCPN1-7065 --- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 59 ++++++++++--------- 1 file changed, 30 insertions(+), 29 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index c6ad759..b5e3f74 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -74,37 +74,38 @@ "Goods": { "ItemID": "${preparation_line.item_code?trim?json_string}", "LVBranchID": "${preparation_line.item_lv_code?json_string}", - <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> - <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${priority_date}", - <#else> - <#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> + + <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", + <#else> + <#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", - <#else> - <#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${priority_date}", - <#else> - <#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${priority_date}", - <#else> - <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${priority_date}", - <#else> - <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> - <#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${priority_date}", - <#else> - "PriorityDate": "1970-01-01T00:00:00Z", - - - - + <#else> + <#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", + <#else> + <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> + <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", + <#else> + <#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> + <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", + <#else> + <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> + <#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${priority_date}", + <#else> + "PriorityDate": "1970-01-01T00:00:00Z", + + - + + + <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> From 843bf837b29a52c5d33f54f51b5b6b0f1e8ff1b2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 6 Sep 2024 16:14:11 +0200 Subject: [PATCH 014/132] motifs --- RFXtoRP_HsaDispute.ftl | 35 ++++++++++++---- RFXtoRP_HsaDispute_Created.ftl | 40 +++++++++++++++++++ ...IpgMove_GoodsReceived_SegmentationKeys.ftl | 8 ++-- RFXtoRP_HsaItm_ItemCreated.ftl | 4 +- 4 files changed, 74 insertions(+), 13 deletions(-) create mode 100644 RFXtoRP_HsaDispute_Created.ftl diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index 90f674f..55ee386 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -1,4 +1,8 @@ -<#-- *********************************************** Parameter global ******************** --> +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -6,14 +10,29 @@ <#assign aDateTime = .now> <#switch cloudEventMsg.action> - <#case "C"> - <#case "U"> - <#case "D"> - <#stop "no generic FTL file available yet for Dispute"> - <#break> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign dispute = JsonUtil.jsonToMap(dataRfx)> + [ + + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaDispute_Created.ftl"> + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#stop "event not supported - Case D "> + <#break> - <#default> - <#stop "event not supported"> + <#default> + <#stop "event not supported"> diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl new file mode 100644 index 0000000..243ad4b --- /dev/null +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -0,0 +1,40 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + + + }, + "Payload": { + + <#-- Case of dispute on preparation --> + <#if dispute.dispute_type_code=="050" > + "EntityID":"${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_reference}", + <#if dispute.dispute_reason_code == "001"> <#--Enter your Reflex Reason code and mappe it with Platform reason code--> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV" + + <#else> + <#-- Case of dispute on receipt --> + <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > + "EntityID":"${dispute.dispute_reception.reception_reference}", + <#if dispute.dispute_reason_code == "M1"> <#--Enter your Reflex Reason code and mappe it with Platform reason code--> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV" + + + + + } + } +] + + + diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl index bee18d4..4fa3d1d 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl @@ -18,21 +18,21 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${reflexMvtStockInterface.batch_1}"} - + }, { "Key": "HeldForSpecificCode", "Value": { "Bool" : "${reflexMvtStockInterface.ipg_specific_code_held}"} }, - + { - <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign manufacturing_date = reflexMvtStockInterface.manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_date}" } - } + } ] --> diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index a8ce5c9..5e62e0b 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,7 +24,9 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, <#-- Item Photo URI could be added here --> - <#--"PhotoURI": " ", --> + <#if item.url?? && item.url!==""> + "PhotoURI": "${item.url?json_string}", + <#-- Loop for the Logistical Variants - LV --> <#if item.logistical_variant_list??> From 50fb9b467f6335b6d6dd0db7b02a42028bad4fed Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 6 Sep 2024 16:21:09 +0200 Subject: [PATCH 015/132] modifs --- RFXtoRP_HsaItm_ItemCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index 5e62e0b..c2d33a9 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -24,7 +24,7 @@ <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, <#-- Item Photo URI could be added here --> - <#if item.url?? && item.url!==""> + <#if item.url?? && item.url!=""> "PhotoURI": "${item.url?json_string}", From 0a0121c020f054320b371c7341b3d96ab7aa86f9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 11 Sep 2024 14:59:45 +0200 Subject: [PATCH 016/132] modifs --- RFXtoRP_HsaDispute.ftl | 5 +- RFXtoRP_HsaDispute_Created.ftl | 46 ++++++++++++------- ...oRP_HsaDispute_ReasonCodeToClaimTypeID.ftl | 13 ++++++ Table.ftl | 9 ++++ 4 files changed, 56 insertions(+), 17 deletions(-) create mode 100644 RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl create mode 100644 Table.ftl diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index 55ee386..b2a538b 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -16,13 +16,16 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dispute = JsonUtil.jsonToMap(dataRfx)> [ - + <#if dispute.dispute_closed == true > { <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaDispute_Created.ftl"> } + <#else> + <#stop> + ] <#break> diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 243ad4b..8673859 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "Table.ftl"> [ { "Header": { @@ -7,7 +8,7 @@ }, "ID": { <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" <#else> <#if dispute.dispute_reception??> "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" @@ -16,22 +17,35 @@ }, "Payload": { - <#-- Case of dispute on preparation --> - <#if dispute.dispute_type_code=="050" > - "EntityID":"${dispute.dispute_preparation.preparation_order_list.preparation_order_contractor_reference}", - <#if dispute.dispute_reason_code == "001"> <#--Enter your Reflex Reason code and mappe it with Platform reason code--> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV" - - <#else> - <#-- Case of dispute on receipt --> - <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > - "EntityID":"${dispute.dispute_reception.reception_reference}", - <#if dispute.dispute_reason_code == "M1"> <#--Enter your Reflex Reason code and mappe it with Platform reason code--> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_RETARDLIV" - - - + <#if dispute.dispute_reference?? && dispute.dispute_reference!=""> + "Title":"${dispute.dispute_reference?trim?json_string}", + <#else> + "Title":"", + "Amount": { + <#-- "Currency": "${TableCurrency[dispute.dispute_amount_unit]}",--> + "Currency":"EUR", + "Value": "${dispute.dispute_amount}" + }, + <#if dispute.dispute_type_code=="050" > + "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", + <#else> + <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > + "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", + <#else> + <#stop "Type not supported" > + + + <#-- To configure --> + <#include "RFXtoRP_HsaDispute_ReasonCode.ftl"> + + <#if TableReasonCode[dispute.dispute_reason_code]??> + "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" + <#else> + <#stop "Claim reason code not supported" > + + + } } ] diff --git a/RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl b/RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl new file mode 100644 index 0000000..b95564d --- /dev/null +++ b/RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl @@ -0,0 +1,13 @@ +<#-- Specify table for reason code --> +<#-- <#assign TableReasonCode = { + "001":"CLAIMTYPE_${projectRP}_ORDER_Delay", + "M1":"CLAIMTYPE_${projectRP}_ORDER_casse", + "XXX":"CLAIMTYPE_${projectRP}_ACTOR_claimtype", + "XXX":"CLAIMTYPE_${projectRP}_HANDLINGUNIT_claimtype", + "XXX":"CLAIMTYPE_${projectRP}_MOVEMENT_claimtype" + }/>--> + + + + + diff --git a/Table.ftl b/Table.ftl new file mode 100644 index 0000000..b61f611 --- /dev/null +++ b/Table.ftl @@ -0,0 +1,9 @@ +<#-- Table criticality --> +<#assign TableCriticality = { + "1": "CLAIM_CRITICALITY_LOW", + "2":"CLAIM_CRITICALITY_MEDIUM", + "3":"CLAIM_CRITICALITY_HIGH", + "4":"CLAIM_CRITICALITY_BLOCKING" + }> + + From 65fed7214680c4da6d7457713140296c719b0275 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 11 Sep 2024 15:09:41 +0200 Subject: [PATCH 017/132] modifs --- ...ID.ftl => RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl | 1 + 1 file changed, 1 insertion(+) rename RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl => RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl (86%) diff --git a/RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl similarity index 86% rename from RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl rename to RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl index b95564d..b952692 100644 --- a/RFXtoRP_HsaDispute_ReasonCodeToClaimTypeID.ftl +++ b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl @@ -1,4 +1,5 @@ <#-- Specify table for reason code --> +<#-- Table example for reason code to claim type ID --> <#-- <#assign TableReasonCode = { "001":"CLAIMTYPE_${projectRP}_ORDER_Delay", "M1":"CLAIMTYPE_${projectRP}_ORDER_casse", From f4f0a50493fdfaec548c10c70e660e2d9ee64531 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 11 Sep 2024 15:12:17 +0200 Subject: [PATCH 018/132] modifs --- RFXtoRP_HsaDispute_Created.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 8673859..55ea4d0 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -37,7 +37,7 @@ <#-- To configure --> - <#include "RFXtoRP_HsaDispute_ReasonCode.ftl"> + <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if TableReasonCode[dispute.dispute_reason_code]??> "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" From ab7c45bcd7bf6ff9cb3d02797e439adde53dc8f2 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 12 Sep 2024 11:55:45 +0200 Subject: [PATCH 019/132] SCPN1-7155 --- RFXtoRP_HsrPrepa.ftl | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index ba650af..f7834cc 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -49,17 +49,21 @@ <#assign refIDHmap ={}> + <#assign hd_numberHmap ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> <#if despatched_ipg.consignment_unit_id!=""> - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> - } + <#if !hd_numberHmap[despatched_ipg.hd_number]?? > + <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> + } + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , From 01d58746d851aa9d757a97f95a5b35b28f83f1c6 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 12 Sep 2024 17:07:33 +0200 Subject: [PATCH 020/132] modifs --- RFXtoRP_HsaDispute_Created.ftl | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 55ea4d0..d54cafe 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -22,9 +22,14 @@ <#else> "Title":"", + "Criticality":"${TableCriticality[dispute.dispute_criticity]}", "Amount": { - <#-- "Currency": "${TableCurrency[dispute.dispute_amount_unit]}",--> - "Currency":"EUR", + <#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) /> + <#if isCurrencyCode> + "Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}", + <#else> + "Currency" : "XXX", + "Value": "${dispute.dispute_amount}" }, <#if dispute.dispute_type_code=="050" > @@ -48,7 +53,4 @@ } } -] - - - +] \ No newline at end of file From 7857dfd696b182a837353e79470b482c98ca8842 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 13:54:09 +0200 Subject: [PATCH 021/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 8 ++++++ RFXtoRP_RfxConfigurationRp.ftl | 43 ++++++++++++++++--------------- 2 files changed, 30 insertions(+), 21 deletions(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 3111b38..73983c7 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -1,10 +1,18 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { + <#--<#if reflex_platform_project_list.site_code_unicity?? && reflex_platform_project_list.site_code_unicity=true > + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "DPO${depot.physical_depot_code?trim?json_string}" + --> + "RefID": "${depot.physical_depot_code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index 78abc62..eedac18 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -2,12 +2,12 @@ <#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --> <#noparse><#-- Date of last generation : ${aDateTime}<#noparse> --> -<#noparse> +<#noparse> <#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item --> - <#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" > - <#assign rfx_date_format_default = "yyyy-MM-dd" > - - + <#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" > + <#assign rfx_date_format_default = "yyyy-MM-dd" > + + <#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}> <#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}> <#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}> @@ -15,22 +15,23 @@ - <#noparse><#assign length_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx["${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"> - <#noparse><#assign area_unit_rfx = area_unit_KV_rfx["${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"> - <#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"> - <#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"> - + <#noparse><#assign length_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"> + <#noparse><#assign distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"> + <#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"> + <#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx["${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"> + <#noparse><#assign area_unit_rfx = area_unit_KV_rfx["${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"> + <#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"> + <#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"> + + - <#noparse><#assign time_zone_rfx = "${file.author_time_zone!"UTC"}<#noparse>"> - <#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+00:00"}<#noparse>"> - - - <#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project> - <#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> - + <#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+00:00"}<#noparse>"> + + + <#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project> + <#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> + + + <#noparse><#assign uniqueness = "${file.reflex_platform_project_list.site_code_unicity}<#noparse>"> - \ No newline at end of file From 6d45f474d46941e1a818740bbb7c634f673bf303 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:04:35 +0200 Subject: [PATCH 022/132] modifs --- RFXtoRP_RfxConfigurationRp.ftl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index eedac18..87d6b77 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -33,5 +33,6 @@ <#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> - <#noparse><#assign uniqueness = "${file.reflex_platform_project_list.site_code_unicity}<#noparse>"> + + <#noparse><#assign uniqueness = "${file.reflex_platform_project_list[0].site_code_unicity}<#noparse>"> From 75a9a1727c9d71f1e0023b34ee6c6a1ed4266218 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:12:45 +0200 Subject: [PATCH 023/132] modifs --- RFXtoRP_RfxConfigurationRp.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index 87d6b77..e9bc1b5 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -34,5 +34,5 @@ - <#noparse><#assign uniqueness = "${file.reflex_platform_project_list[0].site_code_unicity}<#noparse>"> + <#noparse><#assign uniqueness = "${file.reflex_platform_project_list[0].site_code_unicity?string('yes', 'no')}<#noparse>"> From cde81b3e8b6def8aaaf602b2b50b3743d5c7c5a1 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:20:20 +0200 Subject: [PATCH 024/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 73983c7..406d2c7 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -5,13 +5,13 @@ "ProjectID": "${projectRP}" }, "ID": { - <#--<#if reflex_platform_project_list.site_code_unicity?? && reflex_platform_project_list.site_code_unicity=true > + <#if uniqueness?? && uniqueness=yes > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> "RefID": "DPO${depot.physical_depot_code?trim?json_string}" --> - "RefID": "${depot.physical_depot_code?trim?json_string}" + }, From d60a75cbbc312fe36c0d3bc6ec0b87c6f169da0f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:25:29 +0200 Subject: [PATCH 025/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 406d2c7..8ec6c31 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -5,7 +5,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness=yes > + <#if uniqueness?? && uniqueness= "yes" > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> "RefID": "DPO${depot.physical_depot_code?trim?json_string}" From c742c3639f0ed4f72b185008078c2e836669f15c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:30:11 +0200 Subject: [PATCH 026/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 8ec6c31..0202051 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -5,7 +5,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness= "yes" > + <#if uniqueness?? > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> "RefID": "DPO${depot.physical_depot_code?trim?json_string}" From bfc96d37ab54cf9aaa89e99193167ed52c13a1f3 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:35:15 +0200 Subject: [PATCH 027/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 0202051..222fc03 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -9,7 +9,7 @@ "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> "RefID": "DPO${depot.physical_depot_code?trim?json_string}" - --> + From 89fae85a2fa7bc8b3db20b633c2ef2198bacc7ac Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:48:12 +0200 Subject: [PATCH 028/132] modifs --- RFXtoRP_RfxConfigurationRp.ftl | 41 +++++++++++++++++----------------- 1 file changed, 21 insertions(+), 20 deletions(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index e9bc1b5..c400b77 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -4,35 +4,36 @@ <#noparse> <#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item --> - <#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" > - <#assign rfx_date_format_default = "yyyy-MM-dd" > +<#assign quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" > +<#assign rfx_date_format_default = "yyyy-MM-dd" > - <#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}> - <#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}> - <#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}> - <#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}> +<#assign length_unit_KV_rfx = {"MET":"MILLIMETER","CM":"CENTIMETER","MM":"METER","DM":"DECIMETER","KM":"KILOMETER","MIL":"MILE","YAR":"YARD","INC":"INCH","FT":"FOOT"}> +<#assign weight_unit_KV_rfx = {"GR":"GRAMME","DG":"DECIGRAM","KG":"KILOGRAM","TON":"TONNE","OCE":"ONCE","LTO":"LONG_TON","STO":"SHORT_TON","PND":"POUND"}> +<#assign area_unit_KV_rfx = {"MM²":"SQUARE_MILLIMETER","CM²":"SQUARE_CENTIMETER","DM²":"SQUARE_DECIMETER","M²":"SQUARE_METER","SQI":"SQUARE_INCH","SQF":"SQUARE_FOOT","SQY":"SQUARE_YARD"}> +<#assign volume_unit_KV_rfx = {"MM³":"CUBIC_MILLIMETER","CM³":"CUBIC_CENTIMETER","DM³":"CUBIC_DECIMETER","M³":"CUBIC_METER","CI":"CUBIC_INCH","CF":"CUBIC_FOOT","CY":"CUBIC_YARD","ML":"MILLI_LITER","CL":"CENTI_LITER","DL":"DECI_LITER","LIT":"LITER","HL":"HECTO_LITER","FT":"US_FLUID_OUNCE","USG":"US_GAL","PI":"IMPERIAL_PINT","GL":"IMPERIAL_GAL"}> - + - <#noparse><#assign length_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"> - <#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx["${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"> - <#noparse><#assign area_unit_rfx = area_unit_KV_rfx["${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"> - <#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"> - <#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"> +<#noparse><#assign length_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"> +<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"> +<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx["${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"> +<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx["${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"> +<#noparse><#assign area_unit_rfx = area_unit_KV_rfx["${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"> +<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"> +<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx["${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"> - <#noparse><#assign time_zone_rfx = "${file.author_time_zone!"UTC"}<#noparse>"> - <#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+00:00"}<#noparse>"> +<#noparse><#assign time_zone_rfx = "${file.author_time_zone!"UTC"}<#noparse>"> +<#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+00:00"}<#noparse>"> - <#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project> - <#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> - - +<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project> +<#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> + +<#if file.reflex_platform_project_list[0].site_code_unicity??> <#noparse><#assign uniqueness = "${file.reflex_platform_project_list[0].site_code_unicity?string('yes', 'no')}<#noparse>"> + From a8b044fdba99a096b4cbfea63e7ea5b56ba58c3b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 14:54:43 +0200 Subject: [PATCH 029/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 222fc03..018d311 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -5,7 +5,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? > + <#if uniqueness?? && uniqueness!="" > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> "RefID": "DPO${depot.physical_depot_code?trim?json_string}" From 550c0047daf79220162adc2639bd072e30fcd387 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 15:25:10 +0200 Subject: [PATCH 030/132] modifs --- RFXtoRP_HsaCarrier_ActorCreated.ftl | 6 +++++- RFXtoRP_HsaCons_ActorCreated.ftl | 6 +++++- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 14 ++++++++++++-- RFXtoRP_HsaIpgMove_StockMoved.ftl | 6 +++++- RFXtoRP_HsaSup_ActorCreated.ftl | 6 +++++- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 6 +++++- 6 files changed, 37 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index b83f099..44c4c11 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier.carrier_code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "CA${carrier.carrier_code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index d6cee37..9730ecd 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "C${actor.code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index c2de1cd..0575947 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -32,10 +32,20 @@ <#if reflexMvtStockInterface.receipt_reference!=""> "ExecutionflowID": "${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}", + <#if uniqueness?? && uniqueness!="" > + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#else> + "ExecutionflowID": "D${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + + "LineID": "${reflexMvtStockInterface.receipt_line_number}", - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + + "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 9d7e808..513f146 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -42,7 +42,11 @@ "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "Movement": { "DateTime": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 9fc6f33..89ae6ba 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -4,7 +4,11 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "S${actor.code?trim?json_string}" + }, "Payload": { diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index ca87415..31b33f0 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -18,7 +18,11 @@ }, "Payload":{ "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"CA${preparationOrder.load_data.carrier_code?trim?json_string}" + } <#-- Add transport grade code <#if preparationOrder.transport_grade_code!=""> From d91d15c1c9ca21a8276f4840bb2a567234e3167f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 15:25:39 +0200 Subject: [PATCH 031/132] modifs --- RFXtoRP_HsrDepot_ActorCreated.ftl | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 018d311..ecf47aa 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -5,14 +5,19 @@ "ProjectID": "${projectRP}" }, "ID": { + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "DEP${depot.physical_depot_code?trim?json_string}" + + <#else> <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "DPO${depot.physical_depot_code?trim?json_string}" + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "DEP${depot.physical_depot_code?trim?json_string}" + - - - }, "Payload": { From 956105fc3807f5c6655cf2637a19b5d7647fe434 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 16 Sep 2024 16:12:43 +0200 Subject: [PATCH 032/132] modifs uniqueness --- ...RP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 46 +++++++++++++++---- RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl | 41 ++++++++++++++--- RFXtoRP_HsaCarrier_ActorCreated.ftl | 17 +++++-- RFXtoRP_HsaCarrier_ActorDeleted.ftl | 16 ++++++- RFXtoRP_HsaCons_ActorCreated.ftl | 18 ++++++-- RFXtoRP_HsaCons_ActorDeleted.ftl | 15 +++++- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 28 ++++++++--- RFXtoRP_HsaIpgMove_StockMoved.ftl | 11 ++++- RFXtoRP_HsaSup_ActorCreated.ftl | 17 +++++-- RFXtoRP_HsaSup_ActorDeleted.ftl | 15 +++++- RFXtoRP_HsrDepot_ActorDeleted.ftl | 16 ++++++- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 15 ++++-- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 17 ++++++- RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl | 16 ++++++- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 14 +++++- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 29 +++++++++++- ...P_HsrReceiptList_ExecutionflowDetected.ftl | 29 +++++++++++- 17 files changed, 309 insertions(+), 51 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index 6e6600b..64f5ed7 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -1,27 +1,53 @@ <#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> + [ <#list reflexStockPicturesInterface.detailled_stock_list as stock> { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${stock.physical_depot_code}" - }, - "Payload": { + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${stock.physical_depot_code}" + <#else> + "ActorID": "DEP${stock.physical_depot_code}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${stock.physical_depot_code}" + <#else> + "ActorID": "DEP${stock.physical_depot_code}" + + + }, + "Payload": { <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> "Snapshot": { "EndDateTime": { - "DateTime": "${generation_date}", - "AuthorTimeZone": "${time_zone_rfx}" - }, + "DateTime": "${generation_date}", + "AuthorTimeZone": "${time_zone_rfx}" + }, + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > "ID": "${stock.physical_depot_code}-${idSnapshot}", - "MessageNb": ${sum_elt} + <#else> + "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ID": "${stock.physical_depot_code}-${idSnapshot}", + <#else> + "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", + + + "MessageNb": ${sum_elt} } - + } } <#break> - + ] diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl index deed817..882466e 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl @@ -1,4 +1,5 @@ <#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> [ <#list reflexStockPicturesInterface.detailled_stock_list as stock> { @@ -6,19 +7,45 @@ "ProjectID": "${projectRP}" }, "Payload": { - "ActorID": "${stock.physical_depot_code}", + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${stock.physical_depot_code}", + <#else> + "ActorID": "DEP${stock.physical_depot_code}", + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${stock.physical_depot_code}", + <#else> + "ActorID": "DEP${stock.physical_depot_code}", + + + <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> "Snapshot": { "DateTime": { "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - "ID": "${stock.physical_depot_code}-${idSnapshot}", - "Quantity": - { - "Value" : "${stock.quantity_in_base_lvs!"0"}", - "LVID": "${quantity_in_base_lv_RP_Cst}" - } + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ID": "${stock.physical_depot_code}-${idSnapshot}", + <#else> + "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ID": "${stock.physical_depot_code}-${idSnapshot}", + <#else> + "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", + + + + "Quantity": + { + "Value" : "${stock.quantity_in_base_lvs!"0"}", + "LVID": "${quantity_in_base_lv_RP_Cst}" + } }, "Goods": { diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 44c4c11..8869d32 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -1,13 +1,22 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "CA${carrier.carrier_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "TRA${carrier.carrier_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "CAR${carrier.carrier_code?trim?json_string}" + }, diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index 5e131c4..bccbc47 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -1,10 +1,24 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier.carrier_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "TRA${carrier.carrier_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "CAR${carrier.carrier_code?trim?json_string}" + + + }, "Payload": {} diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 9730ecd..bf287d4 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -1,14 +1,24 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "C${actor.code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "DES${actor.code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "CON${actor.code?trim?json_string}" + + }, "Payload": { diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index 6fbfb45..46b44cb 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -1,10 +1,23 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "DES${actor.code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "CON${actor.code?trim?json_string}" + + }, "Payload": {} diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 0575947..516bc26 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -29,22 +29,38 @@ <#-- Goods received Segmentation Keys inclusion --> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> }, + <#if reflexMvtStockInterface.receipt_reference!=""> "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", <#else> - <#if uniqueness?? && uniqueness!="" > - "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#else> + "ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#else> - "ExecutionflowID": "D${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#if uniqueness?? && uniqueness!="" > + "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + <#else> + "ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", + - "LineID": "${reflexMvtStockInterface.receipt_line_number}", - <#if uniqueness?? && uniqueness!="" > + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else> - "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + + "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 513f146..467ee19 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -42,11 +42,20 @@ "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, + <#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else> - "ActorID": "D${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + + + "Movement": { "DateTime": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 89ae6ba..97329af 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -1,13 +1,22 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "S${actor.code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "FOU${actor.code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "SUP${actor.code?trim?json_string}" + }, diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 6fbfb45..109bc2f 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -1,10 +1,23 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "FOU${actor.code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "SUP${actor.code?trim?json_string}" + + }, "Payload": {} diff --git a/RFXtoRP_HsrDepot_ActorDeleted.ftl b/RFXtoRP_HsrDepot_ActorDeleted.ftl index d4e070a..9523b0a 100644 --- a/RFXtoRP_HsrDepot_ActorDeleted.ftl +++ b/RFXtoRP_HsrDepot_ActorDeleted.ftl @@ -1,10 +1,24 @@ +<#include "HfRpConfig.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${depot.physical_depot_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "DEP${depot.physical_depot_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "DEP${depot.physical_depot_code?trim?json_string}" + + + }, "Payload": {} diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index 31b33f0..547813b 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -18,11 +18,20 @@ }, "Payload":{ "Carrier": { - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - "ActorID":"CA${preparationOrder.load_data.carrier_code?trim?json_string}" + "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" + + + } <#-- Add transport grade code <#if preparationOrder.transport_grade_code!=""> diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index b5e3f74..7f84b32 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -74,7 +74,7 @@ "Goods": { "ItemID": "${preparation_line.item_code?trim?json_string}", "LVBranchID": "${preparation_line.item_lv_code?json_string}", - + <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", @@ -116,7 +116,20 @@ <#else> "LineID": "${preparation_line.pro_line_number!0}", - "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}", + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}", + + + "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${despatched_ipg.quantity_lvs} diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index 7a41e47..e723198 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -18,7 +18,21 @@ }, "Payload":{ "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" + + + + } } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 107c511..37ecb2f 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -18,7 +18,19 @@ <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , "HUCarrier":{ - "ActorID": "${preparationOrder.load_data.carrier_code?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" + + } diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 1de6b02..5c73f6b 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -26,7 +26,20 @@ "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", --> "ShipFrom": { - "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" + <#else> + "ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" + <#else> + "ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}" + + + }, "ShipFromAcked": true, "ShipTo": { @@ -48,7 +61,19 @@ preparation_order.address.territorial_division_code == "" && preparation_order.address.postal_code == "" && preparation_order.address.iso_country_code == ""> - "ActorID": "${preparation_order.end_consignee_code}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.end_consignee_code}" + <#else> + "ActorID": "DES${preparation_order.end_consignee_code}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.end_consignee_code}" + <#else> + "ActorID": "CON${preparation_order.end_consignee_code}" + + <#else> "Actor": { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index d941559..e52daef 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -29,12 +29,37 @@ }, "ShipTo" : { - "ActorID": "${receipt.physical_depot_code?trim?json_string}" + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${receipt.physical_depot_code?trim?json_string}" + <#else> + "ActorID": "DEP${receipt.physical_depot_code?trim?json_string}" + + <#else> + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${receipt.physical_depot_code?trim?json_string}" + <#else> + "ActorID": "DEP${receipt.physical_depot_code?trim?json_string}" + + + }, "ShipToAcked": true, <#if receipt.carrier_informations.carrier_code != ""> - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, + <#if text_language_rfx="fr"> + <#if uniqueness?? && uniqueness!="" > + "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, + <#else> + "Carrier" : {"ActorID": "TRA${receipt.carrier_informations.carrier_code?trim?json_string}"}, + + <#else> + <#if uniqueness?? && uniqueness!="" > + "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, + <#else> + "Carrier" : {"ActorID": "CAR${receipt.carrier_informations.carrier_code?trim?json_string}"}, + + From c05a4653ba559d76c140fcd7f85335b6c95302fa Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 17 Sep 2024 10:25:53 +0200 Subject: [PATCH 033/132] modifs --- ActorPrefix.ftl | 7 ++++ ...RP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 33 +++++-------------- RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl | 26 +++------------ RFXtoRP_HsaCarrier_ActorCreated.ftl | 19 ++++------- RFXtoRP_HsaCarrier_ActorDeleted.ftl | 19 ++++------- RFXtoRP_HsaCons_ActorCreated.ftl | 19 ++++------- RFXtoRP_HsaCons_ActorDeleted.ftl | 19 ++++------- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 30 +++-------------- RFXtoRP_HsaIpgMove_StockMoved.ftl | 18 +++------- RFXtoRP_HsaSup_ActorCreated.ftl | 21 ++++-------- RFXtoRP_HsaSup_ActorDeleted.ftl | 19 ++++------- RFXtoRP_HsrDepot_ActorCreated.ftl | 17 +++------- RFXtoRP_HsrDepot_ActorDeleted.ftl | 20 ++++------- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 16 +++------ ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 17 +++------- RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl | 17 +++------- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 15 +++------ RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 30 ++++------------- ...P_HsrReceiptList_ExecutionflowDetected.ftl | 33 +++++-------------- ReflexUtils.ftl | 6 ++-- 20 files changed, 113 insertions(+), 288 deletions(-) create mode 100644 ActorPrefix.ftl diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl new file mode 100644 index 0000000..986ef01 --- /dev/null +++ b/ActorPrefix.ftl @@ -0,0 +1,7 @@ +<#-- --------------------------------------------------------------------------------------- --> +<#-- Prefix --> +<#-- --------------------------------------------------------------------------------------- --> +<#assign depot = "" > +<#assign carrier = "" > +<#assign supplier = "" > +<#assign consignee = "" > \ No newline at end of file diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index 64f5ed7..85dcd70 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -1,6 +1,6 @@ <#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> - +<#include "ActorPrefix.ftl"> [ <#list reflexStockPicturesInterface.detailled_stock_list as stock> { @@ -8,18 +8,10 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}" - <#else> - "ActorID": "DEP${stock.physical_depot_code}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}" - <#else> - "ActorID": "DEP${stock.physical_depot_code}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${stock.physical_depot_code}" + <#else> + "ActorID": "${depot}${stock.physical_depot_code}" }, "Payload": { @@ -29,18 +21,11 @@ "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ID": "${stock.physical_depot_code}-${idSnapshot}", - <#else> - "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", - + + <#if uniqueness?? && uniqueness!="" > + "ID": "${stock.physical_depot_code}-${idSnapshot}", <#else> - <#if uniqueness?? && uniqueness!="" > - "ID": "${stock.physical_depot_code}-${idSnapshot}", - <#else> - "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", - + "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}", "MessageNb": ${sum_elt} } diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl index 882466e..cd500e1 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl @@ -1,5 +1,6 @@ <#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ <#list reflexStockPicturesInterface.detailled_stock_list as stock> { @@ -7,18 +8,10 @@ "ProjectID": "${projectRP}" }, "Payload": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}", - <#else> - "ActorID": "DEP${stock.physical_depot_code}", - - <#else> <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}", - <#else> - "ActorID": "DEP${stock.physical_depot_code}", - + "ActorID": "${stock.physical_depot_code}", + <#else> + "ActorID": "${depot}${stock.physical_depot_code}", <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> @@ -27,20 +20,11 @@ "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - <#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" > "ID": "${stock.physical_depot_code}-${idSnapshot}", <#else> - "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", + "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}", - <#else> - <#if uniqueness?? && uniqueness!="" > - "ID": "${stock.physical_depot_code}-${idSnapshot}", - <#else> - "ID": "DEP${stock.physical_depot_code}-${idSnapshot}", - - - "Quantity": { "Value" : "${stock.quantity_in_base_lvs!"0"}", diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 8869d32..7cd7dd2 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -1,25 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "TRA${carrier.carrier_code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "CAR${carrier.carrier_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "${carrier}${carrier.carrier_code?trim?json_string}" }, - "Payload": { "Name": "${carrier.carrier_designation?json_string}", "ManagedStock": false, diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index bccbc47..9b8559a 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -1,24 +1,17 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "TRA${carrier.carrier_code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "CAR${carrier.carrier_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${carrier.carrier_code?trim?json_string}" + <#else> + "RefID": "${carrier}${carrier.carrier_code?trim?json_string}" - }, "Payload": {} diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index bf287d4..9cbe7e5 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -1,24 +1,17 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "DES${actor.code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "CON${actor.code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "${consignee}${actor.code?trim?json_string}" - }, "Payload": { diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index 46b44cb..4d1956d 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -1,25 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "DES${actor.code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "CON${actor.code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "${consignee}${actor.code?trim?json_string}" }, - "Payload": {} } ] diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 516bc26..f63084d 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ <#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> @@ -33,35 +34,14 @@ <#if reflexMvtStockInterface.receipt_reference!=""> "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", <#else> - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", - <#else> - "ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", - - <#else> - <#if uniqueness?? && uniqueness!="" > - "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", - <#else> - "ExecutionflowID": "DEP${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.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}", - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - + "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 467ee19..4ee24aa 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> <#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION", "200":"STOCK_MOVEMENT_TYPE_FIX", @@ -42,20 +43,11 @@ "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - - <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + <#else> + "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - "Movement": { "DateTime": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 97329af..490d254 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -1,25 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "FOU${actor.code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "SUP${actor.code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "${supplier}${actor.code?trim?json_string}" }, - "Payload": { "Name": "${actor.designation?json_string}", "ManagedStock": false, @@ -27,10 +20,8 @@ <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - <#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">, - "Address": { <#-- if Reflex WMS address is structured --> diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 109bc2f..94179b2 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -1,25 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "FOU${actor.code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "SUP${actor.code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${actor.code?trim?json_string}" + <#else> + "RefID": "${supplier}${actor.code?trim?json_string}" }, - "Payload": {} } ] diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index ecf47aa..28bbb91 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -1,25 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "DEP${depot.physical_depot_code?trim?json_string}" - - <#else> <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "DEP${depot.physical_depot_code?trim?json_string}" - + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "${depot}${depot.physical_depot_code?trim?json_string}" }, - "Payload": { "Name": "${depot.physical_depot_designation?json_string}", "ManagedStock": true, diff --git a/RFXtoRP_HsrDepot_ActorDeleted.ftl b/RFXtoRP_HsrDepot_ActorDeleted.ftl index 9523b0a..7dcb8eb 100644 --- a/RFXtoRP_HsrDepot_ActorDeleted.ftl +++ b/RFXtoRP_HsrDepot_ActorDeleted.ftl @@ -1,26 +1,18 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { "ProjectID": "${projectRP}" }, "ID": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "DEP${depot.physical_depot_code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "DEP${depot.physical_depot_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "RefID": "${depot.physical_depot_code?trim?json_string}" + <#else> + "RefID": "${depot}${depot.physical_depot_code?trim?json_string}" - }, - "Payload": {} } ] diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index 547813b..cc16cdd 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ <#assign refIDHmap_local ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> @@ -18,20 +19,11 @@ }, "Payload":{ "Carrier": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" - + "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - } <#-- Add transport grade code <#if preparationOrder.transport_grade_code!=""> diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 7f84b32..bfd6160 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -1,4 +1,6 @@ +<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> @@ -116,20 +118,11 @@ <#else> "LineID": "${preparation_line.pro_line_number!0}", - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}", - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}", - + "ActorID": "${depot}${preparationOrder.physical_depot_code?trim?json_string}", - "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${despatched_ipg.quantity_lvs} diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index e723198..de08ad2 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ <#assign refIDHmap_local ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> @@ -18,21 +19,11 @@ }, "Payload":{ "Carrier": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" - + "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - - } } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 37ecb2f..0498bbb 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ { @@ -18,18 +19,10 @@ <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , "HUCarrier":{ - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}" - + "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" } diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 5c73f6b..dc2cb46 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ { <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) /> @@ -26,20 +27,11 @@ "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", --> "ShipFrom": { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}" - + "ActorID": "${depot}${preparation_order.physical_depot_code?trim?json_string}" - }, "ShipFromAcked": true, "ShipTo": { @@ -61,18 +53,10 @@ preparation_order.address.territorial_division_code == "" && preparation_order.address.postal_code == "" && preparation_order.address.iso_country_code == ""> - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.end_consignee_code}" - <#else> - "ActorID": "DES${preparation_order.end_consignee_code}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${preparation_order.end_consignee_code}" <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.end_consignee_code}" - <#else> - "ActorID": "CON${preparation_order.end_consignee_code}" - + "ActorID": "${consignee}${preparation_order.end_consignee_code}" <#else> "Actor": diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index e52daef..3d647f8 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -1,5 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> [ { <#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) /> @@ -29,40 +30,22 @@ }, "ShipTo" : { - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${receipt.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "DEP${receipt.physical_depot_code?trim?json_string}" - - <#else> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${receipt.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "DEP${receipt.physical_depot_code?trim?json_string}" - + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${receipt.physical_depot_code?trim?json_string}" + <#else> + "ActorID": "${depot}${receipt.physical_depot_code?trim?json_string}" - }, "ShipToAcked": true, <#if receipt.carrier_informations.carrier_code != ""> - <#if text_language_rfx="fr"> - <#if uniqueness?? && uniqueness!="" > - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, - <#else> - "Carrier" : {"ActorID": "TRA${receipt.carrier_informations.carrier_code?trim?json_string}"}, - + <#if uniqueness?? && uniqueness!="" > + "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, <#else> - <#if uniqueness?? && uniqueness!="" > - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, - <#else> - "Carrier" : {"ActorID": "CAR${receipt.carrier_informations.carrier_code?trim?json_string}"}, - + "Carrier" : {"ActorID": "${carrier}${receipt.carrier_informations.carrier_code?trim?json_string}"}, - <#if receipt.line_list??> "Lines" : [ <#list receipt.line_list as line> diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index b7071f6..afa299e 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -17,14 +17,14 @@ <#function splitEmailsIntoArray emails > <#local str = "["> <#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email> -<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> -<#if str != "["> +<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> +<#if str != "["> <#local str += ","> <#local str += "\""> <#local str += email> <#local str += "\""> - + <#local str += "]"> <#return (str)> From 09ec0e450931ae23c5392596c8a033d0bccb74d9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 17 Sep 2024 11:46:24 +0200 Subject: [PATCH 034/132] modifs --- ActorPrefix.ftl | 8 ++++---- RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 9 ++------- RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl | 6 +----- RFXtoRP_HsaCarrier_ActorCreated.ftl | 4 +--- RFXtoRP_HsaCarrier_ActorDeleted.ftl | 2 +- RFXtoRP_HsaCons_ActorCreated.ftl | 2 +- RFXtoRP_HsaCons_ActorDeleted.ftl | 2 +- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 2 +- RFXtoRP_HsaIpgMove_StockMoved.ftl | 3 +-- RFXtoRP_HsaSup_ActorCreated.ftl | 2 +- RFXtoRP_HsaSup_ActorDeleted.ftl | 2 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- RFXtoRP_HsrDepot_ActorDeleted.ftl | 2 +- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 2 +- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 +- RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl | 2 +- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 +- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 4 ++-- 19 files changed, 24 insertions(+), 36 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 986ef01..9b9ee15 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -1,7 +1,7 @@ <#-- --------------------------------------------------------------------------------------- --> <#-- Prefix --> <#-- --------------------------------------------------------------------------------------- --> -<#assign depot = "" > -<#assign carrier = "" > -<#assign supplier = "" > -<#assign consignee = "" > \ No newline at end of file +<#assign prefixdepot = "" > +<#assign prefixcarrier = "" > +<#assign prefixsupplier = "" > +<#assign prefixconsignee = "" > \ No newline at end of file diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index 85dcd70..806ce6c 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -11,7 +11,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${stock.physical_depot_code}" <#else> - "ActorID": "${depot}${stock.physical_depot_code}" + "ActorID": "${prefixdepot}${stock.physical_depot_code}" }, "Payload": { @@ -21,12 +21,7 @@ "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - - <#if uniqueness?? && uniqueness!="" > - "ID": "${stock.physical_depot_code}-${idSnapshot}", - <#else> - "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}", - + "ID": "${stock.physical_depot_code}-${idSnapshot}", "MessageNb": ${sum_elt} } diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl index cd500e1..27775b7 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl @@ -11,7 +11,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${stock.physical_depot_code}", <#else> - "ActorID": "${depot}${stock.physical_depot_code}", + "ActorID": "${prefixdepot}${stock.physical_depot_code}", <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> @@ -20,11 +20,7 @@ "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - <#if uniqueness?? && uniqueness!="" > "ID": "${stock.physical_depot_code}-${idSnapshot}", - <#else> - "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}", - "Quantity": { "Value" : "${stock.quantity_in_base_lvs!"0"}", diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 7cd7dd2..a1fa2d3 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${carrier.carrier_code?trim?json_string}" <#else> - "RefID": "${carrier}${carrier.carrier_code?trim?json_string}" + "RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}" }, "Payload": { @@ -23,8 +23,6 @@ <#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">, - - "Address": { <#-- if Reflex WMS address is structured --> diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index 9b8559a..89a3c3f 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${carrier.carrier_code?trim?json_string}" <#else> - "RefID": "${carrier}${carrier.carrier_code?trim?json_string}" + "RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}" }, diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 9cbe7e5..f342a4e 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}" <#else> - "RefID": "${consignee}${actor.code?trim?json_string}" + "RefID": "${prefixconsignee}${actor.code?trim?json_string}" }, diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index 4d1956d..f314e77 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}" <#else> - "RefID": "${consignee}${actor.code?trim?json_string}" + "RefID": "${prefixconsignee}${actor.code?trim?json_string}" }, "Payload": {} diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index f63084d..cd36940 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -40,7 +40,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else> - "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 4ee24aa..87d78b7 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -22,7 +22,6 @@ }> <#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> - [ { "Header": { @@ -46,7 +45,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else> - "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", + "ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "Movement": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 490d254..16c2f84 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}" <#else> - "RefID": "${supplier}${actor.code?trim?json_string}" + "RefID": "${prefixsupplier}${actor.code?trim?json_string}" }, "Payload": { diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 94179b2..e4745a1 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}" <#else> - "RefID": "${supplier}${actor.code?trim?json_string}" + "RefID": "${prefixsupplier}${actor.code?trim?json_string}" }, "Payload": {} diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 28bbb91..56f93f7 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> - "RefID": "${depot}${depot.physical_depot_code?trim?json_string}" + "RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}" }, "Payload": { diff --git a/RFXtoRP_HsrDepot_ActorDeleted.ftl b/RFXtoRP_HsrDepot_ActorDeleted.ftl index 7dcb8eb..d08aa72 100644 --- a/RFXtoRP_HsrDepot_ActorDeleted.ftl +++ b/RFXtoRP_HsrDepot_ActorDeleted.ftl @@ -10,7 +10,7 @@ <#if uniqueness?? && uniqueness!="" > "RefID": "${depot.physical_depot_code?trim?json_string}" <#else> - "RefID": "${depot}${depot.physical_depot_code?trim?json_string}" + "RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}" }, "Payload": {} diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index cc16cdd..daf74db 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -22,7 +22,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" + "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" } <#-- Add transport grade code diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index bfd6160..cb1141c 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -121,7 +121,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", <#else> - "ActorID": "${depot}${preparationOrder.physical_depot_code?trim?json_string}", + "ActorID": "${prefixdepot}${preparationOrder.physical_depot_code?trim?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index de08ad2..905c839 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -22,7 +22,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" + "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 0498bbb..cdcd4d0 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -22,7 +22,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" <#else> - "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}" + "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" } diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index dc2cb46..602af26 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -30,7 +30,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" <#else> - "ActorID": "${depot}${preparation_order.physical_depot_code?trim?json_string}" + "ActorID": "${prefixdepot}${preparation_order.physical_depot_code?trim?json_string}" }, "ShipFromAcked": true, diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 3d647f8..10ce9e5 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -33,7 +33,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${receipt.physical_depot_code?trim?json_string}" <#else> - "ActorID": "${depot}${receipt.physical_depot_code?trim?json_string}" + "ActorID": "${prefixdepot}${receipt.physical_depot_code?trim?json_string}" }, "ShipToAcked": true, @@ -42,7 +42,7 @@ <#if uniqueness?? && uniqueness!="" > "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, <#else> - "Carrier" : {"ActorID": "${carrier}${receipt.carrier_informations.carrier_code?trim?json_string}"}, + "Carrier" : {"ActorID": "${prefixcarrier}${receipt.carrier_informations.carrier_code?trim?json_string}"}, From 80a34b354d2b04e7eb1ef18f0ae1d46719b81e1d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 17 Sep 2024 16:28:49 +0200 Subject: [PATCH 035/132] modifs --- RFXtoRP_HsaDispute_Created.ftl | 4 ++-- RFXtoRP_HsaDispute_MessageSent.ftl | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 RFXtoRP_HsaDispute_MessageSent.ftl diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index d54cafe..1c1e808 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -8,10 +8,10 @@ }, "ID": { <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl new file mode 100644 index 0000000..dae7fde --- /dev/null +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -0,0 +1,23 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + + + }, + "Payload": { + + "Message": "${dispute.dispute_reference?trim?json_string}${dispute.dispute_reference?trim?json_string}" + + } + } +] \ No newline at end of file From 307ae9ebe26437abdc5dde94f895b7e1c1538c85 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 17 Sep 2024 17:29:04 +0200 Subject: [PATCH 036/132] modifs --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 602af26..fa423bb 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -56,7 +56,7 @@ <#if uniqueness?? && uniqueness!="" > "ActorID": "${preparation_order.end_consignee_code}" <#else> - "ActorID": "${consignee}${preparation_order.end_consignee_code}" + "ActorID": "${prefixconsignee}${preparation_order.end_consignee_code}" <#else> "Actor": From 360c0743bc558cc5062ce5eeb13f58c837a4465b Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 20 Sep 2024 17:22:27 +0200 Subject: [PATCH 037/132] SCPN1-7088 --- RFXtoRP_PlatformLogCreate.ftl | 15 +++-- RFXtoRP_RestResponse.ftl | 76 ++++++++++++++++++++++--- RFXtoRP_RestResponseAllocationError.ftl | 2 +- 3 files changed, 77 insertions(+), 16 deletions(-) diff --git a/RFXtoRP_PlatformLogCreate.ftl b/RFXtoRP_PlatformLogCreate.ftl index 9e657f1..f48b2b9 100644 --- a/RFXtoRP_PlatformLogCreate.ftl +++ b/RFXtoRP_PlatformLogCreate.ftl @@ -22,22 +22,21 @@ "AuthorTimeZone": "${time_zone_rfx}" }, "TechMessage": { - "Code": "${restResponsetMsg.status}", + "Code": "${restResponsetMsg.status!"no Code"}", "Label": ${strJsonBody} }, "UserMessage": { - "Code": "${restResponsetMsg.status}", + "Code": "${restResponsetMsg.status!"no Code"}", "Label": ${strJsonBody}, "Params": [] }, "DetailElements": [], - "CorrelationID": "${id.correlationid}", - "ContextPayload": "rfxresponse", + "CorrelationID": "${id.correlationid!"no Correlationid"}", + "ContextPayload": ${strJsonBody}, "Type": "RP_EXECUTIONFLOW_EVENT", - "Task": "${id.apiRestReflexID}", - "OriginalID": "${id.refid?trim?json_string}", + "Task": "${id.apiRestReflexID!"no Task"}", + "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}", "StackTrace": "" } } -] - +] \ No newline at end of file diff --git a/RFXtoRP_RestResponse.ftl b/RFXtoRP_RestResponse.ftl index 69983ef..489cedb 100644 --- a/RFXtoRP_RestResponse.ftl +++ b/RFXtoRP_RestResponse.ftl @@ -4,16 +4,57 @@ <#-- organisation : organisationtId in ReflexPlatform --> <#assign restResponsetMsg = JsonUtil.jsonToMap(input)> -<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)> +<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")> <#assign projectRP = project> <#assign organisationRP = organisation> <#assign aDateTime = .now> +<#assign no_apiRestReflexID = "no apiRestReflexID"> +<#assign no_status = -99999> -<#switch id.apiRestReflexID> + +<#switch id.apiRestReflexID!no_apiRestReflexID> + <#case no_apiRestReflexID> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + } + ] + <#break> + <#case "preparation_orders_post"> - <#switch restResponsetMsg.status> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> @@ -63,7 +104,7 @@ <#if restResponsetMsg.body?? > <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#else> - <#assign restResponseBody = "{}" /> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" /> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -81,7 +122,29 @@ <#break> <#case "receipts_post"> - <#switch restResponsetMsg.status> + <#switch restResponsetMsg.status!no_status> + <#case no_status> + [ + { + <#if restResponsetMsg.body?? > + <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> + <#else> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> + + <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_PlatformLogCreate.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_RestResponseAllocationError.ftl"> + } + ] + <#break> + <#case 200> <#case 201> <#-- *********************************************** ApiRestID = receipts_post ******************** --> @@ -121,7 +184,7 @@ <#if restResponsetMsg.body?? > <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#else> - <#assign restResponseBody = "{}" /> + <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" /> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -137,7 +200,6 @@ ] <#break> - <#default> <#stop> diff --git a/RFXtoRP_RestResponseAllocationError.ftl b/RFXtoRP_RestResponseAllocationError.ftl index 56626f1..1a31357 100644 --- a/RFXtoRP_RestResponseAllocationError.ftl +++ b/RFXtoRP_RestResponseAllocationError.ftl @@ -7,7 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${id.refid?trim?json_string}", + "RefID": "${id.refid!"no RefID"?trim?json_string}", "RefDate": { "DateTime": "${aDateTime?iso_utc}", "AuthorTimeZone": "${time_zone_rfx}" From aba22026bb723aa4c5c186fcdc2c55638bd2ddf2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 26 Sep 2024 15:58:04 +0200 Subject: [PATCH 038/132] date tracking --- RFXtoRP_HsaDispute.ftl | 21 +++++++++++++++++ RFXtoRP_HsaDispute_Created.ftl | 2 +- RFXtoRP_HsaDispute_MessageSent.ftl | 8 ++++++- RFXtoRP_HsaDispute_MessageSent2.ftl | 23 +++++++++++++++++++ RFXtoRP_HsaDispute_MessageSent3.ftl | 23 +++++++++++++++++++ ...saDispute_TableReasonCodeToClaimTypeID.ftl | 10 ++++---- 6 files changed, 80 insertions(+), 7 deletions(-) create mode 100644 RFXtoRP_HsaDispute_MessageSent2.ftl create mode 100644 RFXtoRP_HsaDispute_MessageSent3.ftl diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index b2a538b..aa2c627 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -22,6 +22,27 @@ "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaDispute_Created.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaDispute_MessageSent.ftl"> + } + <#if dispute.dispute_item??> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaDispute_MessageSent2.ftl"> + } + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaDispute_MessageSent3.ftl"> } <#else> <#stop> diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 1c1e808..5986e97 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -45,7 +45,7 @@ <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" + "ClaimTypeID":"CLAIMTYPE_${projectRP}_${TableReasonCode[dispute.dispute_reason_code]}" <#else> <#stop "Claim reason code not supported" > diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index dae7fde..4bd8534 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -16,7 +16,13 @@ }, "Payload": { - "Message": "${dispute.dispute_reference?trim?json_string}${dispute.dispute_reference?trim?json_string}" + <#if dispute.dispute_preparation??> + "Message": "Reference : ${dispute.dispute_reference?trim?json_string}" + <#else> + <#if dispute.dispute_reception??> + "Message": "Reference : ${dispute.dispute_reception.reception_reference?trim?json_string}" + + } } diff --git a/RFXtoRP_HsaDispute_MessageSent2.ftl b/RFXtoRP_HsaDispute_MessageSent2.ftl new file mode 100644 index 0000000..4f14b46 --- /dev/null +++ b/RFXtoRP_HsaDispute_MessageSent2.ftl @@ -0,0 +1,23 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + + + }, + "Payload": { + + "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string} - Quantity : ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_MessageSent3.ftl b/RFXtoRP_HsaDispute_MessageSent3.ftl new file mode 100644 index 0000000..f95882c --- /dev/null +++ b/RFXtoRP_HsaDispute_MessageSent3.ftl @@ -0,0 +1,23 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + + + }, + "Payload": { + + "Message": "Description : ${dispute.dispute_description?trim?json_string}" + + } + } +] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl index b952692..b1fd7d7 100644 --- a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl +++ b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl @@ -1,11 +1,11 @@ <#-- Specify table for reason code --> <#-- Table example for reason code to claim type ID --> <#-- <#assign TableReasonCode = { - "001":"CLAIMTYPE_${projectRP}_ORDER_Delay", - "M1":"CLAIMTYPE_${projectRP}_ORDER_casse", - "XXX":"CLAIMTYPE_${projectRP}_ACTOR_claimtype", - "XXX":"CLAIMTYPE_${projectRP}_HANDLINGUNIT_claimtype", - "XXX":"CLAIMTYPE_${projectRP}_MOVEMENT_claimtype" + "001":"ORDER_Delay", + "M1":"ORDER_casse", + "XXX":"ACTOR_claimtype", + "XXX":"HANDLINGUNIT_claimtype", + "XXX":"MOVEMENT_claimtype" }/>--> From e2c0735dc790ccbdbc53f034ce4fe902574155d8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 26 Sep 2024 15:58:37 +0200 Subject: [PATCH 039/132] modifs --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index cdcd4d0..7ca57d5 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -2,13 +2,16 @@ <#include "ReflexUtils.ftl"> <#include "ActorPrefix.ftl"> [ - +<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> { "Header": { "ProjectID": "${projectRP}" }, "ID": { "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}" + "RefDate": { + "DateTime": "${dispatched_datetime4}", + "AuthorTimeZone": "${time_zone_rfx}" }, "Payload": { <#if despatched_ipg.carton_number != "000000000000000000"> From 9524923f0c6104e20060360f1c63e0cf3889da28 Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 27 Sep 2024 10:08:36 +0200 Subject: [PATCH 040/132] SCPN1-7265 --- RFXtoRP_HsaLstAppSta.ftl | 40 +++++++++++++++++++++++++++++++++++++++ RFXtoRP_HsrCarrierApt.ftl | 40 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 RFXtoRP_HsaLstAppSta.ftl create mode 100644 RFXtoRP_HsrCarrierApt.ftl diff --git a/RFXtoRP_HsaLstAppSta.ftl b/RFXtoRP_HsaLstAppSta.ftl new file mode 100644 index 0000000..8b00fd7 --- /dev/null +++ b/RFXtoRP_HsaLstAppSta.ftl @@ -0,0 +1,40 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#stop> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE *************************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#default> + <#stop "event not supported"> + \ No newline at end of file diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl new file mode 100644 index 0000000..8b00fd7 --- /dev/null +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -0,0 +1,40 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#stop> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE *************************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#default> + <#stop "event not supported"> + \ No newline at end of file From e53e4ec9a0b768277cddad25e5a3e9cfe672fb94 Mon Sep 17 00:00:00 2001 From: frea Date: Mon, 30 Sep 2024 12:05:38 +0200 Subject: [PATCH 041/132] SCPN1-7265 --- RFXtoRP_HsaLstAppSta.ftl => RFXtoRP_HsaLstCarSta.ftl | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename RFXtoRP_HsaLstAppSta.ftl => RFXtoRP_HsaLstCarSta.ftl (100%) diff --git a/RFXtoRP_HsaLstAppSta.ftl b/RFXtoRP_HsaLstCarSta.ftl similarity index 100% rename from RFXtoRP_HsaLstAppSta.ftl rename to RFXtoRP_HsaLstCarSta.ftl From 10bb90bf92fbcb246cbdf7fbaa730faac066b4ce Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 30 Sep 2024 15:19:24 +0200 Subject: [PATCH 042/132] modifs --- ActorPrefix.ftl | 2 +- RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl | 4 +--- RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl | 7 +++---- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 9b9ee15..700f29c 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -1,5 +1,5 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Prefix --> +<#-- Prefix 3 cars --> <#-- --------------------------------------------------------------------------------------- --> <#assign prefixdepot = "" > <#assign prefixcarrier = "" > diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl index 22d1c4d..9f6c877 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl @@ -2,8 +2,6 @@ <#-- "MetaData" :[ - - ] - +] --> "MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl index e3a46d3..0d28cf4 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl @@ -15,7 +15,7 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${despatched_ipg.batch_number}"} - + }, { "Key": "HeldForSpecificCode", @@ -24,15 +24,14 @@ <#else> "Value": { "Bool" : "False"} }, - { - <#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_date}" } - } + } ] From e97066c11855da2653639f2a3f18dd479c0d1265 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 30 Sep 2024 15:28:24 +0200 Subject: [PATCH 043/132] modifs labelled --- RFXtoRP_HsrPrepa.ftl | 20 +++++++++----------- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 11 ++++++++++- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index f7834cc..cb75707 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -53,17 +53,15 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> - <#if despatched_ipg.consignment_unit_id!=""> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? > - <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> - } - + <#if !hd_numberHmap[despatched_ipg.hd_number]?? > + <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> + } <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 7ca57d5..2603453 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -8,7 +8,16 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}" + <#if despatched_ipg.consignment_unit_id!=""> + "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}" + <#else> + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID":"${despatched_ipg.carton_number}" + <#else> + "RefID":"${despatched_ipg.hd_number}" + + + "RefDate": { "DateTime": "${dispatched_datetime4}", "AuthorTimeZone": "${time_zone_rfx}" From 6400c985a251ca31ec53e0f6ae91a02ddaa365bc Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 30 Sep 2024 16:59:22 +0200 Subject: [PATCH 044/132] message --- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 10ce9e5..4288f80 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -26,7 +26,12 @@ "ShipFrom": { - "ActorID": "${receipt.original_code?trim?json_string}" + <#if uniqueness?? && uniqueness!="" > + "ActorID": "${receipt.original_code?trim?json_string}" + <#else> + "ActorID": "${prefixsupplier}${receipt.original_code?trim?json_string}" + + }, "ShipTo" : { From 49b2f6e17a2e7647770878de115707b080a5bee7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 1 Oct 2024 10:07:43 +0200 Subject: [PATCH 045/132] modifs --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 2603453..468f12e 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -9,12 +9,12 @@ }, "ID": { <#if despatched_ipg.consignment_unit_id!=""> - "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}" + "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", <#else> <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID":"${despatched_ipg.carton_number}" + "RefID":"${despatched_ipg.carton_number}", <#else> - "RefID":"${despatched_ipg.hd_number}" + "RefID":"${despatched_ipg.hd_number}", From 134e44185addc10ebdb5fe11acbe17865e17e981 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 1 Oct 2024 10:12:12 +0200 Subject: [PATCH 046/132] modifs --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 468f12e..ba15a61 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -21,6 +21,7 @@ "RefDate": { "DateTime": "${dispatched_datetime4}", "AuthorTimeZone": "${time_zone_rfx}" + } }, "Payload": { <#if despatched_ipg.carton_number != "000000000000000000"> From 7c1b05d76e96fdb8ba3626012daf249a8bd0e422 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 1 Oct 2024 11:07:39 +0200 Subject: [PATCH 047/132] modifs --- RFXtoRP_HsrPrepa.ftl | 12 +++++++ ...RP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl | 36 +++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index cb75707..85deef4 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -50,6 +50,7 @@ <#assign refIDHmap ={}> <#assign hd_numberHmap ={}> + <#assign hd_numberHmapHUadded ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> @@ -77,6 +78,17 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> } + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? > + <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl"> + } + + diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl new file mode 100644 index 0000000..767f8ab --- /dev/null +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl @@ -0,0 +1,36 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +<#include "ActorPrefix.ftl"> +[ +<#assign dispatched_datetime5 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID":"${despatched_ipg.hd_number}", + "RefDate": { + "DateTime": "${dispatched_datetime5}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { + <#if despatched_ipg.carton_number != "000000000000000000"> + "HandlingunitID": "${despatched_ipg.carton_number}" + <#else> + "HandlingunitID": "${despatched_ipg.hd_number}" + + <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > + , + "HUCarrier":{ + <#if uniqueness?? && uniqueness!="" > + "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" + <#else> + "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" + + } + + + } + } +] \ No newline at end of file From 3a9f26cef20f7650ca2691210591daf227c1922f Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 1 Oct 2024 11:25:06 +0200 Subject: [PATCH 048/132] modifs --- RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl index 767f8ab..af5278a 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl @@ -15,11 +15,9 @@ } }, "Payload": { - <#if despatched_ipg.carton_number != "000000000000000000"> - "HandlingunitID": "${despatched_ipg.carton_number}" - <#else> + "HandlingunitID": "${despatched_ipg.hd_number}" - + <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , "HUCarrier":{ From 25011e68e69e6f0c1758d8e516e418e959deeb05 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 3 Oct 2024 14:46:45 +0200 Subject: [PATCH 049/132] modifs --- RPtoRFX_PrepOrder.ftl | 2 +- RPtoRFX_Receipt.ftl | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index a33d6d5..0f18d90 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -89,7 +89,7 @@ "owner_code_to_prepare" :"${owner_code_to_prepare}", "grade_code_to_prepare" :"${grade_code_to_prepare}", "input_order_data": "false", - "batch_1": "${batch_1}", + "batch_1": "${batch_1?json_string}", "base_lv_quantity": "true", "any_lv": "false" <#-- diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 80eafaa..838293a 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -9,16 +9,16 @@ "physical_depot_code": "${executionflow.ShipTo.ActorID!""}", "originator_code": "${originator_code}" }, - "payload" : + "payload" : { "receipt_reference": "${executionflow.OrderID?json_string}", "receipt_type": "${receipt_type}", - "receipt_reason_code": "${receipt_reason_code}", + "receipt_reason_code": "${receipt_reason_code}", "work_mode_code" : "${work_mode_code}", "original_code" : "${executionflow.ShipFrom.ActorID}", "carrier_code" : "${executionflow.Carrier.ActorID!""}", - <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> + <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> "receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", <#else> "receipt_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", @@ -26,8 +26,8 @@ "carrier_appointment_made": "false", "receipt_in_cross_docking": "false", "dock_occupation_duration": 1 - - <#if executionflow.Lines??> + + <#if executionflow.Lines??> , "line_list": [ <#list executionflow.Lines as line> @@ -47,7 +47,7 @@ "level_1_quantity": ${line.RequestedMetrics.QuantityInBaseLV.Value!0}, "owner_code": "${owner_code}", "grade_code": "${grade_code}", - "batch_1": "${batch_1!""}", + "batch_1": "${batch_1?json_string!""}", "optional_attributes": { <#--"held_for_check": "false", "held _for_repacking": "false", @@ -60,8 +60,8 @@ } --> }<#sep>, - + ] - + } } From 65601133f1b6fc3212213c17a73a1962ff2e4511 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 7 Oct 2024 14:52:28 +0200 Subject: [PATCH 050/132] =?UTF-8?q?unicit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActorPrefix.ftl | 129 +++++++++++++++++- ...RP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 6 +- RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl | 7 +- RFXtoRP_HsaCarrier_ActorCreated.ftl | 6 +- RFXtoRP_HsaCarrier_ActorDeleted.ftl | 7 +- RFXtoRP_HsaCons_ActorCreated.ftl | 7 +- RFXtoRP_HsaCons_ActorDeleted.ftl | 6 +- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 6 +- RFXtoRP_HsaIpgMove_StockMoved.ftl | 6 +- RFXtoRP_HsaSup_ActorCreated.ftl | 6 +- RFXtoRP_HsaSup_ActorDeleted.ftl | 6 +- RFXtoRP_HsrDepot_ActorCreated.ftl | 6 +- RFXtoRP_HsrDepot_ActorDeleted.ftl | 6 +- RFXtoRP_HsrPrepa_CarrierUpdated.ftl | 6 +- ...oRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 13 +- RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl | 6 +- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 9 +- ...RP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl | 19 +-- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 16 +-- ...P_HsrReceiptList_ExecutionflowDetected.ftl | 19 +-- 20 files changed, 155 insertions(+), 137 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 700f29c..d177857 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -1,7 +1,126 @@ <#-- --------------------------------------------------------------------------------------- --> -<#-- Prefix 3 cars --> +<#-- Actor Prefix 4 cars --> <#-- --------------------------------------------------------------------------------------- --> -<#assign prefixdepot = "" > -<#assign prefixcarrier = "" > -<#assign prefixsupplier = "" > -<#assign prefixconsignee = "" > \ No newline at end of file + +<#-- For Depot --> +<#function RFXtoRPprefixDepot depot> + <#if uniqueness?? && uniqueness!="" > + <#local actor = depot> + <#else> + <#if text_language_rfx ="fr"> + <#local actor = "DEP_"+depot> + <#else> + <#if text_language_rfx ="it"> + <#local actor = "DEP_"+depot> + <#else> + <#if text_language_rfx ="es"> + <#local actor = "DEP_"+depot> + <#else> + <#if text_language_rfx ="pl"> + <#local actor = "MAG_"+depot> + <#else> + <#if text_language_rfx ="nl"> + <#local actor = "DEP_"+depot> + <#else> + <#local actor = "DEP_"+depot> + + + + + + +<#return (actor)> + + +<#-- For Supplier --> +<#function RFXtoRPprefixSupplier supplier> + <#if uniqueness?? && uniqueness!="" > + <#local actor = supplier> + <#else> + <#if text_language_rfx ="fr"> + <#local actor = "FOU_"+supplier> + <#else> + <#if text_language_rfx ="it"> + <#local actor = "FOR_"+supplier> + <#else> + <#if text_language_rfx ="es"> + <#local actor = "PRO_"+supplier> + <#else> + <#if text_language_rfx ="pl"> + <#local actor = "DOS_"+supplier> + <#else> + <#if text_language_rfx ="nl"> + <#local actor = "LEV_"+supplier> + <#else> + <#local actor = "SUP_"+supplier> + + + + + + +<#return (actor)> + + + +<#-- For Carrier --> +<#function RFXtoRPprefixCarrier carrier> + <#if uniqueness?? && uniqueness!="" > + <#local actor = carrier> + <#else> + <#if text_language_rfx ="fr"> + <#local actor = "TRA_"+carrier> + <#else> + <#if text_language_rfx ="it"> + <#local actor = "VET_"+carrier> + <#else> + <#if text_language_rfx ="es"> + <#local actor = "TRA_"+carrier> + <#else> + <#if text_language_rfx ="pl"> + <#local actor = "PRZ_"+carrier> + <#else> + <#if text_language_rfx ="nl"> + <#local actor = "VER_"+carrier> + <#else> + <#local actor = "CAR_"+carrier> + + + + + + +<#return (actor)> + + + +<#-- For Consignee --> +<#function RFXtoRPprefixConsignee consignee> + <#if uniqueness?? && uniqueness!="" > + <#local actor = consignee> + <#else> + <#if text_language_rfx ="fr"> + <#local actor = "DES_"+consignee> + <#else> + <#if text_language_rfx ="it"> + <#local actor = "DES_"+consignee> + <#else> + <#if text_language_rfx ="es"> + <#local actor = "DES_"+consignee> + <#else> + <#if text_language_rfx ="pl"> + <#local actor = "ODB_"+consignee> + <#else> + <#if text_language_rfx ="nl"> + <#local actor = "ONT_"+consignee> + <#else> + <#local actor = "CON_"+consignee> + + + + + + +<#return (actor)> + + diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index 806ce6c..23e9a4e 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -8,11 +8,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}" - <#else> - "ActorID": "${prefixdepot}${stock.physical_depot_code}" - + "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}" }, "Payload": { <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl index 27775b7..fcf0f0c 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl @@ -8,12 +8,7 @@ "ProjectID": "${projectRP}" }, "Payload": { - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${stock.physical_depot_code}", - <#else> - "ActorID": "${prefixdepot}${stock.physical_depot_code}", - - + "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}", <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> "Snapshot": { "DateTime": { diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index a1fa2d3..8ac9722 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}" - + "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}" }, "Payload": { "Name": "${carrier.carrier_designation?json_string}", diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index 89a3c3f..62b69a2 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -7,13 +7,8 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${carrier.carrier_code?trim?json_string}" - <#else> - "RefID": "${prefixcarrier}${carrier.carrier_code?trim?json_string}" - + "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}" }, - "Payload": {} } ] diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index f342a4e..84df17a 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -7,13 +7,8 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "${prefixconsignee}${actor.code?trim?json_string}" - + "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}" }, - "Payload": { "Name": "${actor.designation?json_string}", "ManagedStock": false, diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index f314e77..89d4fce 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "${prefixconsignee}${actor.code?trim?json_string}" - + "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}" }, "Payload": {} } diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index cd36940..fdc74b4 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -37,11 +37,7 @@ "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}", - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - + "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 87d78b7..36b1f0e 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -42,11 +42,7 @@ "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "${prefixdepot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}", - + "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}", "Movement": { "DateTime": { diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 16c2f84..23a560c 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "${prefixsupplier}${actor.code?trim?json_string}" - + "RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}" }, "Payload": { "Name": "${actor.designation?json_string}", diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index e4745a1..9c00b09 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${actor.code?trim?json_string}" - <#else> - "RefID": "${prefixsupplier}${actor.code?trim?json_string}" - + "RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}" }, "Payload": {} } diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 56f93f7..3bac4c9 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}" - + "RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}" }, "Payload": { "Name": "${depot.physical_depot_designation?json_string}", diff --git a/RFXtoRP_HsrDepot_ActorDeleted.ftl b/RFXtoRP_HsrDepot_ActorDeleted.ftl index d08aa72..2f59741 100644 --- a/RFXtoRP_HsrDepot_ActorDeleted.ftl +++ b/RFXtoRP_HsrDepot_ActorDeleted.ftl @@ -7,11 +7,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if uniqueness?? && uniqueness!="" > - "RefID": "${depot.physical_depot_code?trim?json_string}" - <#else> - "RefID": "${prefixdepot}${depot.physical_depot_code?trim?json_string}" - + "RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}" }, "Payload": {} } diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index daf74db..112037e 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -19,11 +19,7 @@ }, "Payload":{ "Carrier": { - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - + "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}" } <#-- Add transport grade code <#if preparationOrder.transport_grade_code!=""> diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index cb1141c..a8ff88b 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -118,20 +118,15 @@ <#else> "LineID": "${preparation_line.pro_line_number!0}", - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", - <#else> - "ActorID": "${prefixdepot}${preparationOrder.physical_depot_code?trim?json_string}", - - "Quantity": { - "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${despatched_ipg.quantity_lvs} + "ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}", + "Quantity": { + "LVID": "${quantity_in_base_lv_RP_Cst}", + "Value": ${despatched_ipg.quantity_lvs} } } ] } - }<#sep>, <#sep>, diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index 905c839..96a5905 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -19,11 +19,7 @@ }, "Payload":{ "Carrier": { - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - + "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}" } } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index ba15a61..de29490 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -32,13 +32,8 @@ <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , "HUCarrier":{ - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - - } - + "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}" + } } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl index af5278a..f6c8deb 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl @@ -15,20 +15,13 @@ } }, "Payload": { - "HandlingunitID": "${despatched_ipg.hd_number}" - - <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > - , - "HUCarrier":{ - <#if uniqueness?? && uniqueness!="" > - "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" - <#else> - "ActorID":"${prefixcarrier}${preparationOrder.load_data.carrier_code?trim?json_string}" - - } - - + <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > + , + "HUCarrier":{ + "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}" + } + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index fa423bb..e55ef72 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -27,11 +27,7 @@ "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", --> "ShipFrom": { - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "${prefixdepot}${preparation_order.physical_depot_code?trim?json_string}" - + "ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}" }, "ShipFromAcked": true, "ShipTo": { @@ -53,11 +49,7 @@ preparation_order.address.territorial_division_code == "" && preparation_order.address.postal_code == "" && preparation_order.address.iso_country_code == ""> - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${preparation_order.end_consignee_code}" - <#else> - "ActorID": "${prefixconsignee}${preparation_order.end_consignee_code}" - + "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code)}" <#else> "Actor": { @@ -93,7 +85,6 @@ <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, - "RequestedContent": { "Goods": @@ -104,10 +95,8 @@ <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${forced_priority_date}", - <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> - }, "Quantity" : { @@ -119,7 +108,6 @@ ], - "RequestedMilestones" : { "RequestedDeliveryDateTime" : diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 4288f80..e1763ed 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -26,29 +26,16 @@ "ShipFrom": { - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${receipt.original_code?trim?json_string}" - <#else> - "ActorID": "${prefixsupplier}${receipt.original_code?trim?json_string}" - - + "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}" }, "ShipTo" : { - <#if uniqueness?? && uniqueness!="" > - "ActorID": "${receipt.physical_depot_code?trim?json_string}" - <#else> - "ActorID": "${prefixdepot}${receipt.physical_depot_code?trim?json_string}" - + "ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}" }, "ShipToAcked": true, <#if receipt.carrier_informations.carrier_code != ""> - <#if uniqueness?? && uniqueness!="" > - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"}, - <#else> - "Carrier" : {"ActorID": "${prefixcarrier}${receipt.carrier_informations.carrier_code?trim?json_string}"}, - + "Carrier": "${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}", <#if receipt.line_list??> From 153df99ed1ed656eac710964f4065aba659cb659 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 8 Oct 2024 09:25:04 +0200 Subject: [PATCH 051/132] modifs --- RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 2 +- RFXtoRP_HsaDispute_Created.ftl | 12 ++++++++---- RFXtoRP_HsaDispute_MessageSent.ftl | 6 +++--- RFXtoRP_HsaDispute_MessageSent2.ftl | 13 ++++++++----- RFXtoRP_HsaDispute_MessageSent3.ftl | 6 +++--- 5 files changed, 23 insertions(+), 16 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index 23e9a4e..e248350 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -8,7 +8,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}" + "RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}" }, "Payload": { <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 5986e97..c0c9366 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -8,15 +8,14 @@ }, "ID": { <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" }, "Payload": { - <#if dispute.dispute_reference?? && dispute.dispute_reference!=""> "Title":"${dispute.dispute_reference?trim?json_string}", <#else> @@ -27,6 +26,8 @@ <#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) /> <#if isCurrencyCode> "Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}", + <#--<#elseif isCurrencyCode!> + "Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",--> <#else> "Currency" : "XXX", @@ -53,4 +54,7 @@ } } -] \ No newline at end of file +] + + + diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 4bd8534..58d430f 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -6,11 +6,11 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" }, diff --git a/RFXtoRP_HsaDispute_MessageSent2.ftl b/RFXtoRP_HsaDispute_MessageSent2.ftl index 4f14b46..801b503 100644 --- a/RFXtoRP_HsaDispute_MessageSent2.ftl +++ b/RFXtoRP_HsaDispute_MessageSent2.ftl @@ -6,18 +6,21 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" }, "Payload": { - "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string} - Quantity : ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" - + <#if dispute.dispute_quantity!=0> + "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string} - Quantity : ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + <#else> + "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string}" + } } ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_MessageSent3.ftl b/RFXtoRP_HsaDispute_MessageSent3.ftl index f95882c..0965eac 100644 --- a/RFXtoRP_HsaDispute_MessageSent3.ftl +++ b/RFXtoRP_HsaDispute_MessageSent3.ftl @@ -6,11 +6,11 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" }, From ed8aff1e3c8f36e61dbb98ac2bd0a6a12ec08e22 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 8 Oct 2024 10:00:14 +0200 Subject: [PATCH 052/132] SCPN1-7052 --- ActorPrefix.ftl | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index d177857..db6b023 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -32,6 +32,17 @@ <#return (actor)> +<#function RPtoRFXprefixDepot actor> + <#if uniqueness?? && uniqueness!="" > + <#local depot = actor> + <#else> + <#local depot = actor[4..]> + +<#return (depot)> + + + + <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> <#if uniqueness?? && uniqueness!="" > @@ -62,6 +73,14 @@ <#return (actor)> +<#function RPtoRFXprefixSupplier actor> + <#if uniqueness?? && uniqueness!="" > + <#local supplier = actor> + <#else> + <#local supplier = actor[4..]> + +<#return (supplier)> + <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> @@ -93,6 +112,14 @@ <#return (actor)> +<#function RPtoRFXprefixCarrier actor> + <#if uniqueness?? && uniqueness!="" > + <#local carrier = actor> + <#else> + <#local carrier = actor[4..]> + +<#return (carrier)> + <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> @@ -124,3 +151,11 @@ <#return (actor)> +<#function RPtoRFXprefixConsignee actor> + <#if uniqueness?? && uniqueness!="" > + <#local consignee = actor> + <#else> + <#local consignee = actor[4..]> + +<#return (consignee)> + \ No newline at end of file From 81720b254733d701ab3c6cb37b315b9b9073676a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 8 Oct 2024 10:20:15 +0200 Subject: [PATCH 053/132] modifs --- RPtoRFX_PrepOrder.ftl | 2 +- RPtoRFX_Receipt.ftl | 6 +++--- RPtoRFX_Receipt_DefaultLineData.ftl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 0f18d90..6328f50 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -9,7 +9,7 @@ <#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature --> <#assign defaultactor ="VIZ"> <#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> - <#assign actorID = executionflow.ShipTo.ActorID > + <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" > <#else> <#assign actorID = defaultactor > diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 838293a..afb06f5 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -6,7 +6,7 @@ "method" : "POST", "uri_substitutions": { "activity_code": "${activity_code}", - "physical_depot_code": "${executionflow.ShipTo.ActorID!""}", + "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}", "originator_code": "${originator_code}" }, "payload" : @@ -15,8 +15,8 @@ "receipt_type": "${receipt_type}", "receipt_reason_code": "${receipt_reason_code}", "work_mode_code" : "${work_mode_code}", - "original_code" : "${executionflow.ShipFrom.ActorID}", - "carrier_code" : "${executionflow.Carrier.ActorID!""}", + "original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}", + "carrier_code" : "${RPtoRFXprefixCarrier(executionflow.Carrier.ActorID!"")}", <#if executionflow.RequestedMilestones?? && executionflow.RequestedMilestones.RequestedDeliveryDateTime??> "receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}", diff --git a/RPtoRFX_Receipt_DefaultLineData.ftl b/RPtoRFX_Receipt_DefaultLineData.ftl index 112da79..8c09d53 100644 --- a/RPtoRFX_Receipt_DefaultLineData.ftl +++ b/RPtoRFX_Receipt_DefaultLineData.ftl @@ -2,7 +2,7 @@ <#-- Note : you can use Order Line Segmentation keys, using the define map : SegmentationKeys_Map --> <#-- How to use MD or SK map - Example : + Example : <#assign owner_code = SegmentationKeys_Map["Owner"].String!""/> If your SK is : From deba22e9d4a7461110034ddbe968c467918fd2a8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 8 Oct 2024 11:12:47 +0200 Subject: [PATCH 054/132] modifs --- RPtoRFX_PrepOrder.ftl | 1 + RPtoRFX_Receipt.ftl | 1 + 2 files changed, 2 insertions(+) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 6328f50..3843c8e 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -1,4 +1,5 @@ <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> +<#include "ActorPrefix.ftl"> <#-- Valeurs par défaut Adresse --> <#-- Default values --> <#assign typecode ="010"> diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index afb06f5..940ef49 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -1,4 +1,5 @@ <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> +<#include "ActorPrefix.ftl"> { "id" : {"refid" : "${executionflow.OrderID?json_string}"}, From de5a9b431e1dd88605937fc2441e9a9056aa54f8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 8 Oct 2024 11:44:47 +0200 Subject: [PATCH 055/132] modifs --- RPtoRFX_PrepOrder.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 3843c8e..6cfb809 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -21,7 +21,7 @@ "method" : "POST", "uri_substitutions": { "activity_code": "${activity_code}", - "physical_depot_code": "${executionflow.ShipFrom.ActorID}", + "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}", "originator_code": "${originator_code}" }, "payload" : From aa62c276d1f4f2ad7c94e963d7f50d137fdd8bae Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 8 Oct 2024 14:19:15 +0200 Subject: [PATCH 056/132] modifs --- RFXtoRP_HsaDispute_MessageSent.ftl | 4 ++-- RFXtoRP_HsaDispute_MessageSent2.ftl | 4 ++-- RFXtoRP_HsaDispute_MessageSent3.ftl | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 58d430f..32f8edd 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -17,10 +17,10 @@ "Payload": { <#if dispute.dispute_preparation??> - "Message": "Reference : ${dispute.dispute_reference?trim?json_string}" + "Message": "${dispute.dispute_reference?trim?json_string}" <#else> <#if dispute.dispute_reception??> - "Message": "Reference : ${dispute.dispute_reception.reception_reference?trim?json_string}" + "Message": "${dispute.dispute_reception.reception_reference?trim?json_string}" diff --git a/RFXtoRP_HsaDispute_MessageSent2.ftl b/RFXtoRP_HsaDispute_MessageSent2.ftl index 801b503..bb68b17 100644 --- a/RFXtoRP_HsaDispute_MessageSent2.ftl +++ b/RFXtoRP_HsaDispute_MessageSent2.ftl @@ -17,9 +17,9 @@ "Payload": { <#if dispute.dispute_quantity!=0> - "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string} - Quantity : ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + "Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" <#else> - "Message": "Item : ${dispute.dispute_item.item_code?trim?json_string}" + "Message": "${dispute.dispute_item.item_code?trim?json_string}" } } diff --git a/RFXtoRP_HsaDispute_MessageSent3.ftl b/RFXtoRP_HsaDispute_MessageSent3.ftl index 0965eac..438613c 100644 --- a/RFXtoRP_HsaDispute_MessageSent3.ftl +++ b/RFXtoRP_HsaDispute_MessageSent3.ftl @@ -16,7 +16,7 @@ }, "Payload": { - "Message": "Description : ${dispute.dispute_description?trim?json_string}" + "Message": " ${dispute.dispute_description?trim?json_string}" } } From 8d4067a58e9947d559b68b7f4ce17d670a10b3a2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 11:32:48 +0200 Subject: [PATCH 057/132] modifs --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index e55ef72..3a476d8 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -49,7 +49,7 @@ preparation_order.address.territorial_division_code == "" && preparation_order.address.postal_code == "" && preparation_order.address.iso_country_code == ""> - "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code)}" + "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}" <#else> "Actor": { From 234918a77e689fdf7c5ad72afd41c5b9d57bd9af Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 14:56:26 +0200 Subject: [PATCH 058/132] modifs --- RFXtoRP_HfDtlStockLs.ftl | 4 ++-- RFXtoRP_HfGrade.ftl | 10 +++++----- RFXtoRP_HfLvTypeList.ftl | 2 +- RFXtoRP_HfOwner.ftl | 10 +++++----- RFXtoRP_HfRpConfig.ftl | 14 +++++++------- RFXtoRP_HsaDispute.ftl | 4 ++-- RFXtoRP_HsaIpgMove.ftl | 4 ++-- RFXtoRP_HsrPrepa.ftl | 6 +++--- RFXtoRP_HsrPro.ftl | 8 ++++---- 9 files changed, 31 insertions(+), 31 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs.ftl b/RFXtoRP_HfDtlStockLs.ftl index 1c514ab..28d6d61 100644 --- a/RFXtoRP_HfDtlStockLs.ftl +++ b/RFXtoRP_HfDtlStockLs.ftl @@ -50,11 +50,11 @@ <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#stop "event not supported"> + <#stop > <#break> <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HfGrade.ftl b/RFXtoRP_HfGrade.ftl index ee9990d..39f6d2f 100644 --- a/RFXtoRP_HfGrade.ftl +++ b/RFXtoRP_HfGrade.ftl @@ -1,5 +1,5 @@ <#-- *********************************************** Parameter global ******************** --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -9,11 +9,11 @@ <#case "C"> <#case "U"> <#case "D"> - <#stop "no generic FTL file available yet for Grades"> + <#stop "no generic FTL file available yet for Grades"> <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HfLvTypeList.ftl b/RFXtoRP_HfLvTypeList.ftl index 584df9a..f9b3b04 100644 --- a/RFXtoRP_HfLvTypeList.ftl +++ b/RFXtoRP_HfLvTypeList.ftl @@ -16,6 +16,6 @@ <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HfOwner.ftl b/RFXtoRP_HfOwner.ftl index 571248a..6d23fd2 100644 --- a/RFXtoRP_HfOwner.ftl +++ b/RFXtoRP_HfOwner.ftl @@ -1,5 +1,5 @@ <#-- *********************************************** Parameter global ******************** --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -9,11 +9,11 @@ <#case "C"> <#case "U"> <#case "D"> - <#stop "no generic FTL file available yet for Owners"> + <#stop "no generic FTL file available yet for Owners"> <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HfRpConfig.ftl b/RFXtoRP_HfRpConfig.ftl index 8792d92..0d0751e 100644 --- a/RFXtoRP_HfRpConfig.ftl +++ b/RFXtoRP_HfRpConfig.ftl @@ -4,7 +4,7 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of *** --> <#-- *********************************************** Parameter global ******************** --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -16,18 +16,18 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign file = JsonUtil.jsonToMap(dataRfx)> - + <#include "RFXtoRP_RfxConfigurationRp.ftl"> - + <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#stop "deletion of config not supported"> <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index aa2c627..e2c6966 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -52,11 +52,11 @@ <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#stop "event not supported - Case D "> + <#stop> <#break> <#default> - <#stop "event not supported"> + <#stop> diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 13d3698..0582ada 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -71,11 +71,11 @@ <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#stop "event not supported - Case D "> + <#stop > <#break> <#default> - <#stop "event not supported"> + <#stop> diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 85deef4..cbea0cb 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -64,7 +64,7 @@ <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> } - <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number && despatched_ipg.consignment_unit_id="" > , { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> @@ -102,9 +102,9 @@ <#break> <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> -<#stop "event not supported (Case D)"> +<#stop> <#break> <#default> -<#stop "event not supported"> +<#stop> \ No newline at end of file diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index f6a0241..e329d46 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -29,17 +29,17 @@ <#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl"> } <#else> - <#stop "preparation order already confirmed"> + <#-- preparation order already confirmed --> + <#stop> <#else> - <#stop "preparation order type not supported"> + <#-- preparation order type not supported --> + <#stop> <#else> <#stop "PRO reference is empty"> - - ] <#break> From e9e09a5eb1fc51c64a68a0c704ca8394ff3cedd5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 15:03:29 +0200 Subject: [PATCH 059/132] modifs --- RFXtoRP_HsrPrepa.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index cbea0cb..b086d39 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -64,7 +64,7 @@ <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> } - <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number && despatched_ipg.consignment_unit_id="" > + <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , { <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> @@ -78,7 +78,7 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> } - <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? > + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && despatched_ipg.consignment_unit_id=""> <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , { From 37773416ff1b964db30b8f909dda9ebb43aa3c5a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 15:17:53 +0200 Subject: [PATCH 060/132] modifs --- RFXtoRP_HsrPrepa.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index b086d39..d1416c3 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -78,7 +78,7 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> } - <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && despatched_ipg.consignment_unit_id=""> + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??> <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , { From 86335ba52da087ca718c0167a7dd5b44552a7848 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 16:06:17 +0200 Subject: [PATCH 061/132] modifs --- RFXtoRP_HsaDispute_Created.ftl | 8 +++++--- Table.ftl | 6 ++++++ 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index c0c9366..40f5c24 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -26,10 +26,12 @@ <#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) /> <#if isCurrencyCode> "Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}", - <#--<#elseif isCurrencyCode!> - "Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",--> <#else> - "Currency" : "XXX", + <#if TableAmount[dispute.dispute_amount_unit?json_string]??> + "Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}", + <#else> + "Currency" : "XXX", + "Value": "${dispute.dispute_amount}" }, diff --git a/Table.ftl b/Table.ftl index b61f611..7f2d545 100644 --- a/Table.ftl +++ b/Table.ftl @@ -6,4 +6,10 @@ "4":"CLAIM_CRITICALITY_BLOCKING" }> + <#-- Table Amout --> +<#assign TableAmount = { + "$": "USD", + "£":"GBP", + "DH":"MAD" + }> From 63db9931647dcfa2f36b154daddc7bda8c122943 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 17:07:16 +0200 Subject: [PATCH 062/132] modifs dispute --- RFXtoRP_HsaDispute.ftl | 15 ---------- RFXtoRP_HsaDispute_MessageSent.ftl | 44 +++++++++++++++++++++++++++++ RFXtoRP_HsaDispute_MessageSent2.ftl | 26 ----------------- RFXtoRP_HsaDispute_MessageSent3.ftl | 23 --------------- 4 files changed, 44 insertions(+), 64 deletions(-) delete mode 100644 RFXtoRP_HsaDispute_MessageSent2.ftl delete mode 100644 RFXtoRP_HsaDispute_MessageSent3.ftl diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index e2c6966..18ea1ec 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -29,21 +29,6 @@ "datas" : <#include "RFXtoRP_HsaDispute_MessageSent.ftl"> } - <#if dispute.dispute_item??> - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaDispute_MessageSent2.ftl"> - } - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaDispute_MessageSent3.ftl"> - } <#else> <#stop> diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 32f8edd..dd73318 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -24,6 +24,50 @@ + } + }, + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + + + }, + "Payload": { + + <#if dispute.dispute_quantity!=0 && dispute.dispute_item??> + "Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + <#elseif dispute.dispute_item??> + "Message": "${dispute.dispute_item.item_code?trim?json_string}" + <#elseif dispute.dispute_quantity!=0> + "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + + } + }, + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + + + }, + "Payload": { + + "Message": " ${dispute.dispute_description?trim?json_string}" + } } + ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_MessageSent2.ftl b/RFXtoRP_HsaDispute_MessageSent2.ftl deleted file mode 100644 index bb68b17..0000000 --- a/RFXtoRP_HsaDispute_MessageSent2.ftl +++ /dev/null @@ -1,26 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" - <#else> - <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" - - - }, - "Payload": { - - <#if dispute.dispute_quantity!=0> - "Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" - <#else> - "Message": "${dispute.dispute_item.item_code?trim?json_string}" - - } - } -] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_MessageSent3.ftl b/RFXtoRP_HsaDispute_MessageSent3.ftl deleted file mode 100644 index 438613c..0000000 --- a/RFXtoRP_HsaDispute_MessageSent3.ftl +++ /dev/null @@ -1,23 +0,0 @@ -<#include "HfRpConfig.ftl"> -<#include "ReflexUtils.ftl"> -[ - { - "Header": { - "ProjectID": "${projectRP}" - }, - "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" - <#else> - <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" - - - }, - "Payload": { - - "Message": " ${dispute.dispute_description?trim?json_string}" - - } - } -] \ No newline at end of file From 42571ef2a1cc6b1a811a0c3605041bfd4900d530 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 9 Oct 2024 17:13:05 +0200 Subject: [PATCH 063/132] modifs --- RFXtoRP_HsaDispute_MessageSent.ftl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index dd73318..ed1a94b 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -43,10 +43,10 @@ <#if dispute.dispute_quantity!=0 && dispute.dispute_item??> "Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" - <#elseif dispute.dispute_item??> - "Message": "${dispute.dispute_item.item_code?trim?json_string}" - <#elseif dispute.dispute_quantity!=0> - "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + <#elseif dispute.dispute_item??> + "Message": "${dispute.dispute_item.item_code?trim?json_string}" + <#elseif dispute.dispute_quantity!=0> + "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" } }, From 1cc34e665799e0c8c34434fcd21e9c4594b037e4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 10 Oct 2024 14:08:43 +0200 Subject: [PATCH 064/132] modifs depot --- RFXtoRP_HsrDepot_ActorCreated.ftl | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 3bac4c9..e64bb6b 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -41,17 +41,20 @@ <#-- if Reflex WMS address is not structured --> <#else> + <#if depot.physical_depot_address??> "Name": "${depot.physical_depot_address.company_name?json_string}", "StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}", "StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}", "StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}", "CountryCode" : "" + - }, - "Phones": ["${depot.physical_depot_address.telephone?json_string}", - "${depot.physical_depot_address.other_number?json_string}" - ], + <#if depot.physical_depot_address??> + "Phones": ["${depot.physical_depot_address.telephone?json_string}", + "${depot.physical_depot_address.other_number?json_string}" + ], + "Typology": "TYPOLOGY_UNKNOWN" } } From 557828b4599932f3ab7fa4ac417c691e560866ad Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 11 Oct 2024 11:01:13 +0200 Subject: [PATCH 065/132] modifs nom --- RFXtoRP_HsrPrepa.ftl | 2 +- ...dded.ftl => RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl => RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl (100%) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index d1416c3..d9afb7f 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -85,7 +85,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl"> + <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl b/RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl similarity index 100% rename from RFXtoRP_HsrPrepa_TrackingHuLabelledHUsAdded.ftl rename to RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl From 90bfd41f41dd9f8169c2d20673416ffad33b9e75 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 15 Oct 2024 16:19:31 +0200 Subject: [PATCH 066/132] Ajout du flux LoadInfo --- RFXtoRP_HsrLoadInfo.ftl | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 RFXtoRP_HsrLoadInfo.ftl diff --git a/RFXtoRP_HsrLoadInfo.ftl b/RFXtoRP_HsrLoadInfo.ftl new file mode 100644 index 0000000..8b00fd7 --- /dev/null +++ b/RFXtoRP_HsrLoadInfo.ftl @@ -0,0 +1,40 @@ +<#-- **** input parameters ***** --> +<#-- input : message RFX --> +<#-- project : projectId in ReflexPlatform --> +<#-- organisation : organisationtId in ReflexPlatform --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#stop> + +<#switch cloudEventMsg.action> + <#case "C"> + <#case "U"> + <#-- *********************************************** Action = CREATE or UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE *************************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ + { + + } + ] + <#break> + + <#default> + <#stop "event not supported"> + \ No newline at end of file From 833ed4ebd620220660f52405fbc8beeff58e7247 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 15 Oct 2024 16:54:24 +0200 Subject: [PATCH 067/132] modifs --- RPtoRFX_PrepOrder.ftl | 6 +++++- Table.ftl | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 6cfb809..c800639 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -55,7 +55,11 @@ "address_type_code" : "${adresstypecode}", "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", - "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", + <#if executionflow.ShipTo.Actor.Adresse.Name??> + "name_or_company_name" : "${(executionflow.ShipTo.Actor.Adresse.Name!"")?json_string}", + <#else> + "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}" + <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", diff --git a/Table.ftl b/Table.ftl index 7f2d545..f9bce7b 100644 --- a/Table.ftl +++ b/Table.ftl @@ -6,7 +6,7 @@ "4":"CLAIM_CRITICALITY_BLOCKING" }> - <#-- Table Amout --> + <#-- Table Amount --> <#assign TableAmount = { "$": "USD", "£":"GBP", From 6f636b4ee7afb41cf3a7b33008488b5f99e09a1d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 15 Oct 2024 16:56:15 +0200 Subject: [PATCH 068/132] modifs --- RPtoRFX_PrepOrder.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index c800639..2373749 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -55,7 +55,7 @@ "address_type_code" : "${adresstypecode}", "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", - <#if executionflow.ShipTo.Actor.Adresse.Name??> + <#if executionflow.ShipTo.Actor.Adresse.Name?? && executionflow.ShipTo.Actor.Adresse.Name!=""> "name_or_company_name" : "${(executionflow.ShipTo.Actor.Adresse.Name!"")?json_string}", <#else> "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}" From f736d62ee4cc56fa0b3077a9419ebf33c9d2a3b5 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 15 Oct 2024 17:00:34 +0200 Subject: [PATCH 069/132] modifs --- RPtoRFX_PrepOrder.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 2373749..ae86335 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -55,8 +55,8 @@ "address_type_code" : "${adresstypecode}", "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", - <#if executionflow.ShipTo.Actor.Adresse.Name?? && executionflow.ShipTo.Actor.Adresse.Name!=""> - "name_or_company_name" : "${(executionflow.ShipTo.Actor.Adresse.Name!"")?json_string}", + <#if executionflow.ShipTo.Actor.Adress.Name?? && executionflow.ShipTo.Actor.Adress.Name!=""> + "name_or_company_name" : "${(executionflow.ShipTo.Actor.Adress.Name!"")?json_string}", <#else> "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}" From ffbeb4cadcb140cb8831c6e3af1ec6128d29e170 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 15 Oct 2024 17:03:15 +0200 Subject: [PATCH 070/132] modifs --- RPtoRFX_PrepOrder.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index ae86335..6d672f9 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -55,8 +55,8 @@ "address_type_code" : "${adresstypecode}", "first_name": "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}", "last_name" :"${(executionflow.ShipTo.Contact.LastName!"")?json_string}", - <#if executionflow.ShipTo.Actor.Adress.Name?? && executionflow.ShipTo.Actor.Adress.Name!=""> - "name_or_company_name" : "${(executionflow.ShipTo.Actor.Adress.Name!"")?json_string}", + <#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!=""> + "name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}", <#else> "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}" From cdbb00ea4c8b906e3d6926d715f38310d6af1cfc Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 16 Oct 2024 09:13:07 +0200 Subject: [PATCH 071/132] modifs --- RPtoRFX_PrepOrder.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 6d672f9..1f7771f 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -58,7 +58,7 @@ <#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!=""> "name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}", <#else> - "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}" + "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}", <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", From 9c229997b3eb2c499a0cf295dc9fc3f702bc515d Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 16 Oct 2024 09:40:53 +0200 Subject: [PATCH 072/132] espace --- RPtoRFX_PrepOrder.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 1f7771f..ea4874f 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -58,7 +58,7 @@ <#if executionflow.ShipTo.Actor.Address.Name?? && executionflow.ShipTo.Actor.Address.Name!=""> "name_or_company_name" : "${(executionflow.ShipTo.Actor.Address.Name!"")?json_string}", <#else> - "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string}${(executionflow.ShipTo.Contact.LastName!"")?json_string}", + "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", From bcddf351a01c0a44af6cb6007076ebada3e929cf Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 16 Oct 2024 11:51:25 +0200 Subject: [PATCH 073/132] modifs --- ActorPrefix.ftl | 1 + RPtoRFX_PrepOrder.ftl | 1 + RPtoRFX_Receipt.ftl | 1 + 3 files changed, 3 insertions(+) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index db6b023..93f5d17 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -1,3 +1,4 @@ + <#-- --------------------------------------------------------------------------------------- --> <#-- Actor Prefix 4 cars --> <#-- --------------------------------------------------------------------------------------- --> diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index ea4874f..2994286 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -1,5 +1,6 @@ <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> <#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> <#-- Valeurs par défaut Adresse --> <#-- Default values --> <#assign typecode ="010"> diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 940ef49..763cf12 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -1,5 +1,6 @@ <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> <#include "ActorPrefix.ftl"> +<#include "HfRpConfig.ftl"> { "id" : {"refid" : "${executionflow.OrderID?json_string}"}, From 72abd3b22a4847d5f09bbe6e5aac4b51fe9856f2 Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 16 Oct 2024 16:04:00 +0200 Subject: [PATCH 074/132] update "uniqueness" variable --- ActorPrefix.ftl | 16 ++++++++-------- RFXtoRP_RfxConfigurationRp.ftl | 4 +++- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 93f5d17..1d7302f 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -5,7 +5,7 @@ <#-- For Depot --> <#function RFXtoRPprefixDepot depot> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local actor = depot> <#else> <#if text_language_rfx ="fr"> @@ -34,7 +34,7 @@ <#function RPtoRFXprefixDepot actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local depot = actor> <#else> <#local depot = actor[4..]> @@ -46,7 +46,7 @@ <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local actor = supplier> <#else> <#if text_language_rfx ="fr"> @@ -75,7 +75,7 @@ <#function RPtoRFXprefixSupplier actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local supplier = actor> <#else> <#local supplier = actor[4..]> @@ -85,7 +85,7 @@ <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local actor = carrier> <#else> <#if text_language_rfx ="fr"> @@ -114,7 +114,7 @@ <#function RPtoRFXprefixCarrier actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local carrier = actor> <#else> <#local carrier = actor[4..]> @@ -124,7 +124,7 @@ <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local actor = consignee> <#else> <#if text_language_rfx ="fr"> @@ -153,7 +153,7 @@ <#function RPtoRFXprefixConsignee actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local consignee = actor> <#else> <#local consignee = actor[4..]> diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index c400b77..b8fc3d3 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -34,6 +34,8 @@ <#if file.reflex_platform_project_list[0].site_code_unicity??> - <#noparse><#assign uniqueness = "${file.reflex_platform_project_list[0].site_code_unicity?string('yes', 'no')}<#noparse>"> + <#noparse><#assign uniqueness = ${file.reflex_platform_project_list[0].site_code_unicity}<#noparse>> +<#else> + <#noparse><#assign uniqueness = false<#noparse>> From 8160342c63221cb46dc6d6a185aac365d8cd7e8b Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 16 Oct 2024 16:23:43 +0200 Subject: [PATCH 075/132] update "uniqueness" variable --- RFXtoRP_RfxConfigurationRp.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index b8fc3d3..e8c863c 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -34,7 +34,7 @@ <#if file.reflex_platform_project_list[0].site_code_unicity??> - <#noparse><#assign uniqueness = ${file.reflex_platform_project_list[0].site_code_unicity}<#noparse>> + <#noparse><#assign uniqueness = ${file.reflex_platform_project_list[0].site_code_unicity?c}<#noparse>> <#else> <#noparse><#assign uniqueness = false<#noparse>> From 8aab4296a2472f0fbbedf9803f225577ad8e175c Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 16 Oct 2024 17:37:17 +0200 Subject: [PATCH 076/132] update "uniqueness" variable --- ActorPrefix.ftl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 1d7302f..75cd22f 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -5,7 +5,7 @@ <#-- For Depot --> <#function RFXtoRPprefixDepot depot> - <#if uniqueness > + <#if uniqueness?? && uniqueness > <#local actor = depot> <#else> <#if text_language_rfx ="fr"> @@ -34,7 +34,7 @@ <#function RPtoRFXprefixDepot actor> - <#if uniqueness > + <#if uniqueness?? && uniqueness > <#local depot = actor> <#else> <#local depot = actor[4..]> @@ -46,7 +46,7 @@ <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> - <#if uniqueness > + <#if uniqueness?? && uniqueness > <#local actor = supplier> <#else> <#if text_language_rfx ="fr"> @@ -75,7 +75,7 @@ <#function RPtoRFXprefixSupplier actor> - <#if uniqueness > + <#if uniqueness?? && uniqueness > <#local supplier = actor> <#else> <#local supplier = actor[4..]> @@ -85,7 +85,7 @@ <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> - <#if uniqueness > + <#if uniqueness?? && uniqueness > <#local actor = carrier> <#else> <#if text_language_rfx ="fr"> @@ -114,7 +114,7 @@ <#function RPtoRFXprefixCarrier actor> - <#if uniqueness> + <#if uniqueness?? && uniqueness> <#local carrier = actor> <#else> <#local carrier = actor[4..]> @@ -124,7 +124,7 @@ <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> - <#if uniqueness> + <#if uniqueness?? && uniqueness> <#local actor = consignee> <#else> <#if text_language_rfx ="fr"> @@ -153,7 +153,7 @@ <#function RPtoRFXprefixConsignee actor> - <#if uniqueness> + <#if uniqueness?? && uniqueness> <#local consignee = actor> <#else> <#local consignee = actor[4..]> From 1e42f6d81cb06e8056d6c6346988601597063aba Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 18 Oct 2024 15:52:08 +0200 Subject: [PATCH 077/132] modifs HsrReceipt --- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index e1763ed..b5568df 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -35,7 +35,10 @@ "ShipToAcked": true, <#if receipt.carrier_informations.carrier_code != ""> - "Carrier": "${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}", + "Carrier": + { + "ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}" + }, <#if receipt.line_list??> From b1e5d51ba0f8788c245c6418d3f709153defbd68 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 29 Oct 2024 11:18:35 +0100 Subject: [PATCH 078/132] modifs uniqueness --- RFXtoRP_RfxConfigurationRp.ftl | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index e8c863c..48cf169 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -33,9 +33,11 @@ <#noparse><#assign text_language_rfx = "${reflex_platform_project.text_language!"en"}<#noparse>"> -<#if file.reflex_platform_project_list[0].site_code_unicity??> - <#noparse><#assign uniqueness = ${file.reflex_platform_project_list[0].site_code_unicity?c}<#noparse>> -<#else> +<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness> + <#if reflex_platform_project_uniqueness.site_code_unicity??> + <#noparse><#assign uniqueness = ${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>> +<#else <#noparse><#assign uniqueness = false<#noparse>> + From 0c4e85067bfd718b9611c62b00efd9124ca5daf8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 29 Oct 2024 11:24:45 +0100 Subject: [PATCH 079/132] correction --- RFXtoRP_RfxConfigurationRp.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index 48cf169..add58e4 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -36,7 +36,7 @@ <#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness> <#if reflex_platform_project_uniqueness.site_code_unicity??> <#noparse><#assign uniqueness = ${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>> -<#else +<#else> <#noparse><#assign uniqueness = false<#noparse>> From dbfcccfdd9edbaf110337bc5fe7d315c130c8c29 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 29 Oct 2024 13:49:45 +0100 Subject: [PATCH 080/132] modifs --- RFXtoRP_RfxConfigurationRp.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index add58e4..d89dac8 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -35,9 +35,9 @@ <#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness> <#if reflex_platform_project_uniqueness.site_code_unicity??> - <#noparse><#assign uniqueness = ${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>> +<#noparse><#assign uniqueness = ${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>> <#else> - <#noparse><#assign uniqueness = false<#noparse>> +<#noparse><#assign uniqueness = false<#noparse>> From a11124d14404276549b2cbc19fa7b16961164e2a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 4 Nov 2024 10:42:40 +0100 Subject: [PATCH 081/132] =?UTF-8?q?unicit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActorPrefix.ftl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 75cd22f..1d7302f 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -5,7 +5,7 @@ <#-- For Depot --> <#function RFXtoRPprefixDepot depot> - <#if uniqueness?? && uniqueness > + <#if uniqueness > <#local actor = depot> <#else> <#if text_language_rfx ="fr"> @@ -34,7 +34,7 @@ <#function RPtoRFXprefixDepot actor> - <#if uniqueness?? && uniqueness > + <#if uniqueness > <#local depot = actor> <#else> <#local depot = actor[4..]> @@ -46,7 +46,7 @@ <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> - <#if uniqueness?? && uniqueness > + <#if uniqueness > <#local actor = supplier> <#else> <#if text_language_rfx ="fr"> @@ -75,7 +75,7 @@ <#function RPtoRFXprefixSupplier actor> - <#if uniqueness?? && uniqueness > + <#if uniqueness > <#local supplier = actor> <#else> <#local supplier = actor[4..]> @@ -85,7 +85,7 @@ <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> - <#if uniqueness?? && uniqueness > + <#if uniqueness > <#local actor = carrier> <#else> <#if text_language_rfx ="fr"> @@ -114,7 +114,7 @@ <#function RPtoRFXprefixCarrier actor> - <#if uniqueness?? && uniqueness> + <#if uniqueness> <#local carrier = actor> <#else> <#local carrier = actor[4..]> @@ -124,7 +124,7 @@ <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> - <#if uniqueness?? && uniqueness> + <#if uniqueness> <#local actor = consignee> <#else> <#if text_language_rfx ="fr"> @@ -153,7 +153,7 @@ <#function RPtoRFXprefixConsignee actor> - <#if uniqueness?? && uniqueness> + <#if uniqueness> <#local consignee = actor> <#else> <#local consignee = actor[4..]> From 867a894e2efd86553014723abd356fbcf21c4a2e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 4 Nov 2024 10:49:32 +0100 Subject: [PATCH 082/132] =?UTF-8?q?unicit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActorPrefix.ftl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 1d7302f..93f5d17 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -5,7 +5,7 @@ <#-- For Depot --> <#function RFXtoRPprefixDepot depot> - <#if uniqueness > + <#if uniqueness?? && uniqueness!="" > <#local actor = depot> <#else> <#if text_language_rfx ="fr"> @@ -34,7 +34,7 @@ <#function RPtoRFXprefixDepot actor> - <#if uniqueness > + <#if uniqueness?? && uniqueness!="" > <#local depot = actor> <#else> <#local depot = actor[4..]> @@ -46,7 +46,7 @@ <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> - <#if uniqueness > + <#if uniqueness?? && uniqueness!="" > <#local actor = supplier> <#else> <#if text_language_rfx ="fr"> @@ -75,7 +75,7 @@ <#function RPtoRFXprefixSupplier actor> - <#if uniqueness > + <#if uniqueness?? && uniqueness!="" > <#local supplier = actor> <#else> <#local supplier = actor[4..]> @@ -85,7 +85,7 @@ <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> - <#if uniqueness > + <#if uniqueness?? && uniqueness!="" > <#local actor = carrier> <#else> <#if text_language_rfx ="fr"> @@ -114,7 +114,7 @@ <#function RPtoRFXprefixCarrier actor> - <#if uniqueness> + <#if uniqueness?? && uniqueness!="" > <#local carrier = actor> <#else> <#local carrier = actor[4..]> @@ -124,7 +124,7 @@ <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> - <#if uniqueness> + <#if uniqueness?? && uniqueness!="" > <#local actor = consignee> <#else> <#if text_language_rfx ="fr"> @@ -153,7 +153,7 @@ <#function RPtoRFXprefixConsignee actor> - <#if uniqueness> + <#if uniqueness?? && uniqueness!="" > <#local consignee = actor> <#else> <#local consignee = actor[4..]> From 5d799566feafa7171d199c5d6d7855b819620f12 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 4 Nov 2024 17:13:19 +0100 Subject: [PATCH 083/132] =?UTF-8?q?unicit=C3=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ActorPrefix.ftl | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index 93f5d17..e12b76d 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -5,7 +5,7 @@ <#-- For Depot --> <#function RFXtoRPprefixDepot depot> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness > <#local actor = depot> <#else> <#if text_language_rfx ="fr"> @@ -34,7 +34,7 @@ <#function RPtoRFXprefixDepot actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local depot = actor> <#else> <#local depot = actor[4..]> @@ -46,7 +46,7 @@ <#-- For Supplier --> <#function RFXtoRPprefixSupplier supplier> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local actor = supplier> <#else> <#if text_language_rfx ="fr"> @@ -75,7 +75,7 @@ <#function RPtoRFXprefixSupplier actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local supplier = actor> <#else> <#local supplier = actor[4..]> @@ -85,7 +85,7 @@ <#-- For Carrier --> <#function RFXtoRPprefixCarrier carrier> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local actor = carrier> <#else> <#if text_language_rfx ="fr"> @@ -114,7 +114,7 @@ <#function RPtoRFXprefixCarrier actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local carrier = actor> <#else> <#local carrier = actor[4..]> @@ -124,7 +124,7 @@ <#-- For Consignee --> <#function RFXtoRPprefixConsignee consignee> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local actor = consignee> <#else> <#if text_language_rfx ="fr"> @@ -153,7 +153,7 @@ <#function RPtoRFXprefixConsignee actor> - <#if uniqueness?? && uniqueness!="" > + <#if uniqueness> <#local consignee = actor> <#else> <#local consignee = actor[4..]> From 31f38e96267a645e1f007c0752f8130843159b7a Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 5 Nov 2024 11:37:39 +0100 Subject: [PATCH 084/132] SCPN1-7496 --- RFXtoRP_HsaIpgMove_StockMoved.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 36b1f0e..f45d3c1 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -61,7 +61,7 @@ "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - <#if reflexMvtStockInterface.move_sign == "+"> + <#if reflexMvtStockInterface.move_sign == "+" || reflexMvtStockInterface.ipg_move_quantity_in_base_lvs <= 0 > "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} <#else> "Value": -${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} From 821b58b3bf2b1c4c7eced70b21bc1e99409bd729 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 5 Nov 2024 16:36:47 +0100 Subject: [PATCH 085/132] Claim --- RFXtoRP_HsaDispute_MessageSent.ftl | 45 +++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 7 deletions(-) diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index ed1a94b..f7c1e48 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -26,6 +26,7 @@ } }, + <#if dispute.dispute_quantity!=0 && dispute.dispute_item??> { "Header": { "ProjectID": "${projectRP}" @@ -40,16 +41,46 @@ }, "Payload": { - - <#if dispute.dispute_quantity!=0 && dispute.dispute_item??> "Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" - <#elseif dispute.dispute_item??> - "Message": "${dispute.dispute_item.item_code?trim?json_string}" - <#elseif dispute.dispute_quantity!=0> - "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" - } }, + <#elseif dispute.dispute_item??> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + + + }, + "Payload": { + "Message": "${dispute.dispute_item.item_code?trim?json_string}" + } + }, + <#elseif dispute.dispute_quantity!=0> + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + <#if dispute.dispute_preparation??> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#else> + <#if dispute.dispute_reception??> + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + + + }, + "Payload": { + "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" + } + }, + { "Header": { "ProjectID": "${projectRP}" From 5901619f6a84fbab7ccc4db1157b68215cce34f8 Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 8 Nov 2024 16:39:08 +0100 Subject: [PATCH 086/132] SCPN1-7518 --- RFXtoRP_HsaDispute_Created.ftl | 15 ++++++++++++--- ...RP_HsaDispute_TableReasonCodeToClaimTypeID.ftl | 9 +-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 40f5c24..41f0e55 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -8,7 +8,12 @@ }, "ID": { <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#else> + <#stop "preparation order list is empty" > + + <#else> <#if dispute.dispute_reception??> "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" @@ -36,7 +41,11 @@ "Value": "${dispute.dispute_amount}" }, <#if dispute.dispute_type_code=="050" > - "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", @@ -48,7 +57,7 @@ <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_${TableReasonCode[dispute.dispute_reason_code]}" + "ClaimTypeID":"TableReasonCode[dispute.dispute_reason_code]" <#else> <#stop "Claim reason code not supported" > diff --git a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl index b1fd7d7..9b2f13a 100644 --- a/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl +++ b/RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl @@ -1,12 +1,5 @@ <#-- Specify table for reason code --> -<#-- Table example for reason code to claim type ID --> -<#-- <#assign TableReasonCode = { - "001":"ORDER_Delay", - "M1":"ORDER_casse", - "XXX":"ACTOR_claimtype", - "XXX":"HANDLINGUNIT_claimtype", - "XXX":"MOVEMENT_claimtype" - }/>--> +<#assign TableReasonCode = {}/> From 4d24367b58dce97454d351a1ce13b1b65b956bf6 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 12 Nov 2024 10:16:06 +0100 Subject: [PATCH 087/132] json_string --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 4 ++-- RPtoRFX_PrepOrder.ftl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 3a476d8..a72d93e 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -57,8 +57,8 @@ "Address" : { "City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", - "CountryCode" : "${preparation_order.address.iso_country_code!""}", - "PostalCode" : "${preparation_order.address.postal_code!""}", + "CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}", + "PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}", "StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}", "StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}", "StreetAddressThree" : "${(preparation_order.address.additional_address_data_2!"")?json_string}" diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 2994286..0debca9 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -62,10 +62,10 @@ "name_or_company_name" : "${(executionflow.ShipTo.Contact.FirstName!"")?json_string} ${(executionflow.ShipTo.Contact.LastName!"")?json_string}", <#if executionflow.ShipTo.Contact.Emails?? && executionflow.ShipTo.Contact.Emails[0]!=""> - "mail_address": "${executionflow.ShipTo.Contact.Emails[0]}", + "mail_address": "${executionflow.ShipTo.Contact.Emails[0]?json_string}", <#if executionflow.ShipTo.Contact.Phones?? && executionflow.ShipTo.Contact.Phones[0]!=""> - "mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]}", + "mobile_phone_number": "${executionflow.ShipTo.Contact.Phones[0]?json_string}", "street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}", "additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}", From d896aa95f482984381b628c3669e331d313cc114 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 12 Nov 2024 17:59:03 +0100 Subject: [PATCH 088/132] SCPN1-7518 --- RFXtoRP_HsaDispute_Created.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 41f0e55..22af7b5 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -57,7 +57,7 @@ <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"TableReasonCode[dispute.dispute_reason_code]" + "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" <#else> <#stop "Claim reason code not supported" > From 5c6e200d3ea33bb5a880c4141e937372ad45a795 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 13 Nov 2024 10:50:10 +0100 Subject: [PATCH 089/132] suppression logs d'erreurs --- RFXtoRP_HsaCarrier.ftl | 34 +++++++++++++++++----------------- RFXtoRP_HsaCons.ftl | 34 +++++++++++++++++----------------- RFXtoRP_HsaItm.ftl | 32 ++++++++++++++++---------------- RFXtoRP_HsaItmLv.ftl | 30 +++++++++++++++--------------- RFXtoRP_HsaLstCarSta.ftl | 2 +- RFXtoRP_HsaProStatus.ftl | 4 ++-- RFXtoRP_HsaSup.ftl | 34 +++++++++++++++++----------------- RFXtoRP_HsrCarrierApt.ftl | 2 +- RFXtoRP_HsrDepot.ftl | 34 +++++++++++++++++----------------- RFXtoRP_HsrLoadInfo.ftl | 2 +- RFXtoRP_HsrPro.ftl | 2 +- RFXtoRP_HsrReceiptList.ftl | 2 +- RPtoRFX_ExecutionflowEvent.ftl | 26 +++++++++++++------------- 13 files changed, 119 insertions(+), 119 deletions(-) diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index c0b031b..6b47034 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -14,33 +14,33 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign carrier = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign carrier = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCarrier_ActorCreated.ftl"> + "datas" : + <#include "RFXtoRP_HsaCarrier_ActorCreated.ftl"> } - ] + ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************************* --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign carrier = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign carrier = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl"> + "datas" : + <#include "RFXtoRP_HsaCarrier_ActorDeleted.ftl"> } - ] + ] <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaCons.ftl b/RFXtoRP_HsaCons.ftl index 1c7b34b..8932eb4 100644 --- a/RFXtoRP_HsaCons.ftl +++ b/RFXtoRP_HsaCons.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -14,33 +14,33 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign actor = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign actor = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCons_ActorCreated.ftl"> + "datas" : + <#include "RFXtoRP_HsaCons_ActorCreated.ftl"> } - ] + ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign actor = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign actor = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCons_ActorDeleted.ftl"> + "datas" : + <#include "RFXtoRP_HsaCons_ActorDeleted.ftl"> } - ] + ] <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaItm.ftl b/RFXtoRP_HsaItm.ftl index d495402..66effc7 100644 --- a/RFXtoRP_HsaItm.ftl +++ b/RFXtoRP_HsaItm.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -15,37 +15,37 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign item = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign item = JsonUtil.jsonToMap(dataRfx)> + [ { <#if item.logistical_variant_list?? > - <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaItm_ItemCreated.ftl"> + "datas" : + <#include "RFXtoRP_HsaItm_ItemCreated.ftl"> <#else> <#stop "no LV for the item"> } ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign item = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign item = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaItm_ItemDeleted.ftl"> + "datas" : + <#include "RFXtoRP_HsaItm_ItemDeleted.ftl"> } - ] + ] <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaItmLv.ftl b/RFXtoRP_HsaItmLv.ftl index 2b91ca2..4b914aa 100644 --- a/RFXtoRP_HsaItmLv.ftl +++ b/RFXtoRP_HsaItmLv.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -15,31 +15,31 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign lv = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign lv = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantUpdated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl"> + "datas" : + <#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl"> } - ] + ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign lv = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign lv = JsonUtil.jsonToMap(dataRfx)> + [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ItemLogisticVariantRemoved> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl"> + "datas" : + <#include "RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl"> } - ] - <#break> + ] + <#break> <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaLstCarSta.ftl b/RFXtoRP_HsaLstCarSta.ftl index 8b00fd7..635e62b 100644 --- a/RFXtoRP_HsaLstCarSta.ftl +++ b/RFXtoRP_HsaLstCarSta.ftl @@ -36,5 +36,5 @@ <#break> <#default> - <#stop "event not supported"> + <#stop > \ No newline at end of file diff --git a/RFXtoRP_HsaProStatus.ftl b/RFXtoRP_HsaProStatus.ftl index 99a4993..87d072c 100644 --- a/RFXtoRP_HsaProStatus.ftl +++ b/RFXtoRP_HsaProStatus.ftl @@ -72,10 +72,10 @@ <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> - <#stop "event not supported (case D)"> + <#stop > <#break> <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 52fe20f..7250b4e 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -14,33 +14,33 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign actor = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign actor = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> + "datas" : + <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> } - ] + ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign actor = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign actor = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaSup_ActorDeleted.ftl"> + "datas" : + <#include "RFXtoRP_HsaSup_ActorDeleted.ftl"> } - ] + ] <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsrCarrierApt.ftl b/RFXtoRP_HsrCarrierApt.ftl index 8b00fd7..635e62b 100644 --- a/RFXtoRP_HsrCarrierApt.ftl +++ b/RFXtoRP_HsrCarrierApt.ftl @@ -36,5 +36,5 @@ <#break> <#default> - <#stop "event not supported"> + <#stop > \ No newline at end of file diff --git a/RFXtoRP_HsrDepot.ftl b/RFXtoRP_HsrDepot.ftl index 08a4082..cd822b3 100644 --- a/RFXtoRP_HsrDepot.ftl +++ b/RFXtoRP_HsrDepot.ftl @@ -3,7 +3,7 @@ <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -14,33 +14,33 @@ <#case "U"> <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrDepot_ActorCreated.ftl"> + "datas" : + <#include "RFXtoRP_HsrDepot_ActorCreated.ftl"> } - ] + ] <#break> - + <#case "D"> <#-- *********************************************** Action = DELETE *************************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> - <#assign depot = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign depot = JsonUtil.jsonToMap(dataRfx)> + [ { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorDeleted> "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrDepot_ActorDeleted.ftl"> + "datas" : + <#include "RFXtoRP_HsrDepot_ActorDeleted.ftl"> } - ] + ] <#break> - - + + <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsrLoadInfo.ftl b/RFXtoRP_HsrLoadInfo.ftl index 8b00fd7..635e62b 100644 --- a/RFXtoRP_HsrLoadInfo.ftl +++ b/RFXtoRP_HsrLoadInfo.ftl @@ -36,5 +36,5 @@ <#break> <#default> - <#stop "event not supported"> + <#stop > \ No newline at end of file diff --git a/RFXtoRP_HsrPro.ftl b/RFXtoRP_HsrPro.ftl index e329d46..1ef9917 100644 --- a/RFXtoRP_HsrPro.ftl +++ b/RFXtoRP_HsrPro.ftl @@ -63,6 +63,6 @@ <#default> - <#stop "event not supported"> + <#stop > diff --git a/RFXtoRP_HsrReceiptList.ftl b/RFXtoRP_HsrReceiptList.ftl index d25cd93..18279c7 100644 --- a/RFXtoRP_HsrReceiptList.ftl +++ b/RFXtoRP_HsrReceiptList.ftl @@ -98,6 +98,6 @@ <#default> - <#stop "event not supported"> + <#stop > diff --git a/RPtoRFX_ExecutionflowEvent.ftl b/RPtoRFX_ExecutionflowEvent.ftl index 95d8132..89519e8 100644 --- a/RPtoRFX_ExecutionflowEvent.ftl +++ b/RPtoRFX_ExecutionflowEvent.ftl @@ -5,7 +5,7 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign eventRP = JsonUtil.jsonToMap(input)> +<#assign eventRP = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> @@ -24,28 +24,28 @@ <#if executionflow.MetaData??> <#assign Header_MetaData_Map = JsonUtil.sequenceToMap(executionflow.MetaData, "Key", "Value") /> - - [ - <#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected> + + [ + <#if eventRP.partnerAppRole == "ShipFrom" && executionflow.ShipFrom.ActorID != "" && executionflow.ShipFrom.Actor.IsShipFromConnected?? && executionflow.ShipFrom.Actor.IsShipFromConnected> { - <#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post> + <#assign apiRestReflexID = ApiRestReflexID.preparation_orders_post> "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_PrepOrder.ftl"> + "datas" : + <#include "RPtoRFX_PrepOrder.ftl"> } - <#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected> + <#if eventRP.partnerAppRole == "ShipTo" && executionflow.ShipTo.ActorID != "" && executionflow.ShipTo.Actor.IsShipToConnected?? && executionflow.ShipTo.Actor.IsShipToConnected> { - <#assign apiRestReflexID = ApiRestReflexID.receipts_post> + <#assign apiRestReflexID = ApiRestReflexID.receipts_post> "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_Receipt.ftl"> + "datas" : + <#include "RPtoRFX_Receipt.ftl"> } - ] + ] <#break> <#default> - <#stop "Event not processed"> + <#stop > From 3c11695650c3604acb331bc5d6f01206f7429b0c Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 18 Nov 2024 10:25:57 +0100 Subject: [PATCH 090/132] CountryCode --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index a72d93e..bd37d45 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -57,7 +57,12 @@ "Address" : { "City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> + <#if isCountryCode> "CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}", + <#else> + "CountryCode" : "", + "PostalCode" : "${(preparation_order.address.postal_code!"")?json_string}", "StreetAddressOne" : "${(preparation_order.address.street_and_number_and_po_box!"")?json_string}", "StreetAddressTwo" : "${(preparation_order.address.additional_address_data_1!"")?json_string}", From 20d77f21edccfef84f976e33a61d278d227191eb Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 18 Nov 2024 11:20:56 +0100 Subject: [PATCH 091/132] CountryCode --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index bd37d45..53f554a 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -57,7 +57,7 @@ "Address" : { "City" : "${(preparation_order.address.post_code_area_name!"")?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> + <#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) /> <#if isCountryCode> "CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}", <#else> From e41309e74488f41991896cced6f285904dce6f7a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 19 Nov 2024 11:17:59 +0100 Subject: [PATCH 092/132] Correction priority date --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index fdc74b4..8653828 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -21,7 +21,7 @@ "Goods": { "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}", - <#if (priority_date!="") && (priority_date?starts_with("00")== false) > + <#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) > "PriorityDate": "${priority_date}", <#else> "PriorityDate": "1970-01-01T00:00:00Z", From f5e6c2b22e7ba0aea63a42d732a0ddd50f2fd057 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 2 Dec 2024 16:03:45 +0100 Subject: [PATCH 093/132] modif trim --- RFXtoRP_HsaDispute_Created.ftl | 5 ++- RFXtoRP_HsaDispute_MessageSent.ftl | 50 +++++++++++++++++++++--------- 2 files changed, 37 insertions(+), 18 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 22af7b5..f310c56 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -9,14 +9,13 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" <#else> <#stop "preparation order list is empty" > - <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index f7c1e48..63f0db2 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -6,11 +6,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, @@ -32,11 +36,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, @@ -50,11 +58,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, @@ -68,11 +80,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, @@ -86,11 +102,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?json_string}${dispute.dispute_preparation.preparation_activity_code?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?json_string}${dispute.dispute_reception.reception_activity_code?json_string}${dispute.dispute_reception.reception_contractor_code?json_string}${dispute.dispute_year_number?json_string}${dispute.dispute_number?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" }, From 329747d225c47f5a4703dee24b2246943c6535c9 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 2 Dec 2024 16:21:14 +0100 Subject: [PATCH 094/132] modifs ID Claim --- RFXtoRP_HsaDispute_Created.ftl | 4 ++-- RFXtoRP_HsaDispute_MessageSent.ftl | 23 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index f310c56..c85da89 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -9,13 +9,13 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 63f0db2..3f2fc75 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -6,15 +6,15 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if dispute.dispute_preparation??> + <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, @@ -38,13 +38,13 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, @@ -60,13 +60,13 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, @@ -82,15 +82,16 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" + }, "Payload": { "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" @@ -104,13 +105,13 @@ "ID": { <#if dispute.dispute_preparation??> <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?trim?json_string}${dispute.dispute_preparation.preparation_activity_code?trim?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_preparation.preparation_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_activity_code?replace(" ","")?json_string}${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" <#else> <#stop "preparation order list is empty" > <#else> <#if dispute.dispute_reception??> - "RefID": "${dispute.dispute_reception.reception_physical_depot_code?trim?json_string}${dispute.dispute_reception.reception_activity_code?trim?json_string}${dispute.dispute_reception.reception_contractor_code?trim?json_string}${dispute.dispute_year_number?trim?json_string}${dispute.dispute_number?trim?json_string}" + "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" }, From d3c7d5a96c7675abd90ce065a8e402878f45f7e8 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 2 Dec 2024 16:26:44 +0100 Subject: [PATCH 095/132] modifs --- RFXtoRP_HsaDispute_MessageSent.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsaDispute_MessageSent.ftl b/RFXtoRP_HsaDispute_MessageSent.ftl index 3f2fc75..6b59ba0 100644 --- a/RFXtoRP_HsaDispute_MessageSent.ftl +++ b/RFXtoRP_HsaDispute_MessageSent.ftl @@ -91,7 +91,6 @@ "RefID": "${dispute.dispute_reception.reception_physical_depot_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_activity_code?replace(" ","")?json_string}${dispute.dispute_reception.reception_contractor_code?replace(" ","")?json_string}${dispute.dispute_year_number?replace(" ","")?json_string}${dispute.dispute_number?replace(" ","")?json_string}" - }, "Payload": { "Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}" From b6415fa316bfb512a5f872d5b3a466873d4b62c3 Mon Sep 17 00:00:00 2001 From: frea Date: Mon, 6 Jan 2025 17:56:10 +0100 Subject: [PATCH 096/132] commit first --- RFXtoRP_HsaCarrier.ftl | 20 +++++++++ RFXtoRP_HsaCarrier_ActorCreated.ftl | 3 -- RFXtoRP_HsaCarrier_ActorDeleted.ftl | 3 -- RFXtoRP_HsaCarrier_ActorUpdated.ftl | 70 +++++++++++++++++++++++++++++ RFXtoRP_HsaCons.ftl | 23 +++++++++- RFXtoRP_HsaCons_ActorCreated.ftl | 3 -- RFXtoRP_HsaCons_ActorDeleted.ftl | 3 -- RFXtoRP_HsaCons_ActorUpdated.ftl | 70 +++++++++++++++++++++++++++++ RFXtoRP_HsaSup.ftl | 20 +++++++++ RFXtoRP_HsaSup_ActorCreated.ftl | 3 -- RFXtoRP_HsaSup_ActorDeleted.ftl | 3 -- RFXtoRP_HsaSup_ActorUpdated.ftl | 70 +++++++++++++++++++++++++++++ 12 files changed, 272 insertions(+), 19 deletions(-) create mode 100644 RFXtoRP_HsaCarrier_ActorUpdated.ftl create mode 100644 RFXtoRP_HsaCons_ActorUpdated.ftl create mode 100644 RFXtoRP_HsaSup_ActorUpdated.ftl diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index 6b47034..0125944 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -2,6 +2,9 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -15,6 +18,22 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier = JsonUtil.jsonToMap(dataRfx)> + <#assign refID = RFXtoRPprefixConsignee(carrier.code?trim?json_string)> + + <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> + <#assign actorRP = JsonUtil.jsonToMap(response)> + <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCarrier_ActorUpdated.ftl"> + } + ] + <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> @@ -23,6 +42,7 @@ <#include "RFXtoRP_HsaCarrier_ActorCreated.ftl"> } ] + <#break> <#case "D"> diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 8ac9722..65876a4 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index 62b69a2..e3082b4 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCarrier_ActorUpdated.ftl b/RFXtoRP_HsaCarrier_ActorUpdated.ftl new file mode 100644 index 0000000..74b93ac --- /dev/null +++ b/RFXtoRP_HsaCarrier_ActorUpdated.ftl @@ -0,0 +1,70 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${RFXtoRPprefixConsignee(carrier.code?trim?json_string)}" + }, + "Payload": { + "Name": "${carrier.designation?json_string}", + "PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}", + "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, + "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, + "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", + <#-- DOTO CarrierServices ID Label --> + <#if actorRP.Objects[0].Payload.CarrierServices??> + "CarrierServices" : [ + <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> + { + "ID" : "${carrierService.ID!""}", + "Label" : "${carrierService.Label!""}" + }<#sep>, + + ], + + <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, + + "Address": + { + + <#-- if Reflex WMS is structured --> + <#if carrier.consignee_structured_address??> + + "Name": "${carrier.consignee_structured_address.name_or_company?json_string}", + "StreetAddressOne" : "${carrier.consignee_structured_address.street_and_PO?json_string}", + "StreetAddressTwo" : "${carrier.consignee_structured_address.additionnal_data?json_string}", + "PostalCode" : "${carrier.consignee_structured_address.postal_code?json_string}", + "City" : "${carrier.consignee_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(carrier.consignee_structured_address.country_code?upper_case) /> + <#if isCountryCode> + "CountryCode" : "${carrier.consignee_structured_address.country_code?upper_case?json_string}", + <#else> + "CountryCode" : "", + + "ProvinceCode": "${carrier.consignee_structured_address.territorial_div_code?json_string}", + "State": "${carrier.consignee_structured_address.country_designation?json_string}" + + <#-- if Reflex WMS is not structured --> + <#else> + <#if carrier.address?? > + + "Name": "${carrier.address.company_name?json_string}", + "StreetAddressOne" : "${carrier.address.address_1?json_string}", + "StreetAddressTwo" : "${carrier.address.address_2?json_string}", + "StreetAddressThree" : "${carrier.address.address_3?json_string}", + "CountryCode" : "" + + + }, + <#if carrier.address?? > + "Phones": ["${carrier.address.telephone?json_string}", + "${carrier.address.other_number?json_string}" + ], + + "Typology": "TYPOLOGY_UNKNOWN" + } + } +] diff --git a/RFXtoRP_HsaCons.ftl b/RFXtoRP_HsaCons.ftl index 8932eb4..e0fd096 100644 --- a/RFXtoRP_HsaCons.ftl +++ b/RFXtoRP_HsaCons.ftl @@ -2,6 +2,10 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> + <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -15,7 +19,23 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign actor = JsonUtil.jsonToMap(dataRfx)> - [ + <#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)> + + <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> + <#assign actorRP = JsonUtil.jsonToMap(response)> + <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCons_ActorUpdated.ftl"> + } + ] + <#else> + [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -23,6 +43,7 @@ <#include "RFXtoRP_HsaCons_ActorCreated.ftl"> } ] + <#break> <#case "D"> diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 84df17a..502da80 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index 89d4fce..dd83c6f 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCons_ActorUpdated.ftl b/RFXtoRP_HsaCons_ActorUpdated.ftl new file mode 100644 index 0000000..e89a7c6 --- /dev/null +++ b/RFXtoRP_HsaCons_ActorUpdated.ftl @@ -0,0 +1,70 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}" + }, + "Payload": { + "Name": "${actor.designation?json_string}", + "PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}", + "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, + "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, + "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", + <#-- DOTO CarrierServices ID Label --> + <#if actorRP.Objects[0].Payload.CarrierServices??> + "CarrierServices" : [ + <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> + { + "ID" : "${carrierService.ID!""}", + "Label" : "${carrierService.Label!""}" + }<#sep>, + + ], + + <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, + + "Address": + { + + <#-- if Reflex WMS is structured --> + <#if actor.consignee_structured_address??> + + "Name": "${actor.consignee_structured_address.name_or_company?json_string}", + "StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}", + "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", + "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", + "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) /> + <#if isCountryCode> + "CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}", + <#else> + "CountryCode" : "", + + "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", + "State": "${actor.consignee_structured_address.country_designation?json_string}" + + <#-- if Reflex WMS is not structured --> + <#else> + <#if actor.address?? > + + "Name": "${actor.address.company_name?json_string}", + "StreetAddressOne" : "${actor.address.address_1?json_string}", + "StreetAddressTwo" : "${actor.address.address_2?json_string}", + "StreetAddressThree" : "${actor.address.address_3?json_string}", + "CountryCode" : "" + + + }, + <#if actor.address?? > + "Phones": ["${actor.address.telephone?json_string}", + "${actor.address.other_number?json_string}" + ], + + "Typology": "TYPOLOGY_UNKNOWN" + } + } +] diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 7250b4e..98f9474 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -2,6 +2,9 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -15,6 +18,22 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign actor = JsonUtil.jsonToMap(dataRfx)> + <#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)> + + <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> + <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> + <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> + <#assign actorRP = JsonUtil.jsonToMap(response)> + <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > + [ + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsaCons_ActorUpdated.ftl"> + } + ] + <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> @@ -23,6 +42,7 @@ <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> } ] + <#break> <#case "D"> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 23a560c..6c57b1f 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 9c00b09..0927eca 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -1,6 +1,3 @@ -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaSup_ActorUpdated.ftl b/RFXtoRP_HsaSup_ActorUpdated.ftl new file mode 100644 index 0000000..e89a7c6 --- /dev/null +++ b/RFXtoRP_HsaSup_ActorUpdated.ftl @@ -0,0 +1,70 @@ +[ + { + "Header": { + "ProjectID": "${projectRP}" + }, + "ID": { + "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}" + }, + "Payload": { + "Name": "${actor.designation?json_string}", + "PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}", + "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, + "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, + "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", + <#-- DOTO CarrierServices ID Label --> + <#if actorRP.Objects[0].Payload.CarrierServices??> + "CarrierServices" : [ + <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> + { + "ID" : "${carrierService.ID!""}", + "Label" : "${carrierService.Label!""}" + }<#sep>, + + ], + + <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, + + "Address": + { + + <#-- if Reflex WMS is structured --> + <#if actor.consignee_structured_address??> + + "Name": "${actor.consignee_structured_address.name_or_company?json_string}", + "StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}", + "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", + "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", + "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) /> + <#if isCountryCode> + "CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}", + <#else> + "CountryCode" : "", + + "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", + "State": "${actor.consignee_structured_address.country_designation?json_string}" + + <#-- if Reflex WMS is not structured --> + <#else> + <#if actor.address?? > + + "Name": "${actor.address.company_name?json_string}", + "StreetAddressOne" : "${actor.address.address_1?json_string}", + "StreetAddressTwo" : "${actor.address.address_2?json_string}", + "StreetAddressThree" : "${actor.address.address_3?json_string}", + "CountryCode" : "" + + + }, + <#if actor.address?? > + "Phones": ["${actor.address.telephone?json_string}", + "${actor.address.other_number?json_string}" + ], + + "Typology": "TYPOLOGY_UNKNOWN" + } + } +] From 498ef5a5bfa65a588b12216832c5dedef3633281 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 7 Jan 2025 11:16:32 +0100 Subject: [PATCH 097/132] SCPN1-8043 --- RFXtoRP_HsaCarrier.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index 0125944..48d63a2 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -18,7 +18,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixConsignee(carrier.code?trim?json_string)> + <#assign refID = RFXtoRPprefixConsignee(carrier.carrier_code?trim?json_string)> <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> From a7bf18f25d580e9ebe0cc5b249a42604a993b90b Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 7 Jan 2025 17:40:55 +0100 Subject: [PATCH 098/132] SCPN1-8043 --- RFXtoRP_HsaCarrier.ftl | 2 +- RFXtoRP_HsaCarrier_ActorUpdated.ftl | 31 +++++++++++--------- RFXtoRP_HsaCons_ActorUpdated.ftl | 9 ++++-- RFXtoRP_HsaSup.ftl | 4 +-- RFXtoRP_HsaSup_ActorUpdated.ftl | 45 ++++++++++++++++------------- 5 files changed, 53 insertions(+), 38 deletions(-) diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index 48d63a2..a724924 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -18,7 +18,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixConsignee(carrier.carrier_code?trim?json_string)> + <#assign refID = RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)> <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> diff --git a/RFXtoRP_HsaCarrier_ActorUpdated.ftl b/RFXtoRP_HsaCarrier_ActorUpdated.ftl index 74b93ac..fa06416 100644 --- a/RFXtoRP_HsaCarrier_ActorUpdated.ftl +++ b/RFXtoRP_HsaCarrier_ActorUpdated.ftl @@ -4,17 +4,22 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${RFXtoRPprefixConsignee(carrier.code?trim?json_string)}" + "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}" }, "Payload": { - "Name": "${carrier.designation?json_string}", + "Name": "${carrier.carrier_designation?json_string}", "PartnerID" : "${actorRP.Objects[0].Payload.PartnerID!""?json_string}", "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + <#if actorRP.Objects[0].Payload.IsShipFromConnected> + "ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}", + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, + <#if actorRP.Objects[0].Payload.IsShipToConnected> + "ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}", + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", - <#-- DOTO CarrierServices ID Label --> <#if actorRP.Objects[0].Payload.CarrierServices??> "CarrierServices" : [ <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> @@ -31,21 +36,21 @@ { <#-- if Reflex WMS is structured --> - <#if carrier.consignee_structured_address??> + <#if carrier.carrier_structured_address??> - "Name": "${carrier.consignee_structured_address.name_or_company?json_string}", - "StreetAddressOne" : "${carrier.consignee_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${carrier.consignee_structured_address.additionnal_data?json_string}", - "PostalCode" : "${carrier.consignee_structured_address.postal_code?json_string}", - "City" : "${carrier.consignee_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(carrier.consignee_structured_address.country_code?upper_case) /> + "Name": "${carrier.carrier_structured_address.name_or_company?json_string}", + "StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}", + "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", + "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", + "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) /> <#if isCountryCode> - "CountryCode" : "${carrier.consignee_structured_address.country_code?upper_case?json_string}", + "CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", - "ProvinceCode": "${carrier.consignee_structured_address.territorial_div_code?json_string}", - "State": "${carrier.consignee_structured_address.country_designation?json_string}" + "ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}", + "State": "${carrier.carrier_structured_address.country_designation?json_string}" <#-- if Reflex WMS is not structured --> <#else> diff --git a/RFXtoRP_HsaCons_ActorUpdated.ftl b/RFXtoRP_HsaCons_ActorUpdated.ftl index e89a7c6..c5c4d94 100644 --- a/RFXtoRP_HsaCons_ActorUpdated.ftl +++ b/RFXtoRP_HsaCons_ActorUpdated.ftl @@ -12,9 +12,14 @@ "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + <#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected> + "ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}", + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, - "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", - <#-- DOTO CarrierServices ID Label --> + <#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected> + "ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}", + + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", <#if actorRP.Objects[0].Payload.CarrierServices??> "CarrierServices" : [ <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 98f9474..5ee9c2c 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -18,7 +18,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign actor = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)> + <#assign refID = RFXtoRPprefixSupplier(actor.code?trim?json_string)> <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> @@ -30,7 +30,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaCons_ActorUpdated.ftl"> + <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> } ] <#else> diff --git a/RFXtoRP_HsaSup_ActorUpdated.ftl b/RFXtoRP_HsaSup_ActorUpdated.ftl index e89a7c6..62c2e43 100644 --- a/RFXtoRP_HsaSup_ActorUpdated.ftl +++ b/RFXtoRP_HsaSup_ActorUpdated.ftl @@ -4,7 +4,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}" + "RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}" }, "Payload": { "Name": "${actor.designation?json_string}", @@ -12,9 +12,14 @@ "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, + <#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected> + "ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}", + "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, + <#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected> + "ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}", + "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", - <#-- DOTO CarrierServices ID Label --> <#if actorRP.Objects[0].Payload.CarrierServices??> "CarrierServices" : [ <#list actorRP.Objects[0].Payload.CarrierServices as carrierService> @@ -31,37 +36,37 @@ { <#-- if Reflex WMS is structured --> - <#if actor.consignee_structured_address??> + <#if actor.supplier_structured_address??> - "Name": "${actor.consignee_structured_address.name_or_company?json_string}", - "StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", - "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", - "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", - <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) /> + "Name": "${actor.supplier_structured_address.name_or_company?json_string}", + "StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}", + "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", + "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", + "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", + <#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) /> <#if isCountryCode> - "CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}", + "CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}", <#else> "CountryCode" : "", - "ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}", - "State": "${actor.consignee_structured_address.country_designation?json_string}" + "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", + "State": "${actor.supplier_structured_address.country_designation?json_string}" <#-- if Reflex WMS is not structured --> <#else> - <#if actor.address?? > + <#if actor.optional_attributes?? > - "Name": "${actor.address.company_name?json_string}", - "StreetAddressOne" : "${actor.address.address_1?json_string}", - "StreetAddressTwo" : "${actor.address.address_2?json_string}", - "StreetAddressThree" : "${actor.address.address_3?json_string}", + "Name": "${actor.optional_attributes.company_name?json_string}", + "StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}", + "StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}", + "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}", "CountryCode" : "" }, - <#if actor.address?? > - "Phones": ["${actor.address.telephone?json_string}", - "${actor.address.other_number?json_string}" + <#if actor.optional_attributes?? > + "Phones": ["${actor.optional_attributes.telephone?json_string}", + "${actor.optional_attributes.other_number?json_string}" ], "Typology": "TYPOLOGY_UNKNOWN" From 559fff82e5a695e50d8f158865a1f23e0dc32142 Mon Sep 17 00:00:00 2001 From: frea Date: Mon, 13 Jan 2025 16:23:17 +0100 Subject: [PATCH 099/132] SCPN1-8043 --- RFXtoRP_HsaCarrier_ActorUpdated.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsaCarrier_ActorUpdated.ftl b/RFXtoRP_HsaCarrier_ActorUpdated.ftl index fa06416..f6ad18c 100644 --- a/RFXtoRP_HsaCarrier_ActorUpdated.ftl +++ b/RFXtoRP_HsaCarrier_ActorUpdated.ftl @@ -12,11 +12,11 @@ "IsCarrier" : ${(actorRP.Objects[0].Payload.IsCarrier!false)?c}, "ManagedStock": ${(actorRP.Objects[0].Payload.ManagedStock!false)?c}, "IsShipFromConnected": ${(actorRP.Objects[0].Payload.IsShipFromConnected!false)?c}, - <#if actorRP.Objects[0].Payload.IsShipFromConnected> + <#if actorRP.Objects[0].Payload.IsShipFromConnected?? && actorRP.Objects[0].Payload.IsShipFromConnected> "ShipFromPartnerAppID" : "${actorRP.Objects[0].Payload.ShipFromPartnerAppID!""?json_string}", "IsShipToConnected": ${(actorRP.Objects[0].Payload.IsShipToConnected!false)?c}, - <#if actorRP.Objects[0].Payload.IsShipToConnected> + <#if actorRP.Objects[0].Payload.IsShipToConnected?? && actorRP.Objects[0].Payload.IsShipToConnected> "ShipToPartnerAppID" : "${actorRP.Objects[0].Payload.ShipToPartnerAppID!""?json_string}", "PhotoURI": "${actorRP.Objects[0].Payload.PhotoURI!""}", From e806da1129e3ed11e9621b2e37357a4115675963 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 16 Jan 2025 17:59:55 +0100 Subject: [PATCH 100/132] SCPN1-8043 --- RFXtoRP_HsaSup.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 5ee9c2c..309bc71 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -30,7 +30,7 @@ <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : - <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> + <#include "RFXtoRP_HsaSup_ActorUpdated.ftl"> } ] <#else> From df2332b17e7f81f56602a2a68a0efb9cbde85806 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 21 Jan 2025 15:41:31 +0100 Subject: [PATCH 101/132] move 520 --- RFXtoRP_HsaIpgMove.ftl | 3 ++- RFXtoRP_HsaIpgMove_StockMoved.ftl | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaIpgMove.ftl b/RFXtoRP_HsaIpgMove.ftl index 0582ada..9884ec8 100644 --- a/RFXtoRP_HsaIpgMove.ftl +++ b/RFXtoRP_HsaIpgMove.ftl @@ -31,7 +31,8 @@ reflexMvtStockInterface.ipg_move_type == "420" || reflexMvtStockInterface.ipg_move_type == "455" || reflexMvtStockInterface.ipg_move_type == "460" || - reflexMvtStockInterface.ipg_move_type == "465" + reflexMvtStockInterface.ipg_move_type == "465" || + (reflexMvtStockInterface.ipg_move_type == "520" && reflexMvtStockInterface.ipg_move_creation_program == "HFST69") > [ { diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index f45d3c1..d9d0fd7 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -18,7 +18,8 @@ "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "455":"STOCK_MOVEMENT_TYPE_FIX", "460":"STOCK_MOVEMENT_TYPE_FIX", - "465":"STOCK_MOVEMENT_TYPE_FIX" + "465":"STOCK_MOVEMENT_TYPE_FIX", + "520":"STOCK_MOVEMENT_TYPE_OUTBOUND" }> <#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> @@ -52,7 +53,11 @@ "Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}", "ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}", "Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}", - "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}", + <#if reflexMvtStockInterface.ipg_move_type == "520" > + "Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}", + <#else> + "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}", + "ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}", <#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0> "OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}", From 2318bee797bfb87a81350aa029e8e59133119a12 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 6 Feb 2025 09:50:00 +0100 Subject: [PATCH 102/132] SCPN1-8291 --- RFX_PartnerAPP_Settings.ftl | 1 + RP_connector.ftl | 38 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 RFX_PartnerAPP_Settings.ftl create mode 100644 RP_connector.ftl diff --git a/RFX_PartnerAPP_Settings.ftl b/RFX_PartnerAPP_Settings.ftl new file mode 100644 index 0000000..4a2c0b0 --- /dev/null +++ b/RFX_PartnerAPP_Settings.ftl @@ -0,0 +1 @@ +<#assign supplyOfTheTrackingNumber = 0> diff --git a/RP_connector.ftl b/RP_connector.ftl new file mode 100644 index 0000000..cb996bd --- /dev/null +++ b/RP_connector.ftl @@ -0,0 +1,38 @@ +<#-- **** +Connector provides some of parameters through the class connectorParameters +those parameters are stored in FTL file Conf-connector.ftl for later use in some of the data ftl files +*** --> + +<#-- *********************************************** Parameter global ******************** --> +<#assign file = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> +<#assign aDateTime = .now> + +<#noparse><#-- Date of last generation : ${aDateTime}<#noparse> --> +<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --> + +<#noparse><#-- Possible values for SupplyOfTheTrackingNumber parameter : --> +<#noparse><#-- 0 : Always empty --> +<#noparse><#-- 1 : Always use Reflex WMS tracking --> +<#noparse><#-- 2 : Always use the HU number --> +<#noparse><#-- 3 : Use Reflex tracking if it exists, the HU number otherwise --> + +<#list file.parameters as parameter> +<#switch parameter.type> + <#case "string"> + <#noparse><#assign ${parameter.name}<#noparse> = "${parameter.value!""}<#noparse>"> + <#break> + + <#case "integer"> + <#noparse><#assign ${parameter.name}<#noparse> = ${parameter.value!0}<#noparse>> + <#break> + + <#case "boolean"> + <#noparse><#assign ${parameter.name}<#noparse> = ${(parameter.value!false)?c}<#noparse>> + <#break> + + <#default> + + + From fda736c295634bfe7459f7840b9aaee02344acbc Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 7 Feb 2025 10:11:04 +0100 Subject: [PATCH 103/132] SCPN1-8291 --- RFX_PartnerAPP_Settings.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFX_PartnerAPP_Settings.ftl b/RFX_PartnerAPP_Settings.ftl index 4a2c0b0..dd4922d 100644 --- a/RFX_PartnerAPP_Settings.ftl +++ b/RFX_PartnerAPP_Settings.ftl @@ -1 +1 @@ -<#assign supplyOfTheTrackingNumber = 0> +<#assign supplyOfTheTrackingNumber = 3> From af0d846271c00b4f6b8a1606ee21a13ceb0578c7 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 7 Feb 2025 10:50:35 +0100 Subject: [PATCH 104/132] HU --- RFXtoRP_HsaIpgMove_StockMoved.ftl | 2 +- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 47 ++++++++++++++++++++----- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index d9d0fd7..883abee 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -54,7 +54,7 @@ "ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}", "Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}", <#if reflexMvtStockInterface.ipg_move_type == "520" > - "Reason": " Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}", + "Reason": " Direct Transfert ${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)} to ${RFXtoRPprefixDepot(reflexMvtStockInterface.transfer_consignee_physical_depot_code?trim?json_string)}", <#else> "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}", diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index de29490..d6fc12d 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -8,15 +8,44 @@ "ProjectID": "${projectRP}" }, "ID": { - <#if despatched_ipg.consignment_unit_id!=""> - "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", - <#else> - <#if despatched_ipg.carton_number != "000000000000000000"> - "RefID":"${despatched_ipg.carton_number}", - <#else> - "RefID":"${despatched_ipg.hd_number}", - - + <#switch supplyOfTheTrackingNumber> + <#case 0> + "RefID":"", + <#break> + <#case 1> + <#if despatched_ipg.consignment_unit_id!=""> + "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", + + <#break> + <#case 2> + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID":"${despatched_ipg.carton_number}", + <#else> + "RefID":"${despatched_ipg.hd_number}", + + <#break> + <#case 3> + <#if despatched_ipg.consignment_unit_id!=""> + "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", + <#else> + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID":"${despatched_ipg.carton_number}", + <#else> + "RefID":"${despatched_ipg.hd_number}", + + + <#break> + <#default> + <#if despatched_ipg.consignment_unit_id!=""> + "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", + <#else> + <#if despatched_ipg.carton_number != "000000000000000000"> + "RefID":"${despatched_ipg.carton_number}", + <#else> + "RefID":"${despatched_ipg.hd_number}", + + + "RefDate": { "DateTime": "${dispatched_datetime4}", From d955ccdbc4a90c0bc9b0a8194b1d9c5fde7058d6 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 7 Feb 2025 15:56:20 +0100 Subject: [PATCH 105/132] include --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index d6fc12d..4b444f1 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -1,6 +1,7 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> <#include "ActorPrefix.ftl"> +<#include "RFX_PartnerAPP_Settings.ftl"> [ <#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> { From 6319051741ecbeffeaa13942c05dbc63a4ddbb5b Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 7 Feb 2025 16:05:57 +0100 Subject: [PATCH 106/132] modif --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 4b444f1..e4b6d5c 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -16,6 +16,8 @@ <#case 1> <#if despatched_ipg.consignment_unit_id!=""> "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", + <#else> + "RefID":"", <#break> <#case 2> From 0e0397708f477f1a9e42376cb5dfe79c81c5e107 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 7 Feb 2025 16:15:15 +0100 Subject: [PATCH 107/132] modif --- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index e4b6d5c..11f78c6 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -11,13 +11,13 @@ "ID": { <#switch supplyOfTheTrackingNumber> <#case 0> - "RefID":"", + "RefID":" ", <#break> <#case 1> <#if despatched_ipg.consignment_unit_id!=""> "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", <#else> - "RefID":"", + "RefID":" ", <#break> <#case 2> From 71a73bded42751321006b4c8239120e565e6608e Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Feb 2025 11:06:00 +0100 Subject: [PATCH 108/132] modif --- RFXtoRP_HsrPrepa.ftl | 3 ++- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 5 ----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index d9afb7f..a9e0e08 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -6,6 +6,7 @@ <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> +<#include "RFX_PartnerAPP_Settings.ftl"> <#assign aDateTime = .now> @@ -54,7 +55,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? > + <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (supplyOfTheTrackingNumber!=0 || (despatched_ipg.consignment_unit_id!="" && supplyOfTheTrackingNumber==1))> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , { diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 11f78c6..e738a40 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -10,14 +10,9 @@ }, "ID": { <#switch supplyOfTheTrackingNumber> - <#case 0> - "RefID":" ", - <#break> <#case 1> <#if despatched_ipg.consignment_unit_id!=""> "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", - <#else> - "RefID":" ", <#break> <#case 2> From 4d59a53517fe1710adce5aca8f973a47dcaeb953 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 10 Feb 2025 11:56:10 +0100 Subject: [PATCH 109/132] modifs --- RFXtoRP_HsrPrepa.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index a9e0e08..6f8939b 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -55,7 +55,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (supplyOfTheTrackingNumber!=0 || (despatched_ipg.consignment_unit_id!="" && supplyOfTheTrackingNumber==1))> + <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (supplyOfTheTrackingNumber==2 || supplyOfTheTrackingNumber==3 || (despatched_ipg.consignment_unit_id!="" && supplyOfTheTrackingNumber==1))> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , { From 57533e8735d0f1791525f9afa4debcd0be19a99f Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 11 Feb 2025 17:53:39 +0100 Subject: [PATCH 110/132] SCPN1-8280 --- RFX_PartnerAPP_Settings.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFX_PartnerAPP_Settings.ftl b/RFX_PartnerAPP_Settings.ftl index dd4922d..6e5411d 100644 --- a/RFX_PartnerAPP_Settings.ftl +++ b/RFX_PartnerAPP_Settings.ftl @@ -1 +1 @@ -<#assign supplyOfTheTrackingNumber = 3> +<#assign trackingNumberSource = 3> From 172d6ead581212a92ae4d697316c8449cc904e80 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Tue, 11 Feb 2025 17:54:26 +0100 Subject: [PATCH 111/132] trackingNumberSource --- RFXtoRP_HsrPrepa.ftl | 2 +- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 6f8939b..38b4726 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -55,7 +55,7 @@ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> - <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (supplyOfTheTrackingNumber==2 || supplyOfTheTrackingNumber==3 || (despatched_ipg.consignment_unit_id!="" && supplyOfTheTrackingNumber==1))> + <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , { diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index e738a40..7b59fb2 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -9,7 +9,7 @@ "ProjectID": "${projectRP}" }, "ID": { - <#switch supplyOfTheTrackingNumber> + <#switch trackingNumberSource> <#case 1> <#if despatched_ipg.consignment_unit_id!=""> "RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}", From 57d4cb6be25e27c0b918ec689aaea61fa7bb9796 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Feb 2025 17:45:45 +0100 Subject: [PATCH 112/132] modifs hsrprepa --- RFXtoRP_HsrPrepa.ftl | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 38b4726..4c9923f 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -79,16 +79,16 @@ "datas" : <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> } - <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]??> - <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> - , - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> - } - + <#if !hd_numberHmapHUadded[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 )> + <#assign hd_numberHmapHUadded += {despatched_ipg.hd_number,despatched_ipg.hd_number}> + , + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl"> + } + From 45a31fb33fc292d8f031f1eea49ecad64a16a01b Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 27 Feb 2025 17:56:12 +0100 Subject: [PATCH 113/132] SCPN1-8401 (cherry picked from commit 724d4dd0c756a8c2f5b461874b36cd513feafbbd) --- RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl | 2 +- RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl | 2 +- ...oRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl | 8 ++++---- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 2 +- RFXtoRP_HsaIpgMove_StockMoved.ftl | 2 +- RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl | 2 +- RFXtoRP_HsaProStatus_PreparationCompleted.ftl | 2 +- RFXtoRP_HsaProStatus_PreparationExpected.ftl | 2 +- RFXtoRP_HsaProStatus_PreparationStarted.ftl | 2 +- RFXtoRP_HsaProStatus_TransportStarted.ftl | 2 +- RFXtoRP_HsrPrepa.ftl | 2 +- RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl | 2 +- RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl | 2 +- RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl | 2 +- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 +- RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl | 2 +- RFXtoRP_HsrPro_ExecutionflowCancelled.ftl | 2 +- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 4 ++-- RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl | 2 +- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 4 ++-- RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 2 +- RFXtoRP_HsrReceiptList_ReceiptExpected.ftl | 2 +- ReflexUtils.ftl | 5 +++++ 23 files changed, 32 insertions(+), 27 deletions(-) diff --git a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl index e248350..f507c4a 100644 --- a/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl +++ b/RFXtoRP_HfDtlStockLs_ActorSnapshotCompleted.ftl @@ -11,7 +11,7 @@ "RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}" }, "Payload": { - <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> + <#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) /> "Snapshot": { "EndDateTime": { "DateTime": "${generation_date}", diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl index fcf0f0c..4914bac 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl @@ -9,7 +9,7 @@ }, "Payload": { "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}", - <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> + <#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) /> "Snapshot": { "DateTime": { "DateTime": "${generation_date}", diff --git a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl index a26d58e..9a24817 100644 --- a/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl +++ b/RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl @@ -17,21 +17,21 @@ "Value": { "String" : "no batch"} <#else> "Value": { "String" : "${stock.batch_1}"} - + }, { "Key": "HeldForSpecificCode", "Value": { "Bool" : "${stock.held_for_specific_code}"} }, - + { - <#assign manufacturing_datetime = RfxDateTimetoUTC(stock.Date_of_manufacture,time_zone_offset_rfx) /> + <#assign manufacturing_datetime = RfxDateTimetoUTCWithTimezone(stock.Date_of_manufacture,time_zone_rfx) /> "Key": "ManufacturingDate", "Value": "Timestamp": { "AuthorTimeZone": "${time_zone_rfx}", "DateTime": "${manufacturing_datetime}" } - } + } ] --> diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 8653828..8ab1721 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -2,7 +2,7 @@ <#include "ReflexUtils.ftl"> <#include "ActorPrefix.ftl"> [ - <#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> + <#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) /> <#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> { "Header": { diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 883abee..1be2932 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -21,7 +21,7 @@ "465":"STOCK_MOVEMENT_TYPE_FIX", "520":"STOCK_MOVEMENT_TYPE_OUTBOUND" }> -<#assign generation_date = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> +<#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) /> <#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> [ { diff --git a/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl b/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl index 0a1b945..db1899a 100644 --- a/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) /> [ { diff --git a/RFXtoRP_HsaProStatus_PreparationCompleted.ftl b/RFXtoRP_HsaProStatus_PreparationCompleted.ftl index 7f9c79a..04c48ae 100644 --- a/RFXtoRP_HsaProStatus_PreparationCompleted.ftl +++ b/RFXtoRP_HsaProStatus_PreparationCompleted.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsaProStatus_PreparationExpected.ftl b/RFXtoRP_HsaProStatus_PreparationExpected.ftl index 7f9c79a..04c48ae 100644 --- a/RFXtoRP_HsaProStatus_PreparationExpected.ftl +++ b/RFXtoRP_HsaProStatus_PreparationExpected.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsaProStatus_PreparationStarted.ftl b/RFXtoRP_HsaProStatus_PreparationStarted.ftl index 7f9c79a..04c48ae 100644 --- a/RFXtoRP_HsaProStatus_PreparationStarted.ftl +++ b/RFXtoRP_HsaProStatus_PreparationStarted.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsaProStatus_TransportStarted.ftl b/RFXtoRP_HsaProStatus_TransportStarted.ftl index 7f9c79a..04c48ae 100644 --- a/RFXtoRP_HsaProStatus_TransportStarted.ftl +++ b/RFXtoRP_HsaProStatus_TransportStarted.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparationStatusInterface.preparation_status_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 4c9923f..5bbd320 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -54,7 +54,7 @@ <#assign hd_numberHmapHUadded ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> - <#assign HUadded_packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> + <#assign HUadded_packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> <#if !hd_numberHmap[despatched_ipg.hd_number]?? && (trackingNumberSource==2 || trackingNumberSource==3 || (despatched_ipg.consignment_unit_id!="" && trackingNumberSource==1))> <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> , diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index 1a780d5..4b7da84 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -1,7 +1,7 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ -<#assign dispatched3_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3> <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> diff --git a/RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl index f6c8deb..1adfad0 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_TrackingHuLabelled.ftl @@ -2,7 +2,7 @@ <#include "ReflexUtils.ftl"> <#include "ActorPrefix.ftl"> [ -<#assign dispatched_datetime5 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign dispatched_datetime5 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index a1b31be..7a6abd1 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -1,7 +1,7 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ -<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign refIDHmap_local ={}> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index a8ff88b..8aed82c 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -4,7 +4,7 @@ [ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> - <#assign packing_datetime = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) /> + <#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 7b59fb2..9f96b31 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -3,7 +3,7 @@ <#include "ActorPrefix.ftl"> <#include "RFX_PartnerAPP_Settings.ftl"> [ -<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> +<#assign dispatched_datetime4 = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> { "Header": { "ProjectID": "${projectRP}" diff --git a/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl b/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl index 9cdd1b6..b518fa7 100644 --- a/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) /> +<#assign preparation_status_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.modification_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 53f554a..9157f57 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -3,8 +3,8 @@ <#include "ActorPrefix.ftl"> [ { - <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) /> - <#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) /> + <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) /> + <#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(preparation_order.creation_datetime,time_zone_rfx) /> "Header": { "ProjectID": "${projectRP}" }, diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index 46a8692..e262117 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) /> +<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.modification_datetime,time_zone_rfx) /> [ { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index b5568df..d00662c 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -3,8 +3,8 @@ <#include "ActorPrefix.ftl"> [ { - <#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) /> - <#assign receipt_creation_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) /> + <#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) /> + <#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.creation_datetime,time_zone_rfx) /> "Header": { "ProjectID": "${projectRP}" }, diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index 485a5c5..e92a2a5 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) /> +<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.confirmation_datetime,time_zone_rfx) /> [ { "Header": { diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 65f257c..23cf130 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) /> +<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> [ { diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index afa299e..7bc33f6 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -9,6 +9,11 @@ <#return dateutc?datetime.iso?iso_nz(locale)> +<#function RfxDateTimetoUTCWithTimezone rfxdatetime timezone> + <#setting time_zone=timezone> + <#return (rfxdatetime?datetime.iso?iso_utc)> + + <#-- --------------------------------------------------------------------------------------- --> <#-- Split email reflex into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> From d2a00ffe2e5934d0579f6652a40f5ba1724cfb15 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 28 Feb 2025 09:45:48 +0100 Subject: [PATCH 114/132] claim --- RFXtoRP_HsaDispute_Created.ftl | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index c85da89..fb66661 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -39,29 +39,27 @@ "Value": "${dispute.dispute_amount}" }, + <#-- To configure --> + <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if dispute.dispute_type_code=="050" > <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", - <#else> - <#stop "preparation order list is empty" > + <#if TableReasonCode[dispute.dispute_reason_code]??> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" + <#else> + <#stop "preparation order list is empty" > + <#else> <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", - <#else> - <#stop "Type not supported" > + <#if TableReasonCode[dispute.dispute_reason_code]??> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" + <#else> + <#stop "Type not supported" > + - <#-- To configure --> - <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> - - <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"${TableReasonCode[dispute.dispute_reason_code]}" - <#else> - <#stop "Claim reason code not supported" > - - - } } ] From d4765890e5aa96140ade0131738c128ae8dd8446 Mon Sep 17 00:00:00 2001 From: frea Date: Tue, 4 Mar 2025 14:28:12 +0100 Subject: [PATCH 115/132] SCPN1-8401 (syntaxe error in RXftoRP-HsrPro_ExecutionflowDetected.ftl) (cherry picked from commit 9380d39bb65bc4dcf46c80f711e187721b2f3159) --- RFXtoRP_HsrPro_ExecutionflowDetected.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 9157f57..ee97306 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -4,7 +4,7 @@ [ { <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.planned_final_delivery_start_datetime,time_zone_rfx) /> - <#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(preparation_order.creation_datetime,time_zone_rfx) /> + <#assign pro_creation_datetime = RfxDateTimetoUTCWithTimezone(preparation_order.creation_datetime,time_zone_rfx) /> "Header": { "ProjectID": "${projectRP}" }, From 9aee7a9448b27b575c3eeec8f75846138ba7325b Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 6 Mar 2025 16:13:36 +0100 Subject: [PATCH 116/132] SCPN1-8401 (syntaxe error in RXftoRP-HsrReceiptList_ExecutionflowDetected.ftl et RXftoRP-HsrReceiptList_ExecutionflowReceiptComplet.ftl) (cherry picked from commit 2681a4dc2477fbf33e73e1d28dad708968855c94) --- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 2 +- RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index d00662c..be2fc6a 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -4,7 +4,7 @@ [ { <#assign receipt_datetime = RfxDateTimetoUTCWithTimezone(receipt.receipt_datetime,time_zone_rfx) /> - <#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.creation_datetime,time_zone_rfx) /> + <#assign receipt_creation_datetime = RfxDateTimetoUTCWithTimezone(receipt.creation_datetime,time_zone_rfx) /> "Header": { "ProjectID": "${projectRP}" }, diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl index e92a2a5..91390fb 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowReceiptCompleted.ftl @@ -1,6 +1,6 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> -<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezoneWithTimezone(receipt.confirmation_datetime,time_zone_rfx) /> +<#assign receipt_status_datetime = RfxDateTimetoUTCWithTimezone(receipt.confirmation_datetime,time_zone_rfx) /> [ { "Header": { From 810e0eaa89bc7c963f8e44cc500cb70b5693b138 Mon Sep 17 00:00:00 2001 From: frea Date: Fri, 7 Mar 2025 14:16:54 +0100 Subject: [PATCH 117/132] SCPN1-8401 (cherry picked from commit 0cec20a8aa91ce5d958a9d6087d4778f86f2c5fd) --- RFXtoRP_RfxConfigurationRp.ftl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RFXtoRP_RfxConfigurationRp.ftl b/RFXtoRP_RfxConfigurationRp.ftl index d89dac8..1b19bf7 100644 --- a/RFXtoRP_RfxConfigurationRp.ftl +++ b/RFXtoRP_RfxConfigurationRp.ftl @@ -25,8 +25,8 @@ -<#noparse><#assign time_zone_rfx = "${file.author_time_zone!"UTC"}<#noparse>"> -<#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+00:00"}<#noparse>"> +<#noparse><#assign time_zone_rfx = "${file.author_time_zone!"Europe/Paris"}<#noparse>"> +<#noparse><#assign time_zone_offset_rfx = "${file.time_zone_offset!"+01:00"}<#noparse>"> <#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project> From a849b1c92e38abe8bb1d31e6827d0feee60520d5 Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 12 Mar 2025 15:05:01 +0100 Subject: [PATCH 118/132] update URL in readme.md (cherry picked from commit 596394863581bf2ad87a33641dfb96a5a5f0eb61) --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d20fd83..6606269 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,11 @@ # Reflex Platform Core FTLs - + These FTL core files aim to translate data flow from Reflex WMS into Reflex platform API. - -You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/howto/reflex-wms-connector/ - +You can find more info about those files in the Reflex platform documentation center : https://docs.viz.reflex-platform.com/connectivity/partnerapp/reflex-wms-connector/ + + From 9f63f0ee6229e514c469a8b56925457d7d290f26 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 13 Mar 2025 10:35:14 +0100 Subject: [PATCH 119/132] Modifs Claim --- RFXtoRP_HsaDispute_Created.ftl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index fb66661..499d4f4 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -47,18 +47,26 @@ <#if TableReasonCode[dispute.dispute_reason_code]??> "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" <#else> - <#stop "preparation order list is empty" > + <#stop "Reason code not supported"> + <#else> + <#stop "Preparation order list is empty"> <#else> <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > - "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", - <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" + <#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!=""> + "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", + <#if TableReasonCode[dispute.dispute_reason_code]??> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" + <#else> + <#stop "Reason code not supported"> + <#else> - <#stop "Type not supported" > + <#stop "Reception reference is empty"> + <#else> + <#stop "Type not supported"> } } From dec9a4b17fe8c70b4ca9d52067f1314df7a93bca Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Mar 2025 10:38:29 +0100 Subject: [PATCH 120/132] displayID --- RFXtoRP_HsaDispute_Created.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 499d4f4..70709ce 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -26,6 +26,7 @@ "Title":"", "Criticality":"${TableCriticality[dispute.dispute_criticity]}", + "DisplayID":"${dispute.dispute_reference?trim?json_string}", "Amount": { <#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) /> <#if isCurrencyCode> From 1be67f65b2f2b7512298ec5800209d19be767367 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 19 Mar 2025 10:41:13 +0100 Subject: [PATCH 121/132] modif --- RFXtoRP_HsaDispute_Created.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 70709ce..499d4f4 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -26,7 +26,6 @@ "Title":"", "Criticality":"${TableCriticality[dispute.dispute_criticity]}", - "DisplayID":"${dispute.dispute_reference?trim?json_string}", "Amount": { <#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) /> <#if isCurrencyCode> From 1670a2221858d902768f9b99ee2d43c43fba5e29 Mon Sep 17 00:00:00 2001 From: frea Date: Wed, 19 Mar 2025 10:52:07 +0100 Subject: [PATCH 122/132] SCPN1-8483 (cherry picked from commit 8ee7527ba4e01017073183ec99a8db8b0fc625c0) --- ReflexUtils.ftl | 5 ----- 1 file changed, 5 deletions(-) diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index 7bc33f6..afa299e 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -9,11 +9,6 @@ <#return dateutc?datetime.iso?iso_nz(locale)> -<#function RfxDateTimetoUTCWithTimezone rfxdatetime timezone> - <#setting time_zone=timezone> - <#return (rfxdatetime?datetime.iso?iso_utc)> - - <#-- --------------------------------------------------------------------------------------- --> <#-- Split email reflex into json array string --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> From bcf77601b9126a40b09495dc2f462664577c6eff Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 20 Mar 2025 13:52:24 +0100 Subject: [PATCH 123/132] SCPN1-8496 --- RFXtoRP_HsaCarrier.ftl | 20 -------------------- RFXtoRP_HsaCarrier_ActorCreated.ftl | 3 +++ RFXtoRP_HsaCarrier_ActorDeleted.ftl | 3 +++ RFXtoRP_HsaCons.ftl | 23 +---------------------- RFXtoRP_HsaCons_ActorCreated.ftl | 3 +++ RFXtoRP_HsaCons_ActorDeleted.ftl | 3 +++ RFXtoRP_HsaSup.ftl | 20 -------------------- RFXtoRP_HsaSup_ActorCreated.ftl | 3 +++ RFXtoRP_HsaSup_ActorDeleted.ftl | 3 +++ 9 files changed, 19 insertions(+), 62 deletions(-) diff --git a/RFXtoRP_HsaCarrier.ftl b/RFXtoRP_HsaCarrier.ftl index a724924..6b47034 100644 --- a/RFXtoRP_HsaCarrier.ftl +++ b/RFXtoRP_HsaCarrier.ftl @@ -2,9 +2,6 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -18,22 +15,6 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign carrier = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)> - - <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> - <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> - <#assign actorRP = JsonUtil.jsonToMap(response)> - <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCarrier_ActorUpdated.ftl"> - } - ] - <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> @@ -42,7 +23,6 @@ <#include "RFXtoRP_HsaCarrier_ActorCreated.ftl"> } ] - <#break> <#case "D"> diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index 65876a4..8ac9722 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index e3082b4..62b69a2 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCons.ftl b/RFXtoRP_HsaCons.ftl index e0fd096..8932eb4 100644 --- a/RFXtoRP_HsaCons.ftl +++ b/RFXtoRP_HsaCons.ftl @@ -2,10 +2,6 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> - <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -19,23 +15,7 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign actor = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixConsignee(actor.code?trim?json_string)> - - <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> - <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> - <#assign actorRP = JsonUtil.jsonToMap(response)> - <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaCons_ActorUpdated.ftl"> - } - ] - <#else> - [ + [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -43,7 +23,6 @@ <#include "RFXtoRP_HsaCons_ActorCreated.ftl"> } ] - <#break> <#case "D"> diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 502da80..84df17a 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index dd83c6f..89d4fce 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaSup.ftl b/RFXtoRP_HsaSup.ftl index 309bc71..7250b4e 100644 --- a/RFXtoRP_HsaSup.ftl +++ b/RFXtoRP_HsaSup.ftl @@ -2,9 +2,6 @@ <#-- input : message RFX --> <#-- project : projectId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform --> -<#include "ReflexUtils.ftl"> -<#include "HfRpConfig.ftl"> -<#include "ActorPrefix.ftl"> <#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> @@ -18,22 +15,6 @@ <#-- *********************************************** Action = CREATE or UPDATE ******************** --> <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign actor = JsonUtil.jsonToMap(dataRfx)> - <#assign refID = RFXtoRPprefixSupplier(actor.code?trim?json_string)> - - <#assign payLoad = '{"Header": {"ProjectID": "${projectRP!""}"},"IDs": [{"RefID": "${refID}"}]}' /> - <#assign queryApiReflexPlatformID = QueryApiReflexPlatformID.ActorGetByIds> - <#assign response = QueryApiReflexPlatformCall.call(queryApiReflexPlatformID,payLoad) /> - <#assign actorRP = JsonUtil.jsonToMap(response)> - <#if actorRP?? && actorRP.Objects?? && actorRP.Objects[0]?? && actorRP.Objects[0].ID.RefID?? > - [ - { - <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> - "apiReflexPlatformID" : "${apiReflexPlatformID}", - "datas" : - <#include "RFXtoRP_HsaSup_ActorUpdated.ftl"> - } - ] - <#else> [ { <#assign apiReflexPlatformID = ApiReflexPlatformID.ActorCreated> @@ -42,7 +23,6 @@ <#include "RFXtoRP_HsaSup_ActorCreated.ftl"> } ] - <#break> <#case "D"> diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 6c57b1f..23a560c 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 0927eca..9c00b09 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -1,3 +1,6 @@ +<#include "ReflexUtils.ftl"> +<#include "HfRpConfig.ftl"> +<#include "ActorPrefix.ftl"> [ { "Header": { From f9c62d5ee4a9782c3000127fe2b2570e9eac42fb Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 20 Mar 2025 17:09:41 +0100 Subject: [PATCH 124/132] SCPN1-8474 (cherry picked from commit 02e8dc2566e1d504b95004d4b480b5519aa8f1d3) --- RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index 7a6abd1..b7cb7a8 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -3,7 +3,7 @@ [ <#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign refIDHmap_local ={}> - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l ->l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#if !refIDHmap_local[despatched_ipg.hd_number]?? > <#if refIDHmap_local?size != 0 > From eefc7070ac5eb76123e1532dd2fd19533925e260 Mon Sep 17 00:00:00 2001 From: frea Date: Thu, 20 Mar 2025 17:28:57 +0100 Subject: [PATCH 125/132] SCPN1-8474 (cherry picked from commit 53c400be4995877955366c54c8ca67d664f77fac) --- RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl | 2 +- RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl | 2 +- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl index 4b7da84..c15dc98 100644 --- a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -3,7 +3,7 @@ [ <#assign dispatched3_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line3> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0) as preparation_line3> <#list preparation_line3.despatched_ipg_list?filter(j ->j.carton_number!="000000000000000000") as despatched_ipg3> <#if !refIDHmap[despatched_ipg3.carton_number]?? > <#if refIDHmap?size != 0 > diff --git a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl index b7cb7a8..5fe5ad8 100644 --- a/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl +++ b/RFXtoRP_HsrPrepa_HandlingUnitDispatched.ftl @@ -3,7 +3,7 @@ [ <#assign dispatched_datetime = RfxDateTimetoUTCWithTimezone(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_rfx) /> <#assign refIDHmap_local ={}> - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l ->l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#if !refIDHmap_local[despatched_ipg.hd_number]?? > <#if refIDHmap_local?size != 0 > diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index 8aed82c..ea3c72b 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -2,7 +2,7 @@ <#include "HfRpConfig.ftl"> <#include "ActorPrefix.ftl"> [ - <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> + <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.despatched_ipg_list?size != 0 && l.preparation_order_originator_reference!="") as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> <#assign packing_datetime = RfxDateTimetoUTCWithTimezone(preparation_line.confirmation_datetime,time_zone_rfx) /> { From 1e9ce7cdc4e374cf5ea2ba69436ea37c24cc3fc4 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Thu, 20 Mar 2025 18:02:43 +0100 Subject: [PATCH 126/132] claim --- RFXtoRP_HsaDispute.ftl | 13 ++++++++++--- RFXtoRP_HsaDispute_Created.ftl | 29 +++++++++-------------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index 18ea1ec..160f8f9 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -16,13 +16,16 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign dispute = JsonUtil.jsonToMap(dataRfx)> [ - <#if dispute.dispute_closed == true > + <#if dispute.dispute_closed == true > + <#if ((dispute.dispute_type_code=="030" || dispute.dispute_type_code=="070") && dispute.dispute_reception?? && dispute.dispute_reception.reception_reference!="") || (dispute.dispute_type_code=="050" && dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string!="")> { <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimCreated> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsaDispute_Created.ftl"> - }, + } + <#if TableReasonCode[dispute.dispute_reason_code]??> + , { <#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent> "apiReflexPlatformID" : "${apiReflexPlatformID}", @@ -30,7 +33,11 @@ <#include "RFXtoRP_HsaDispute_MessageSent.ftl"> } <#else> - <#stop> + <#stop> + + <#else> + <#stop > + ] <#break> diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 499d4f4..335e29b 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -42,31 +42,20 @@ <#-- To configure --> <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if dispute.dispute_type_code=="050" > - <#if dispute.dispute_preparation.preparation_order_list?? && dispute.dispute_preparation.preparation_order_list?size != 0> - "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", - <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" - <#else> - <#stop "Reason code not supported"> - - <#else> - <#stop "Preparation order list is empty"> - + "EntityID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", + "DisplayID":"${dispute.dispute_preparation.preparation_order_list[0].preparation_order_contractor_reference?trim?json_string}", <#else> <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > - <#if dispute.dispute_reception.reception_reference?? && dispute.dispute_reception.reception_reference!=""> "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", - <#if TableReasonCode[dispute.dispute_reason_code]??> - "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" - <#else> - <#stop "Reason code not supported"> - - <#else> - <#stop "Reception reference is empty"> - + <#else> + <#stop "WMS type code not supported"> + + + <#if TableReasonCode[dispute.dispute_reason_code]??> + "ClaimTypeID":"CLAIMTYPE_${projectRP}_ORDER_${TableReasonCode[dispute.dispute_reason_code]}" <#else> - <#stop "Type not supported"> + <#stop "Reason code not supported"> } } From 3a0bbdc479b72094cfe5c9e1e4ef792db10ddf5a Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 21 Mar 2025 11:21:59 +0100 Subject: [PATCH 127/132] claim reference empty --- RFXtoRP_HsaDispute.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsaDispute.ftl b/RFXtoRP_HsaDispute.ftl index 160f8f9..8b37074 100644 --- a/RFXtoRP_HsaDispute.ftl +++ b/RFXtoRP_HsaDispute.ftl @@ -36,7 +36,7 @@ <#stop> <#else> - <#stop > + <#stop "Reference is empty"> ] From c280b2c83a8dd29088d31c1a29746c119476e654 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 21 Mar 2025 14:27:52 +0100 Subject: [PATCH 128/132] hsrdepot --- RFXtoRP_HsrDepot_ActorCreated.ftl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index e64bb6b..c64e285 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -55,7 +55,7 @@ "${depot.physical_depot_address.other_number?json_string}" ], - "Typology": "TYPOLOGY_UNKNOWN" + "Typology": "TYPOLOGY_WAREHOUSE" } } ] From 79ad7f53e846b43620ea315717b9e265598505af Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Fri, 21 Mar 2025 14:30:15 +0100 Subject: [PATCH 129/132] dispute --- RFXtoRP_HsaDispute_Created.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index 335e29b..de64de8 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -47,6 +47,7 @@ <#else> <#if dispute.dispute_type_code=="070" || dispute.dispute_type_code=="030" > "EntityID":"${dispute.dispute_reception.reception_reference?trim?json_string}", + "DisplayID":"${dispute.dispute_reception.reception_reference?trim?json_string}", <#else> <#stop "WMS type code not supported"> From 830db1493b137ac13cff1b21740a5ad923602963 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 24 Mar 2025 15:58:33 +0100 Subject: [PATCH 130/132] modifs receipt --- RPtoRFX_Receipt.ftl | 1 - 1 file changed, 1 deletion(-) diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index 763cf12..905c3bb 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -52,7 +52,6 @@ "batch_1": "${batch_1?json_string!""}", "optional_attributes": { <#--"held_for_check": "false", - "held _for_repacking": "false", "hold_code": "false", --> "hold_for_specific_code": "false" } From 4553507e3bca898e24e2501bac6d3cb7be084fe2 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Mar 2025 14:59:09 +0100 Subject: [PATCH 131/132] modifs HU --- RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl | 1 + 1 file changed, 1 insertion(+) diff --git a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl index ea3c72b..bf280b6 100644 --- a/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_HandlingunitGoodsPrepared.ftl @@ -112,6 +112,7 @@ <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> }, + "OrderID": "${preparation_line.preparation_order_originator_reference?trim?json_string}", "ExecutionflowID": "${preparation_line.preparation_order_originator_reference?trim?json_string}", <#if (preparation_line.pro_originator_reference_line_number!0) != 0> "LineID": "${preparation_line.pro_originator_reference_line_number}", From 2828c01cc4ec20e5ac663b92febdb1590deb8acc Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 26 Mar 2025 15:08:56 +0100 Subject: [PATCH 132/132] modifs HU received --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 8ab1721..0196de8 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -26,15 +26,15 @@ <#else> "PriorityDate": "1970-01-01T00:00:00Z", - <#-- Goods received Segmentation Keys inclusion --> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> }, - <#if 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.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}", "LineID": "${reflexMvtStockInterface.receipt_line_number}", "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}", @@ -47,4 +47,4 @@ } } -] +] \ No newline at end of file