This commit is contained in:
Francis REAT 2024-12-04 08:08:26 +01:00
parent 85bfe55af7
commit 173deec755
57 changed files with 979 additions and 293 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"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported"> <#stop >
<#break> <#break>
<#default> <#default>
<#stop "event not supported"> <#stop >
</#switch> </#switch>

View File

@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -6,8 +8,8 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${stock.physical_depot_code}" "RefID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}"
}, },
"Payload": { "Payload": {
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"Snapshot": { "Snapshot": {
@ -15,8 +17,8 @@
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
"MessageNb": ${sum_elt} "MessageNb": ${sum_elt}
} }
} }

View File

@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -6,19 +8,19 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"Payload": { "Payload": {
"ActorID": "${stock.physical_depot_code}", "ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
"Snapshot": { "Snapshot": {
"DateTime": { "DateTime": {
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity": "Quantity":
{ {
"Value" : "${stock.quantity_in_base_lvs!"0"}", "Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}" "LVID": "${quantity_in_base_lv_RP_Cst}"
} }
}, },
"Goods": { "Goods": {

View File

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

View File

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

View File

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

View File

@ -28,6 +28,6 @@ those parameters are stored in FTL file HfRpConfig.ftl for later use in some of
<#default> <#default>
<#stop "event not supported"> <#stop >
</#switch> </#switch>

View File

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

View File

@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${carrier.carrier_code?trim?json_string}" "RefID": "${RFXtoRPprefixCarrier(carrier.carrier_code?trim?json_string)}"
}, },
"Payload": { "Payload": {
"Name": "${carrier.carrier_designation?json_string}", "Name": "${carrier.carrier_designation?json_string}",
"ManagedStock": false, "ManagedStock": false,
@ -14,10 +16,8 @@
<#-- ***Partner ID could be added here *** --> <#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", --> <#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
-->
<#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">,
"Address": "Address":
{ {
@ -45,7 +45,7 @@
"StreetAddressOne" : "${carrier.address.address_1?json_string}", "StreetAddressOne" : "${carrier.address.address_1?json_string}",
"StreetAddressTwo" : "${carrier.address.address_2?json_string}", "StreetAddressTwo" : "${carrier.address.address_2?json_string}",
"StreetAddressThree" : "${carrier.address.address_3?json_string}", "StreetAddressThree" : "${carrier.address.address_3?json_string}",
"CountryCode" : "" "CountryCode" : ""
</#if> </#if>
</#if> </#if>
}, },

View File

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

View File

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

View File

@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${actor.code?trim?json_string}" "RefID": "${RFXtoRPprefixConsignee(actor.code?trim?json_string)}"
}, },
"Payload": { "Payload": {
"Name": "${actor.designation?json_string}", "Name": "${actor.designation?json_string}",
"ManagedStock": false, "ManagedStock": false,
@ -14,9 +16,9 @@
<#-- ***Partner ID could be added here *** --> <#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", --> <#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">,
-->
"Address": "Address":
{ {
@ -31,7 +33,7 @@
"City" : "${actor.consignee_structured_address.post_code_area_name?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) /> <#assign isCountryCode = JsonUtil.isCountryCode(actor.consignee_structured_address.country_code?upper_case) />
<#if isCountryCode> <#if isCountryCode>
"CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}", "CountryCode" : "${actor.consignee_structured_address.country_code?upper_case?json_string}",
<#else> <#else>
"CountryCode" : "", "CountryCode" : "",
</#if> </#if>
@ -46,7 +48,7 @@
"StreetAddressOne" : "${actor.address.address_1?json_string}", "StreetAddressOne" : "${actor.address.address_1?json_string}",
"StreetAddressTwo" : "${actor.address.address_2?json_string}", "StreetAddressTwo" : "${actor.address.address_2?json_string}",
"StreetAddressThree" : "${actor.address.address_3?json_string}", "StreetAddressThree" : "${actor.address.address_3?json_string}",
"CountryCode" : "" "CountryCode" : ""
</#if> </#if>
</#if> </#if>
}, },

View File

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

@ -28,7 +28,10 @@
reflexMvtStockInterface.ipg_move_type == "370" || reflexMvtStockInterface.ipg_move_type == "370" ||
reflexMvtStockInterface.ipg_move_type == "400" || reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "410" || 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"
> >
[ [
{ {
@ -68,11 +71,11 @@
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported - Case D "> <#stop >
<#break> <#break>
<#default> <#default>
<#stop "event not supported"> <#stop>
</#switch> </#switch>

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#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 /> <#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
@ -29,13 +30,14 @@
<#-- Goods received Segmentation Keys inclusion --> <#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
}, },
<#if reflexMvtStockInterface.receipt_reference!=""> <#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else> <#else>
"ExecutionflowID": "${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}",
</#if> </#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION", <#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
"200":"STOCK_MOVEMENT_TYPE_FIX", "200":"STOCK_MOVEMENT_TYPE_FIX",
@ -14,10 +15,13 @@
"370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS", "370":"STOCK_MOVEMENT_TYPE_USE_OF_GOODS",
"400":"STOCK_MOVEMENT_TYPE_FIX", "400":"STOCK_MOVEMENT_TYPE_FIX",
"410":"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 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 /> <#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
[ [
{ {
"Header": { "Header": {
@ -38,7 +42,7 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
}, },
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}",
"Movement": { "Movement": {
"DateTime": { "DateTime": {

View File

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

View File

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

View File

@ -24,7 +24,9 @@
<#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">,
<#-- Item Photo URI could be added here --> <#-- 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 --> <#-- Loop for the Logistical Variants - LV -->
<#if item.logistical_variant_list??> <#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"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (case D)"> <#stop >
<#break> <#break>
<#default> <#default>
<#stop "event not supported"> <#stop >
</#switch> </#switch>

View File

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

View File

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

View File

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

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

View File

@ -1,12 +1,14 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${depot.physical_depot_code?trim?json_string}" "RefID": "${RFXtoRPprefixDepot(depot.physical_depot_code?trim?json_string)}"
}, },
"Payload": { "Payload": {
"Name": "${depot.physical_depot_designation?json_string}", "Name": "${depot.physical_depot_designation?json_string}",
"ManagedStock": true, "ManagedStock": true,
@ -14,9 +16,9 @@
<#-- ***Partner ID could be added here *** --> <#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", --> <#-- "PartnerID": "${}", -->
<#--
<#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">, <#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">,
-->
"Address": "Address":
{ {
@ -39,17 +41,20 @@
<#-- if Reflex WMS address is not structured --> <#-- if Reflex WMS address is not structured -->
<#else> <#else>
<#if depot.physical_depot_address??>
"Name": "${depot.physical_depot_address.company_name?json_string}", "Name": "${depot.physical_depot_address.company_name?json_string}",
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}", "StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?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" : "" "CountryCode" : ""
</#if>
</#if> </#if>
}, },
"Phones": ["${depot.physical_depot_address.telephone?json_string}", <#if depot.physical_depot_address??>
"${depot.physical_depot_address.other_number?json_string}" "Phones": ["${depot.physical_depot_address.telephone?json_string}",
], "${depot.physical_depot_address.other_number?json_string}"
],
</#if>
"Typology": "TYPOLOGY_UNKNOWN" "Typology": "TYPOLOGY_UNKNOWN"
} }
} }

View File

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

@ -50,20 +50,19 @@
<#assign refIDHmap ={}> <#assign refIDHmap ={}>
<#assign hd_numberHmap ={}> <#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 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> <#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 = RfxDateTimetoUTC(preparation_line.confirmation_datetime,time_zone_offset_rfx) />
<#if despatched_ipg.consignment_unit_id!=""> <#if !hd_numberHmap[despatched_ipg.hd_number]?? >
<#if !hd_numberHmap[despatched_ipg.hd_number]?? > <#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}>
<#assign hd_numberHmap += {despatched_ipg.hd_number,despatched_ipg.hd_number}> ,
, {
{ <#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled>
<#assign apiReflexPlatformID = ApiReflexPlatformID.TrackingHULabeled> "apiReflexPlatformID" : "${apiReflexPlatformID}",
"apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" :
"datas" : <#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl"> }
}
</#if>
</#if> </#if>
<#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 >
, ,
@ -79,6 +78,17 @@
"datas" : "datas" :
<#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl"> <#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> </#if>
</#list> </#list>
</#list> </#list>
@ -92,9 +102,9 @@
<#break> <#break>
<#case "D"> <#case "D">
<#-- *********************************************** Action = DELETE ******************** --> <#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported (Case D)"> <#stop>
<#break> <#break>
<#default> <#default>
<#stop "event not supported"> <#stop>
</#switch> </#switch>

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign refIDHmap_local ={}> <#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
@ -18,7 +19,7 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
} }
<#-- Add transport grade code <#-- Add transport grade code
<#if preparationOrder.transport_grade_code!=""> <#if preparationOrder.transport_grade_code!="">

View File

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

View File

@ -24,7 +24,6 @@
<#else> <#else>
"Value": { "Bool" : "False"} "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", "Key": "ManufacturingDate",

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 "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.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
@ -116,16 +118,15 @@
<#else> <#else>
"LineID": "${preparation_line.pro_line_number!0}", "LineID": "${preparation_line.pro_line_number!0}",
</#if> </#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}", "ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs} "Value": ${despatched_ipg.quantity_lvs}
} }
} }
] ]
} }
}<#sep>,</#sep> }<#sep>,</#sep>
</#list> </#list>
<#sep>,</#sep> <#sep>,</#sep>

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign refIDHmap_local ={}> <#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
@ -18,7 +19,7 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}" "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
} }
} }
} }

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> <#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
{ {
@ -7,11 +8,20 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "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": { "RefDate": {
"DateTime": "${dispatched_datetime4}", "DateTime": "${dispatched_datetime4}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
} }
}, },
"Payload": { "Payload": {
<#if despatched_ipg.carton_number != "000000000000000000"> <#if despatched_ipg.carton_number != "000000000000000000">
@ -22,9 +32,8 @@
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
, ,
"HUCarrier":{ "HUCarrier":{
"ActorID": "${preparationOrder.load_data.carrier_code?json_string}" "ActorID": "${RFXtoRPprefixCarrier(preparationOrder.load_data.carrier_code?trim?json_string)}"
} }
</#if> </#if>
} }
} }

View File

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

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.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) /> <#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}", "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> --> </#if> -->
"ShipFrom": { "ShipFrom": {
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}" "ActorID": "${RFXtoRPprefixDepot(preparation_order.physical_depot_code?trim?json_string)}"
}, },
"ShipFromAcked": true, "ShipFromAcked": true,
"ShipTo": { "ShipTo": {
@ -48,7 +49,7 @@
preparation_order.address.territorial_division_code == "" && preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" && preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == ""> preparation_order.address.iso_country_code == "">
"ActorID": "${preparation_order.end_consignee_code?trim?json_string}" "ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
<#else> <#else>
"Actor": "Actor":
{ {
@ -89,7 +90,6 @@
</#if> </#if>
<#-- Line Metadata inclusion --> <#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent": "RequestedContent":
{ {
"Goods": "Goods":
@ -100,10 +100,8 @@
<#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc />
"PriorityDate": "${forced_priority_date}", "PriorityDate": "${forced_priority_date}",
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl">
}, },
"Quantity" : "Quantity" :
{ {
@ -115,7 +113,6 @@
</#list> </#list>
], ],
</#if> </#if>
"RequestedMilestones" : "RequestedMilestones" :
{ {
"RequestedDeliveryDateTime" : "RequestedDeliveryDateTime" :

View File

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

View File

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

View File

@ -22,22 +22,21 @@
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
"TechMessage": { "TechMessage": {
"Code": "${restResponsetMsg.status}", "Code": "${restResponsetMsg.status!"no Code"}",
"Label": ${strJsonBody} "Label": ${strJsonBody}
}, },
"UserMessage": { "UserMessage": {
"Code": "${restResponsetMsg.status}", "Code": "${restResponsetMsg.status!"no Code"}",
"Label": ${strJsonBody}, "Label": ${strJsonBody},
"Params": [] "Params": []
}, },
"DetailElements": [], "DetailElements": [],
"CorrelationID": "${id.correlationid}", "CorrelationID": "${id.correlationid!"no Correlationid"}",
"ContextPayload": "rfxresponse", "ContextPayload": ${strJsonBody},
"Type": "RP_EXECUTIONFLOW_EVENT", "Type": "RP_EXECUTIONFLOW_EVENT",
"Task": "${id.apiRestReflexID}", "Task": "${id.apiRestReflexID!"no Task"}",
"OriginalID": "${id.refid?trim?json_string}", "OriginalID": "${id.refid!"no OriginalID"?trim?json_string}",
"StackTrace": "" "StackTrace": ""
} }
} }
] ]

View File

@ -4,16 +4,57 @@
<#-- organisation : organisationtId in ReflexPlatform --> <#-- organisation : organisationtId in ReflexPlatform -->
<#assign restResponsetMsg = JsonUtil.jsonToMap(input)> <#assign restResponsetMsg = JsonUtil.jsonToMap(input)>
<#assign id = JsonUtil.jsonToMap(restResponsetMsg.id)> <#assign id = JsonUtil.jsonToMap(restResponsetMsg.id!"{}")>
<#assign projectRP = project> <#assign projectRP = project>
<#assign organisationRP = organisation> <#assign organisationRP = organisation>
<#assign aDateTime = .now> <#assign aDateTime = .now>
<#assign no_apiRestReflexID = "no apiRestReflexID">
<#assign no_status = -99999>
<#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>
<#switch id.apiRestReflexID>
<#case "preparation_orders_post"> <#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 200>
<#case 201> <#case 201>
<#-- *********************************************** ApiRestID = preparation_orders_post ******************** --> <#-- *********************************************** ApiRestID = preparation_orders_post ******************** -->
@ -63,7 +104,7 @@
<#if restResponsetMsg.body?? > <#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else> <#else>
<#assign restResponseBody = "{}" /> <#assign restResponseBody = "${restResponsetMsg?trim?json_string}}" />
</#if> </#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
@ -81,7 +122,29 @@
<#break> <#break>
<#case "receipts_post"> <#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 200>
<#case 201> <#case 201>
<#-- *********************************************** ApiRestID = receipts_post ******************** --> <#-- *********************************************** ApiRestID = receipts_post ******************** -->
@ -121,7 +184,7 @@
<#if restResponsetMsg.body?? > <#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) /> <#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else> <#else>
<#assign restResponseBody = "{}" /> <#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#if> </#if>
<#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate> <#assign apiReflexPlatformID = ApiReflexPlatformID.PlatformLogCreate>
"apiReflexPlatformID" : "${apiReflexPlatformID}", "apiReflexPlatformID" : "${apiReflexPlatformID}",
@ -137,7 +200,6 @@
] ]
</#switch> </#switch>
<#break> <#break>
<#default> <#default>
<#stop> <#stop>
</#switch> </#switch>

View File

@ -7,7 +7,7 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
"RefID": "${id.refid?trim?json_string}", "RefID": "${id.refid!"no RefID"?trim?json_string}",
"RefDate": { "RefDate": {
"DateTime": "${aDateTime?iso_utc}", "DateTime": "${aDateTime?iso_utc}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"

View File

@ -4,40 +4,40 @@
<#noparse> <#noparse>
<#-- if LVID is egal to **quantity_in_base_lv** keyword then LVID is egal to base VL of the item --> <#-- 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 quantity_in_base_lv_RP_Cst = "**quantity_in_base_lv**" >
<#assign rfx_date_format_default = "yyyy-MM-dd" > <#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 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 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 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 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> </#noparse>
<#noparse><#assign length_unit_rfx = length_unit_KV_rfx[</#noparse>"${file.measurement_unit.length}"<#noparse>]!"CENTIMETER"></#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 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 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 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 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 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 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_rfx = </#noparse>"${file.author_time_zone!"UTC"}<#noparse>"></#noparse>
<#noparse><#assign time_zone_offset_rfx = </#noparse>"${file.time_zone_offset!"+00:00"}<#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> <#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><#assign text_language_rfx = </#noparse>"${reflex_platform_project.text_language!"en"}<#noparse>"></#noparse>
</#list> </#list>
<#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness> <#list file.reflex_platform_project_list?filter(j -> j.name == projectRP) as reflex_platform_project_uniqueness>
<#if reflex_platform_project_uniqueness.site_code_unicity??> <#if reflex_platform_project_uniqueness.site_code_unicity??>
<#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse> <#noparse><#assign uniqueness = </#noparse>${reflex_platform_project_uniqueness.site_code_unicity?c}<#noparse>></#noparse>
<#else> <#else>
<#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse> <#noparse><#assign uniqueness = </#noparse>false<#noparse>></#noparse>
</#if> </#if>
</#list> </#list>

View File

@ -46,6 +46,6 @@
] ]
<#break> <#break>
<#default> <#default>
<#stop "Event not processed"> <#stop >
</#switch> </#switch>

View File

@ -1,4 +1,6 @@
<#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl"> <#include "RPtoRFX_PrepOrder_DefaultHeaderData.ftl">
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
<#-- Valeurs par défaut Adresse --> <#-- Valeurs par défaut Adresse -->
<#-- Default values --> <#-- Default values -->
<#assign typecode ="010"> <#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 --> <#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in Reflex WMS to use this feature -->
<#assign defaultactor ="VIZ"> <#assign defaultactor ="VIZ">
<#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> <#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!="">
<#assign actorID = executionflow.ShipTo.ActorID > <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" >
<#else> <#else>
<#assign actorID = defaultactor > <#assign actorID = defaultactor >
</#if> </#if>
@ -20,7 +22,7 @@
"method" : "POST", "method" : "POST",
"uri_substitutions": { "uri_substitutions": {
"activity_code": "${activity_code}", "activity_code": "${activity_code}",
"physical_depot_code": "${executionflow.ShipFrom.ActorID}", "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}",
"originator_code": "${originator_code}" "originator_code": "${originator_code}"
}, },
"payload" : "payload" :

View File

@ -1,4 +1,6 @@
<#include "RPtoRFX_Receipt_DefaultHeaderData.ftl"> <#include "RPtoRFX_Receipt_DefaultHeaderData.ftl">
<#include "ActorPrefix.ftl">
<#include "HfRpConfig.ftl">
{ {
"id" : {"refid" : "${executionflow.OrderID?json_string}"}, "id" : {"refid" : "${executionflow.OrderID?json_string}"},
@ -6,7 +8,7 @@
"method" : "POST", "method" : "POST",
"uri_substitutions": { "uri_substitutions": {
"activity_code": "${activity_code}", "activity_code": "${activity_code}",
"physical_depot_code": "${executionflow.ShipTo.ActorID!""}", "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipTo.ActorID!"")}",
"originator_code": "${originator_code}" "originator_code": "${originator_code}"
}, },
"payload" : "payload" :
@ -15,8 +17,8 @@
"receipt_type": "${receipt_type}", "receipt_type": "${receipt_type}",
"receipt_reason_code": "${receipt_reason_code}", "receipt_reason_code": "${receipt_reason_code}",
"work_mode_code" : "${work_mode_code}", "work_mode_code" : "${work_mode_code}",
"original_code" : "${executionflow.ShipFrom.ActorID}", "original_code" : "${RPtoRFXprefixSupplier(executionflow.ShipFrom.ActorID)}",
"carrier_code" : "${executionflow.Carrier.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)}", "receipt_datetime": "${DateTimeUTCtoRfxLocale(executionflow.RequestedMilestones.RequestedDeliveryDateTime.DateTime,time_zone_rfx)}",

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