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">
<#-- *********************************************** Action = DELETE ******************** -->
<#stop "event not supported">
<#stop >
<#break>
<#default>
<#stop "event not supported">
<#stop >
</#switch>

View File

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

View File

@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
@ -6,7 +8,7 @@
"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": {

View File

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

View File

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

View File

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

View File

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

View File

@ -41,6 +41,6 @@
<#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":
{

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

@ -41,6 +41,6 @@
<#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":
{

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

@ -28,7 +28,10 @@
reflexMvtStockInterface.ipg_move_type == "370" ||
reflexMvtStockInterface.ipg_move_type == "400" ||
reflexMvtStockInterface.ipg_move_type == "410" ||
reflexMvtStockInterface.ipg_move_type == "420"
reflexMvtStockInterface.ipg_move_type == "420" ||
reflexMvtStockInterface.ipg_move_type == "455" ||
reflexMvtStockInterface.ipg_move_type == "460" ||
reflexMvtStockInterface.ipg_move_type == "465"
>
[
{
@ -68,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 />
@ -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

@ -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",
@ -14,10 +15,13 @@
"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": {
@ -38,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": {

View File

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

View File

@ -40,6 +40,6 @@
]
<#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

@ -41,6 +41,6 @@
<#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":
{

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

@ -41,6 +41,6 @@
<#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":
{
@ -39,17 +41,20 @@
<#-- if Reflex WMS address is not structured -->
<#else>
<#if depot.physical_depot_address??>
"Name": "${depot.physical_depot_address.company_name?json_string}",
"StreetAddressOne" : "${depot.physical_depot_address.address_1?json_string}",
"StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}",
"StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}",
"CountryCode" : ""
</#if>
</#if>
},
<#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

@ -50,10 +50,10 @@
<#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}>
,
@ -64,7 +64,6 @@
<#include "RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl">
}
</#if>
</#if>
<#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number >
,
{
@ -79,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>
@ -92,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

@ -24,7 +24,6 @@
<#else>
"Value": { "Bool" : "False"}
},
{
<#assign manufacturing_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc />
"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 "ActorPrefix.ftl">
[
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg>
@ -116,7 +118,7 @@
<#else>
"LineID": "${preparation_line.pro_line_number!0}",
</#if>
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"ActorID": "${RFXtoRPprefixDepot(preparationOrder.physical_depot_code?trim?json_string)}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs}
@ -125,7 +127,6 @@
}
]
}
}<#sep>,</#sep>
</#list>
<#sep>,</#sep>

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,5 +1,6 @@
<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[
<#assign dispatched_datetime4 = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) />
{
@ -7,7 +8,16 @@
"ProjectID": "${projectRP}"
},
"ID": {
<#if despatched_ipg.consignment_unit_id!="">
"RefID": "${despatched_ipg.consignment_unit_id?trim?json_string}",
<#else>
<#if despatched_ipg.carton_number != "000000000000000000">
"RefID":"${despatched_ipg.carton_number}",
<#else>
"RefID":"${despatched_ipg.hd_number}",
</#if>
</#if>
"RefDate": {
"DateTime": "${dispatched_datetime4}",
"AuthorTimeZone": "${time_zone_rfx}"
@ -22,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

@ -29,17 +29,17 @@
<#include "RFXtoRP_HsrPro_ExecutionflowDetected.ftl">
}
<#else>
<#stop "preparation order already confirmed">
<#-- 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?trim?json_string}"
"ActorID": "${RFXtoRPprefixConsignee(preparation_order.end_consignee_code?json_string)}"
<#else>
"Actor":
{
@ -89,7 +90,6 @@
</#if>
<#-- Line Metadata inclusion -->
<#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">,
"RequestedContent":
{
"Goods":
@ -100,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" :
{
@ -115,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!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">
<#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 ******************** -->
@ -63,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}",
@ -81,7 +122,29 @@
<#break>
<#case "receipts_post">
<#switch restResponsetMsg.status>
<#switch restResponsetMsg.status!no_status>
<#case no_status>
[
{
<#if restResponsetMsg.body?? >
<#assign restResponseBody = JsonUtil.decodeBase64(restResponsetMsg.body) />
<#else>
<#assign restResponseBody = "${restResponsetMsg?trim?json_string}" />
</#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 ******************** -->
@ -121,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}",
@ -137,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

@ -46,6 +46,6 @@
]
<#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" :

View File

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

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