Compare commits

...

76 Commits

Author SHA1 Message Date
432cca8ec9 Release 1.2.32+1 2025-02-12 10:24:01 +01:00
08e4b04f7f Release 1.2.31+1 2024-12-13 15:34:11 +01:00
bf0ae15a50 Release 1.2.30+1 2024-12-04 09:05:53 +01:00
3f7cd7a245 Merge branch 'pour-1.9' into 'release/1.2'
pour 1.9

See merge request r-d-technique/tiers/reflex-wms-connector!81
2024-12-04 07:09:16 +00:00
173deec755 pour 1.9 2024-12-04 08:08:26 +01:00
85bfe55af7 Release 1.2.29+4 2024-11-19 11:47:55 +01:00
730750b898 Merge branch 'SCPN1-7609' into 'release/1.2'
Correction priority date SCPN1-7609

See merge request r-d-technique/tiers/reflex-wms-connector!78
2024-11-19 10:46:07 +00:00
d85abf8235 Correction priority date
(cherry picked from commit e41309e744)
2024-11-19 11:38:58 +01:00
46a9a82e12 Release 1.2.29+3 2024-11-18 11:44:58 +01:00
ae0b82b6e4 Merge branch 'SCPN1-7578' into 'release/1.2'
SCPN1-7578

See merge request r-d-technique/tiers/reflex-wms-connector!76
2024-11-18 10:41:23 +00:00
5fc26e6015 SCPN1-7578 2024-11-18 11:36:01 +01:00
236c2d754c Release 1.2.29+2 2024-11-12 14:28:03 +01:00
5499e3059f Merge branch 'SCPN1-7528' into 'release/1.2'
json_string SCPN1-7528

See merge request r-d-technique/tiers/reflex-wms-connector!74
2024-11-12 13:21:27 +00:00
cae9bf80bb json_string
(cherry picked from commit 4d24367b58)
2024-11-12 14:13:28 +01:00
ed0141584b Release 1.2.29+1 2024-11-06 14:48:50 +01:00
e6a27c2ba2 Release 1.2.28+5 2024-11-05 11:31:06 +01:00
0a26159dc9 Merge branch 'SCPN1-7496' into 'release/1.2'
SCPN1-7496

See merge request r-d-technique/tiers/reflex-wms-connector!71
2024-11-05 10:29:16 +00:00
a4f3bf8151 SCPN1-7496 2024-11-05 11:28:00 +01:00
867fdc5743 SCPN1-7496 2024-11-05 11:10:04 +01:00
b69bfa50ba Release 1.2.28+4 2024-10-29 15:20:15 +01:00
834abe1b78 SCPN1-7418 2024-10-29 15:17:50 +01:00
e190a16ddc Release 1.2.28+3 2024-10-24 10:22:41 +02:00
e63b14d0ff SCPN1-7421 2024-10-24 10:05:02 +02:00
04bc005cda Release 1.2.28+2 2024-10-17 11:07:16 +02:00
6e46d30221 Merge branch 'SCPN1-6728' into 'release/1.2'
SCPN1-6728

See merge request r-d-technique/tiers/reflex-wms-connector!67
2024-10-17 09:04:24 +00:00
1f2d3ab212 SCPN1-6728 2024-10-17 10:36:14 +02:00
771915ad19 Release 1.2.28+1 2024-10-14 11:51:48 +02:00
4a1fe56381 Merge branch 'SCPN1-7341' into 'release/1.2'
SCPN1-7341

See merge request r-d-technique/tiers/reflex-wms-connector!65
2024-10-14 07:57:53 +00:00
a9a357d4ed SCPN1-7341 2024-10-14 09:56:41 +02:00
0e3e60b45a Release 1.2.27+2 2024-10-03 15:39:13 +02:00
f0e27a6f88 Merge branch 'SCPN1-7302' into 'release/1.2'
SCPN1-7302

See merge request r-d-technique/tiers/reflex-wms-connector!63
2024-10-03 13:31:09 +00:00
f72bcc2537 SCPN1-7302 2024-10-03 15:30:18 +02:00
9700548214 Merge branch 'SCPN1-7302' into 'release/1.2'
modifs

See merge request r-d-technique/tiers/reflex-wms-connector!62
2024-10-03 13:15:28 +00:00
96aec6555c SCPN1-7302 2024-10-03 15:08:49 +02:00
54511c55f1 modifs
(cherry picked from commit e2c0735dc7)
2024-10-03 15:06:18 +02:00
de828ed606 modifs
(cherry picked from commit 25011e68e6)
2024-10-03 15:05:45 +02:00
eaa7ef1b9b Release 1.2.27+1 2024-09-25 16:12:56 +02:00
4c84e4195b Release 1.2.26+1 2024-09-13 10:38:27 +02:00
113c94f100 Merge branch 'SCPN1-7155' into 'release/1.2'
SCPN1-7155

See merge request r-d-technique/tiers/reflex-wms-connector!59
2024-09-13 08:09:08 +00:00
7963b351aa SCPN1-7155 2024-09-12 14:11:04 +02:00
8425747b42 Release 1.2.25+2 2024-08-29 10:59:28 +02:00
03e20e7aed Merge branch 'SCPN1-7065' into 'release/1.2'
SCPN1-7065

See merge request r-d-technique/tiers/reflex-wms-connector!57
2024-08-29 08:48:06 +00:00
04b7974c77 SCPN1-7065
(cherry picked from commit ca33a85694)
2024-08-29 10:37:54 +02:00
087346139d Release 1.2.25+1 2024-08-08 16:55:33 +02:00
0a4263d551 Release 1.2.24+1 2024-08-07 12:23:46 +02:00
b00302c8e3 Release 1.2.23+2 2024-08-07 08:44:43 +02:00
55b7b54b44 Merge branch 'SCPN1-6998' into 'release/1.2'
SCPN1-6998

See merge request r-d-technique/tiers/reflex-wms-connector!54
2024-08-07 06:43:11 +00:00
26003c24f2 SCPN1-6998 2024-08-07 08:38:34 +02:00
0468700574 Release 1.2.23+1 2024-08-06 16:08:37 +02:00
fe35481144 Merge branch 'SCPN1-6998' into 'release/1.2'
SCPN1-6998

See merge request r-d-technique/tiers/reflex-wms-connector!52
2024-08-06 13:48:36 +00:00
d21204a949 SCPN1-6998 2024-08-06 15:41:22 +02:00
46421972a8 Release 1.2.22+1 2024-07-29 17:33:09 +02:00
ccca6d1592 Release 1.2.21+1 2024-07-29 17:32:32 +02:00
68622896f0 Release 1.2.20+1 2024-07-24 10:47:24 +02:00
fea5691ddd Release 1.2.19+1 2024-07-22 10:18:15 +02:00
2fb5dcd103 Merge branch 'SCPN1-6912' into 'release/1.2'
Merge branch 'SCPN1-6564' into 'release/1.2'

See merge request r-d-technique/tiers/reflex-wms-connector!48
2024-07-22 07:54:20 +00:00
04253d939f Merge branch 'develop' into SCPN1-6912 2024-07-19 11:24:12 +02:00
5c0b112c39 Modifs 170724 2024-07-17 11:07:36 +02:00
c3d1ceb0c5 ODP 2024-07-12 11:17:30 +02:00
45e8c4fee2 ajout MD HuAdded 2024-07-05 10:40:55 +02:00
af29a11b22 adjust json_string 2024-06-25 17:29:36 +02:00
74b976b367 adjust json_string 2024-06-24 16:20:09 +02:00
044fda9d16 correction dans le cas où la commande n'a pas de ligne... 2024-06-21 13:28:44 +02:00
e8510d079c SCPN1-6605 MovementCreated 2024-06-07 11:15:47 +02:00
aa19de32a5 Merge branch 'SCPN1-6692' into 'develop'
SCPN1-6692

Closes SCPN1-6692

See merge request r-d-technique/tiers/reflex-wms-connector!43
2024-06-06 07:44:29 +00:00
2524859cd4 SCPN1-6692 2024-06-06 09:15:09 +02:00
06147dd8d4 SCPN1-6642 SCPN1-6641 2024-05-30 17:18:16 +02:00
9cbacc0ebc priority date 2024-05-17 11:00:25 +02:00
c31d6de4a2 Merge branch 'SCPN1-6564' into 'release/1.2'
SCPN1-6564

See merge request r-d-technique/tiers/reflex-wms-connector!38

(cherry picked from commit c0dd029d1f)
2024-05-17 10:57:10 +02:00
b3da874dd3 modifs HUGP 2024-05-13 16:00:46 +02:00
82dfc05cdb Création de commande 2024-04-24 15:09:45 +02:00
eda5fe4e07 modifs hsrprepa 2024-04-15 10:16:14 +02:00
26654a9820 modifs 2024-04-12 09:37:03 +02:00
6b6cef5332 modifs ipgmove 2024-04-11 11:01:05 +02:00
d7c9c72762 modifs hsrpro 2024-04-10 16:25:27 +02:00
87efb21e64 modifs ipg 2024-04-09 16:53:34 +02:00
60 changed files with 1117 additions and 355 deletions

162
ActorPrefix.ftl Normal file
View File

@@ -0,0 +1,162 @@
<#-- --------------------------------------------------------------------------------------- -->
<#-- Actor Prefix 4 cars -->
<#-- --------------------------------------------------------------------------------------- -->
<#-- For Depot -->
<#function RFXtoRPprefixDepot depot>
<#if 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>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixDepot actor>
<#if uniqueness>
<#local depot = actor>
<#else>
<#local depot = actor[4..]>
</#if>
<#return (depot)>
</#function>
<#-- For Supplier -->
<#function RFXtoRPprefixSupplier supplier>
<#if 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>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixSupplier actor>
<#if uniqueness>
<#local supplier = actor>
<#else>
<#local supplier = actor[4..]>
</#if>
<#return (supplier)>
</#function>
<#-- For Carrier -->
<#function RFXtoRPprefixCarrier carrier>
<#if 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>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixCarrier actor>
<#if uniqueness>
<#local carrier = actor>
<#else>
<#local carrier = actor[4..]>
</#if>
<#return (carrier)>
</#function>
<#-- For Consignee -->
<#function RFXtoRPprefixConsignee consignee>
<#if 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>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#return (actor)>
</#function>
<#function RPtoRFXprefixConsignee actor>
<#if uniqueness>
<#local consignee = actor>
<#else>
<#local consignee = actor[4..]>
</#if>
<#return (consignee)>
</#function>

View File

@@ -50,11 +50,11 @@
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,27 +1,29 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
"Header": {
"ProjectID": "${projectRP}"
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${stock.physical_depot_code}"
},
"Payload": {
"RefID": "${RFXtoRPprefixDepot(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}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt}
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt}
}
}
}
<#break>
</#list>
</#list>
]

View File

@@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
@@ -6,19 +8,19 @@
"ProjectID": "${projectRP}"
},
"Payload": {
"ActorID": "${stock.physical_depot_code}",
"ActorID": "${RFXtoRPprefixDepot(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}"
}
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
},
"Goods": {

View File

@@ -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 >
</#switch>

View File

@@ -16,6 +16,6 @@
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
},
"Payload": {
"Name": "${carrier.carrier_designation?json_string}",
"ManagedStock": false,
@@ -14,10 +16,8 @@
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
-->
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
"Address":
{
@@ -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 = JsonUtil.isCountryCode(carrier.carrier_structured_address.country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${carrier.carrier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${carrier.carrier_structured_address.territorial_div_code?json_string}",
"State": "${carrier.carrier_structured_address.country_designation?json_string}"
@@ -39,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" : ""
</#if>
</#if>
},

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
},
"Payload": {}
}
]

View File

@@ -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 >
</#switch>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
@@ -14,9 +16,9 @@
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
-->
"Address":
{
@@ -29,7 +31,12 @@
"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}",
<#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" : "",
</#if>
"ProvinceCode": "${actor.consignee_structured_address.territorial_div_code?json_string}",
"State": "${actor.consignee_structured_address.country_designation?json_string}"
@@ -40,7 +47,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" : ""
</#if>
</#if>
},

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
},
"Payload": {}
}
]

47
RFXtoRP_HsaDispute.ftl Normal file
View File

@@ -0,0 +1,47 @@
<#-- **** 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>
<#switch cloudEventMsg.action>
<#case "C">
<#case "U">
<#-- *********************************************** Action = CREATE or UPDATE ******************** -->
<#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">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ClaimMessageSent>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_HsaDispute_MessageSent.ftl">
}
<#else>
<#stop>
</#if>
]
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop>
<#break>
<#default>
<#stop>
</#switch>

View File

@@ -0,0 +1,70 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "Table.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
<#if dispute.dispute_reference?? && dispute.dispute_reference!="">
"Title":"${dispute.dispute_reference?trim?json_string}",
<#else>
"Title":"",
</#if>
"Criticality":"${TableCriticality[dispute.dispute_criticity]}",
"Amount": {
<#assign isCurrencyCode = JsonUtil.isCurrencyCode(dispute.dispute_amount_unit?upper_case) />
<#if isCurrencyCode>
"Currency" : "${dispute.dispute_amount_unit?upper_case?json_string}",
<#else>
<#if TableAmount[dispute.dispute_amount_unit?json_string]??>
"Currency" : "${TableAmount[dispute.dispute_amount_unit?json_string]}",
<#else>
"Currency" : "XXX",
</#if>
</#if>
"Value": "${dispute.dispute_amount}"
},
<#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>
<#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>
</#if>
<#-- 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" >
</#if>
}
}
]

View File

@@ -0,0 +1,124 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
<#if dispute.dispute_preparation??>
"Message": "${dispute.dispute_reference?trim?json_string}"
<#else>
<#if dispute.dispute_reception??>
"Message": "${dispute.dispute_reception.reception_reference?trim?json_string}"
</#if>
</#if>
}
},
<#if dispute.dispute_quantity!=0 && dispute.dispute_item??>
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_item.item_code?trim?json_string} - ${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
}
},
<#elseif dispute.dispute_item??>
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_item.item_code?trim?json_string}"
}
},
<#elseif dispute.dispute_quantity!=0>
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
"Message": "${dispute.dispute_quantity}${dispute.dispute_quantity_unit}"
}
},
</#if>
{
"Header": {
"ProjectID": "${projectRP}"
},
"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?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" >
</#if>
<#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}"
</#if>
</#if>
},
"Payload": {
"Message": " ${dispute.dispute_description?trim?json_string}"
}
}
]

View File

@@ -0,0 +1,7 @@
<#-- Specify table for reason code -->
<#assign TableReasonCode = {}/>

View File

@@ -24,9 +24,14 @@
reflexMvtStockInterface.ipg_move_type == "260" ||
reflexMvtStockInterface.ipg_move_type == "290" ||
reflexMvtStockInterface.ipg_move_type == "300" ||
reflexMvtStockInterface.ipg_move_type == "350" ||
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"
>
[
{
@@ -66,11 +71,11 @@
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported - Case D ">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop>
</#switch>

View File

@@ -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 />
@@ -20,8 +21,8 @@
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
"PriorityDate": "${priority_date}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) >
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
@@ -29,13 +30,14 @@
<#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
},
<#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>
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${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}

View File

@@ -18,21 +18,21 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${reflexMvtStockInterface.batch_1}"}
</#if>
</#if>
},
{
"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}"
}
}
}
]
-->

View File

@@ -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",
@@ -10,12 +11,17 @@
"260":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"290":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION",
"350":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"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 />
[
{
"Header": {
@@ -36,7 +42,7 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
},
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"Movement": {
"DateTime": {
@@ -55,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}

View File

@@ -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">
</#if>
}
]
<#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 >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -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}",
</#if>
<#-- Loop for the Logistical Variants - LV -->
<#if item.logistical_variant_list??>

40
RFXtoRP_HsaLstCarSta.ftl Normal file
View File

@@ -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 >
</#switch>

View File

@@ -72,10 +72,10 @@
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (case D)">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
},
"Payload": {
"Name": "${actor.designation?json_string}",
"ManagedStock": false,
@@ -14,9 +16,7 @@
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
-->
"Address":
{
@@ -28,7 +28,12 @@
"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}",
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
"State": "${actor.supplier_structured_address.country_designation?json_string}"
@@ -38,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" : ""
</#if>
</#if>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${actor.code?trim?json_string}"
"RefID": "${RFXtoRPprefixSupplier(actor.code?trim?json_string)}"
},
"Payload": {}
}
]

40
RFXtoRP_HsrCarrierApt.ftl Normal file
View File

@@ -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 >
</#switch>

View File

@@ -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 >
</#switch>

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
},
"Payload": {
"Name": "${depot.physical_depot_designation?json_string}",
"ManagedStock": true,
@@ -14,9 +16,9 @@
<#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
-->
"Address":
{
@@ -28,22 +30,31 @@
"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}",
<#assign isCountryCode = JsonUtil.isCountryCode(depot.physical_depot_structured_address.country_code?upper_case) />
<#if isCountryCode >
"CountryCode" : "${depot.physical_depot_structured_address.country_code?upper_case?json_string}",
<#else>
"CountryCode" : "",
</#if>
"ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}",
"State": "${depot.physical_depot_structured_address.country_designation?json_string}"
<#-- 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}"
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
"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}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN"
}
}

View File

@@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
},
"Payload": {}
}
]

40
RFXtoRP_HsrLoadInfo.ftl Normal file
View File

@@ -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 >
</#switch>

View File

@@ -49,10 +49,13 @@
</#if>
<#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) />
<#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>
@@ -75,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_HUsAdded_TrackingHuLabelled.ftl">
}
</#if>
</#if>
</#list>
</#list>
@@ -88,9 +102,9 @@
<#break>
<#case "D">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)">
<#stop>
<#break>
<#default>
<#stop "event not supported">
<#stop>
</#switch>

View File

@@ -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,7 +19,7 @@
},
"Payload":{
"Carrier": {
"ActorID":"${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!="">

View File

@@ -2,8 +2,6 @@
<#--
"MetaData" :[
]
]
-->
"MetaData": [ ]

View File

@@ -15,7 +15,7 @@
"Value": { "String" : "no batch"}
<#else>
"Value": { "String" : "${despatched_ipg.batch_number}"}
</#if>
</#if>
},
{
"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}"
}
}
}
]

View File

@@ -0,0 +1,9 @@
<#-- use protobuf of class HsrPrepa to find Reflex WMS fields names -->
<#--
"MetaData" :[
]
-->
"MetaData": [ ]

View File

@@ -0,0 +1,27 @@
<#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": {
"HandlingunitID": "${despatched_ipg.hd_number}"
<#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)}"
}
</#if>
}
}
]

View File

@@ -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>
@@ -74,37 +76,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",
</#if>
</#if>
</#if>
</#if>
<#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",
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl">
@@ -115,16 +118,15 @@
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${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>
</#list>
<#sep>,</#sep>

View File

@@ -33,7 +33,10 @@
"Value": ${preparation_line.despatched_hds_list[0].hd_type_width}
}
}
</#if>
</#if>,
<#-- HU Metadata inclusin inclusion -->
<#include "RFXtoRP_HsrPrepa_HUsAdded_Metadata.ftl">
}
}

View File

@@ -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,7 +19,7 @@
},
"Payload":{
"Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
}
}

View File

@@ -1,13 +1,27 @@
<#include "HfRpConfig.ftl">
<#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}"
<#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}",
</#if>
</#if>
"RefDate": {
"DateTime": "${dispatched_datetime4}",
"AuthorTimeZone": "${time_zone_rfx}"
}
},
"Payload": {
<#if despatched_ipg.carton_number != "000000000000000000">
@@ -18,9 +32,8 @@
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
,
"HUCarrier":{
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}"
}
"ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
}
</#if>
}
}

View File

@@ -28,18 +28,18 @@
"datas" :
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
<#else>
<#stop "preparation order already confirmed">
<#else>
<#-- preparation order already confirmed -->
<#stop>
</#if>
<#else>
<#stop "preparation order type not supported">
<#-- preparation order type not supported -->
<#stop>
</#if>
<#else>
<#stop "PRO reference is empty">
</#if>
]
<#break>
@@ -63,6 +63,6 @@
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -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,7 +27,7 @@
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> -->
"ShipFrom": {
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
},
"ShipFromAcked": true,
"ShipTo": {
@@ -48,7 +49,7 @@
preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == "">
"ActorID": "${preparation_order.end_consignee_code}"
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
<#else>
"Actor":
{
@@ -56,8 +57,13 @@
"Address" :
{
"City" : "${(preparation_order.address.post_code_area_name!"")?json_string}",
"CountryCode" : "${preparation_order.address.iso_country_code!""}",
"PostalCode" : "${preparation_order.address.postal_code!""}",
<#assign isCountryCode = JsonUtil.isCountryCode(preparation_order.address.iso_country_code?upper_case) />
<#if isCountryCode>
"CountryCode" : "${(preparation_order.address.iso_country_code!"")?json_string}",
<#else>
"CountryCode" : "",
</#if>
"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}"
@@ -84,7 +90,6 @@
</#if>
<#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent":
{
"Goods":
@@ -95,10 +100,8 @@
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}",
</#if>
<#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
},
"Quantity" :
{
@@ -110,7 +113,6 @@
</#list>
],
</#if>
"RequestedMilestones" :
{
"RequestedDeliveryDateTime" :

View File

@@ -98,6 +98,6 @@
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

@@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
{
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
@@ -25,19 +26,21 @@
"ShipFrom":
{
"ActorID": "${receipt.original_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}"
},
"ShipTo" :
{
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
"ActorID": "${RFXtoRPprefixDepot(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}"},
"Carrier":
{
"ActorID":"${RFXtoRPprefixCarrier(receipt.carrier_informations.carrier_code?trim?json_string)}"
},
</#if>
<#if receipt.line_list??>
"Lines" : [
<#list receipt.line_list as line>

View File

@@ -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": ""
}
}
]
]

View File

@@ -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}" />
</#if>
<#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}" />
</#if>
<#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 ******************** -->
@@ -28,22 +69,33 @@
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
<#else>
<#if preparationOrderPostResponse.status?? && preparationOrderPostResponse.status == "WARN">
[
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowShipFromAcked>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PrepOrder_ShipFromAcked.ftl">
}
]
<#else>
[
{
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_PlatformLogCreate.ftl">
},
{
<#assign apiReflexPlatformID = ApiReflexPlatformID.ExecutionflowAllocationError>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
"datas" :
<#include "RFXtoRP_RestResponseAllocationError.ftl">
}
]
</#if>
</#if>
<#break>
<#default>
@@ -52,7 +104,7 @@
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
@@ -70,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}" />
</#if>
<#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 ******************** -->
@@ -110,7 +184,7 @@
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "{}" />
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}",
@@ -126,7 +200,6 @@
]
</#switch>
<#break>
<#default>
<#stop>
</#switch>

View File

@@ -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}"

View File

@@ -2,35 +2,42 @@
<#noparse><#-- /!\ Warning the file is generated, if you modify it manually, do not enable automatic update via the pipeline --></#noparse>
<#noparse><#-- Date of last generation : </#noparse>${aDateTime}<#noparse> --></#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 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","":"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","":"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 quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
<#assign rfx_date_format_default = "yyyy-MM-dd" >
</#noparse>
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#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","":"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","":"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 time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
</#noparse>
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign transport_distance_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.transport_distance}"<#noparse>]!"CENTIMETER"></#noparse>
<#noparse><#assign weight_unit_rfx = weight_unit_KV_rfx[</#noparse>"${file.measurement_unit.weight}"<#noparse>]!"KILOGRAM"></#noparse>
<#noparse><#assign area_unit_rfx = area_unit_KV_rfx[</#noparse>"${file.measurement_unit.area}"<#noparse>]!"SQUARE_METER"></#noparse>
<#noparse><#assign volume_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.volume}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign number_of_litres_unit_rfx = volume_unit_KV_rfx[</#noparse>"${file.measurement_unit.litres_number}"<#noparse>]!"CUBIC_DECIMETER"></#noparse>
<#noparse><#assign time_zone_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#noparse>"></#noparse>
<#list file.reflex_platform_project_list?filter(l -> l.name == projectRP) as reflex_platform_project>
<#noparse><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
</#list>
<#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 = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
<#else>
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
</#if>
</#list>

View File

@@ -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>
[
<#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>
<#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">
}
</#if>
]
]
<#break>
<#default>
<#stop "Event not processed">
<#stop >
</#switch>

View File

@@ -1,4 +1,6 @@
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
<#-- Valeurs par défaut Adresse -->
<#-- Default values -->
<#assign typecode ="010">
@@ -9,7 +11,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 >
</#if>
@@ -20,7 +22,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" :
@@ -54,12 +56,16 @@
"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.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}",
</#if>
<#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>
<#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}",
</#if>
"street_and_number_and_po_box": "${(executionflow.ShipTo.Actor.Address.StreetAddressOne!"")?json_string}",
"additional_address_data_1": "${(executionflow.ShipTo.Actor.Address.StreetAddressTwo!"")?json_string}",
@@ -89,7 +95,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"
<#--

View File

@@ -1,4 +1,6 @@
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
{
"id" : {"refid" : "${executionflow.OrderID?json_string}"},
@@ -6,19 +8,19 @@
"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" :
"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!""}",
"original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}",
"carrier_code" : "${RPtoRFXprefixCarrier(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 +28,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 +49,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 +62,8 @@
} -->
}<#sep>,</#sep>
</#list>
</#list>
]
</#if>
</#if>
}
}

View File

@@ -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 :

View File

@@ -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 += ",">
</#if>
<#local str += "\"">
<#local str += email>
<#local str += "\"">
</#if>
</#if>
</#list>
<#local str += "]">
<#return (str)>

15
Table.ftl Normal file
View File

@@ -0,0 +1,15 @@
<#-- Table criticality -->
<#assign TableCriticality = {
"1": "CLAIM_CRITICALITY_LOW",
"2":"CLAIM_CRITICALITY_MEDIUM",
"3":"CLAIM_CRITICALITY_HIGH",
"4":"CLAIM_CRITICALITY_BLOCKING"
}>
<#-- Table Amount -->
<#assign TableAmount = {
"$": "USD",
"£":"GBP",
"DH":"MAD"
}>

View File

@@ -1 +1 @@
1.2.18+1
1.2.32+1