diff --git a/RFXtoRP_HfExpGrpList.ftl b/RFXtoRP_HfExpGrpList.ftl index 08e4a69..affae42 100644 --- a/RFXtoRP_HfExpGrpList.ftl +++ b/RFXtoRP_HfExpGrpList.ftl @@ -1,5 +1,5 @@ <#-- *********************************************** Parameter global ******************** --> -<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> <#assign projectRP = project> <#assign organisationRP = organisation> <#include "HfExpGrpList.ftl"> @@ -15,14 +15,14 @@ <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> <#assign file = JsonUtil.jsonToMap(dataRfx)> - <#assign temp = ExpiryGroupList64> + <#assign temp = ExpiryGroupList64> <#list file.expiry_group_list as expiry_group> <#assign temp = JsonUtil.update(temp,cloudEventMsg.action,expiry_group.exipiry_group_code,Date_Tye_Code_KV[expiry_group.priority_date_type_code])> <#assign output = JsonUtil.print(temp)> -${output} +${output} <#break> - + <#default> - <#stop> + <#stop > diff --git a/RFXtoRP_HsaCarrier_ActorCreated.ftl b/RFXtoRP_HsaCarrier_ActorCreated.ftl index fd16db5..e9b707a 100644 --- a/RFXtoRP_HsaCarrier_ActorCreated.ftl +++ b/RFXtoRP_HsaCarrier_ActorCreated.ftl @@ -1,32 +1,32 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier.carrier_code}" + "RefID": "${carrier.carrier_code?json_string}" }, - + "Payload": { "Name": "${carrier.carrier_designation?json_string}", "ManagedStock": false, "IsCarrier": true, <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - + <#-- <#include "RFXtoRP_HsaCarrier_ActorCreated_Metadata.ftl">, --> - + "Address": { <#-- if Reflex WMS address is structured --> - <#if carrier.carrier_structured_address?? > + <#if carrier.carrier_structured_address?? > "Name": "${carrier.carrier_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${carrier.carrier_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", + "StreetAddressTwo" : "${carrier.carrier_structured_address.additionnal_data?json_string}", "PostalCode" : "${carrier.carrier_structured_address.postal_code?json_string}", "City" : "${carrier.carrier_structured_address.post_code_area_name?json_string}", "CountryCode" : "${carrier.carrier_structured_address.country_code?json_string}", @@ -40,15 +40,15 @@ "StreetAddressOne" : "${carrier.address.address_1?json_string}", "StreetAddressTwo" : "${carrier.address.address_2?json_string}", "StreetAddressThree" : "${carrier.address.address_3?json_string}" - - + + }, <#if carrier.address??> - "Phones": ["${carrier.address.telephone?json_string}", + "Phones": ["${carrier.address.telephone?json_string}", "${carrier.address.other_number?json_string}" ], "Typology": "TYPOLOGY_CARRIER" } - } + } ] diff --git a/RFXtoRP_HsaCarrier_ActorDeleted.ftl b/RFXtoRP_HsaCarrier_ActorDeleted.ftl index bc5f838..da3b214 100644 --- a/RFXtoRP_HsaCarrier_ActorDeleted.ftl +++ b/RFXtoRP_HsaCarrier_ActorDeleted.ftl @@ -1,12 +1,12 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${carrier.carrier_code}" + "RefID": "${carrier.carrier_code?json_string}" }, - + "Payload": {} - } + } ] diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 06bc6c2..2aac723 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -4,7 +4,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code}" + "RefID": "${actor.code?json_string}" }, "Payload": { @@ -17,7 +17,7 @@ <#-- <#include "RFXtoRP_HsaCons_ActorCreated_Metadata.ftl">, --> - + "Address": { @@ -26,7 +26,7 @@ "Name": "${actor.consignee_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${actor.consignee_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", + "StreetAddressTwo" : "${actor.consignee_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.consignee_structured_address.postal_code?json_string}", "City" : "${actor.consignee_structured_address.post_code_area_name?json_string}", "CountryCode" : "${actor.consignee_structured_address.country_code?json_string}", @@ -34,20 +34,20 @@ "State": "${actor.consignee_structured_address.country_designation?json_string}" <#-- if Reflex WMS is not structured --> - <#else> + <#else> <#if actor.address?? > "Name": "${actor.address.company_name?json_string}", "StreetAddressOne" : "${actor.address.address_1?json_string}", "StreetAddressTwo" : "${actor.address.address_2?json_string}", - "StreetAddressThree" : "${actor.address.address_3?json_string}" - - - }, - <#if actor.address?? > - "Phones": ["${actor.address.telephone?json_string}", + "StreetAddressThree" : "${actor.address.address_3?json_string}" + + + }, + <#if actor.address?? > + "Phones": ["${actor.address.telephone?json_string}", "${actor.address.other_number?json_string}" - ], + ], "Typology": "TYPOLOGY_UNKNOWN" } diff --git a/RFXtoRP_HsaCons_ActorDeleted.ftl b/RFXtoRP_HsaCons_ActorDeleted.ftl index abce0a0..bb838af 100644 --- a/RFXtoRP_HsaCons_ActorDeleted.ftl +++ b/RFXtoRP_HsaCons_ActorDeleted.ftl @@ -1,12 +1,12 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code}" + "RefID": "${actor.code?json_string}" }, - + "Payload": {} } ] diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index 90566bc..f1c5d4b 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -3,42 +3,42 @@ [ <#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 /> - { + { "Header": { "ProjectID": "${projectRP}" }, "ID": { "RefID": "${reflexMvtStockInterface.hd_number}" - }, + }, "Payload": { "ReceivedContents" :[ { "DateTime": { "DateTime": "${receipt_confirmation_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" + "AuthorTimeZone": "${time_zone_rfx}" }, "Goods": { - "ItemID": "${reflexMvtStockInterface.item_code}", - "LVBranchID": "${reflexMvtStockInterface.lv_code}", + "ItemID": "${reflexMvtStockInterface.item_code?json_string}", + "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}", "PriorityDate": "${priority_date}", - + <#-- Goods received Segmentation Keys inclusion --> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> }, <#if reflexMvtStockInterface.receipt_reference!=""> - "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference}", + "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?json_string}", <#else> "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}", - "ActorID": "${reflexMvtStockInterface.physical_depot_code}", + "ActorID": "${reflexMvtStockInterface.physical_depot_code?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} + "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} } } ] - } + } } - + ] diff --git a/RFXtoRP_HsaIpgMove_StockMoved.ftl b/RFXtoRP_HsaIpgMove_StockMoved.ftl index 754b2d2..9421f70 100644 --- a/RFXtoRP_HsaIpgMove_StockMoved.ftl +++ b/RFXtoRP_HsaIpgMove_StockMoved.ftl @@ -12,42 +12,42 @@ "300":"STOCK_MOVEMENT_TYPE_REQUALIFICATION", "400":"STOCK_MOVEMENT_TYPE_FIX", "410":"STOCK_MOVEMENT_TYPE_FIX", - "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}> + "420":"STOCK_MOVEMENT_TYPE_REQUALIFICATION"}> <#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": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "Payload": { "Goods": { - "ItemID": "${reflexMvtStockInterface.item_code}", + "ItemID": "${reflexMvtStockInterface.item_code?json_string}", "PriorityDate": "${ipg_priority_datetime}", - + <#-- Segmentation keys inclusions --> <#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">, - - - "LVBranchID": "${reflexMvtStockInterface.lv_code}" + + + "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" }, - "ActorID": "${reflexMvtStockInterface.physical_depot_code}", + "ActorID": "${reflexMvtStockInterface.physical_depot_code?json_string}", "Movement": { - + "DateTime": { "DateTime": "${generation_date}", "AuthorTimeZone": "${time_zone_rfx}" }, - "Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code}", + "Author": "ReflexWMS-${reflexMvtStockInterface.ipg_move_creation_user_code?json_string}", "ExternalMoveRef" : "${reflexMvtStockInterface.ipg_move_year_number} - ${reflexMvtStockInterface.ipg_move_number}", "Type": "${MoveType_KV[reflexMvtStockInterface.ipg_move_type]!reflexMvtStockInterface.ipg_move_type}", - "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code}", + "Reason": "${reflexMvtStockInterface.miscellaneous_receipts_despatches_code?json_string}", "ExternalInfo" : "${reflexMvtStockInterface.stock_move_reference?json_string}", <#if reflexMvtStockInterface.ipg_move_operation_year_number!= 0> "OperationReference": "${reflexMvtStockInterface.ipg_move_operation_year_number} - ${reflexMvtStockInterface.ipg_move_operation_number}", - - + + "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", diff --git a/RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl b/RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl index 5c1c26e..467028b 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantRemoved.ftl @@ -1,14 +1,14 @@ <#include "HfRpConfig.ftl"> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${lv.item_code}" + "RefID": "${lv.item_code?json_string}" }, "Payload": { - "RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"] - } + "RemovedLogisticVariantIDs":["${lv.logistical_variant_code}"] + } } ] diff --git a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl index 1385a6e..ac9267a 100644 --- a/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl +++ b/RFXtoRP_HsaItmLv_LogisticVariantUpdated.ftl @@ -1,37 +1,37 @@ <#include "HfRpConfig.ftl"> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${lv.item_code}" + "RefID": "${lv.item_code?json_string}" }, "Payload": { "LogisticVariants": [ - { - "LVID": "${lv.logistical_variant_code}", - "Name" : "${lv.lv_type_code}", - <#if lv.id_list??> + { + "LVID": "${lv.logistical_variant_code?json_string}", + "Name" : "${lv.lv_type_code?json_string}", + <#if lv.id_list??> "Codes": [ <#list lv.id_list as id> { - "Key": "${id.logistical_variant_ID_type_code}", - "Value": "${id.logistical_variant_ID_code}" + "Key": "${id.logistical_variant_ID_type_code?json_string!""}", + "Value": "${id.logistical_variant_ID_code?json_string!""}" }<#sep>, - - ], - - - <#-- LV Metadata inclusion --> + + ], + + + <#-- LV Metadata inclusion --> <#include "RFXtoRP_HsaItmLv_LogisticVariantUpdated_Metadata.ftl">, - + "IsBaseLogisticVariant": ${lv.base_lv}, - + <#if lv.base_lv != "true"> - "RefLV": "${lv.subpackaging_lv_code}", + "RefLV": "${lv.subpackaging_lv_code?json_string}", - + "QuantityInRefLV": ${lv.quantity_in_subpackaging_lv}, "NetWeight": { @@ -39,35 +39,35 @@ "Unit": "${weight_unit_rfx}" }, "GrossWeight": { - "Value": ${lv.gross_weight}, + "Value": ${lv.gross_weight}, "Unit": "${weight_unit_rfx}" }, "Volume": { "Value": ${lv.volume}, "Unit": "${volume_unit_rfx}" - }, + }, "Height": { "Value": ${lv.height}, "Unit": "${length_unit_rfx}" - }, + }, "Width": { "Value": ${lv.width}, "Unit": "${length_unit_rfx}" - }, + }, "Length": { "Value": ${lv.depth}, "Unit": "${length_unit_rfx}" - }, + }, <#if lv.packaging_lv == "true"> "BranchIDs": ["${lv.logistical_variant_code}"] <#else> "BranchIDs": [] - - - + + + } - ] + ] } } ] diff --git a/RFXtoRP_HsaItm_ItemCreated.ftl b/RFXtoRP_HsaItm_ItemCreated.ftl index f38c95d..943f331 100644 --- a/RFXtoRP_HsaItm_ItemCreated.ftl +++ b/RFXtoRP_HsaItm_ItemCreated.ftl @@ -1,102 +1,102 @@ <#include "HfRpConfig.ftl"> <#include "HfExpGrpList.ftl"> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${item.item_code}" + "RefID": "${item.item_code?json_string}" }, "Payload": { "DescriptionsByLanguage": [{ "ShortDescription": "${item.short_designation?json_string}", "LongDescription": "${item.designation?json_string}", - "TechnicalDetails": "${item.item_description?json_string}", + "TechnicalDetails": "${item.item_description?json_string}", "LanguageCodeISO6391": "${text_language_rfx}" - } - ], + } + ], "ExpiryConstraint": { - "Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}" + "Type": "${ExpiryGroupList[item.expiry_group_code]!"UNKNOWN_DATE"}" }, - - <#-- Item metadata inclusion --> + + <#-- Item metadata inclusion --> <#include "RFXtoRP_HsaItm_ItemCreated_ItemMetadata.ftl">, - + <#-- Item Photo URI could be added here --> <#--"PhotoURI": " ", --> <#-- Loop for the Logistical Variants - LV --> - <#if item.logistical_variant_list??> + <#if item.logistical_variant_list??> "LogisticVariants": [ - - <#list item.logistical_variant_list as logistical_variant> - { - "LVID": "${logistical_variant.logistical_variant_code}", - "Name" : "${logistical_variant.lv_type_code}", - - <#if logistical_variant.id_list??> + + <#list item.logistical_variant_list as logistical_variant> + { + "LVID": "${logistical_variant.logistical_variant_code?json_string}", + "Name" : "${logistical_variant.lv_type_code?json_string}", + + <#if logistical_variant.id_list??> "Codes": [ <#list logistical_variant.id_list as id> { - "Key": "${id.logistical_variant_ID_type_code}", - "Value": "${id.logistical_variant_ID_code}" + "Key": "${id.logistical_variant_ID_type_code?json_string!""}", + "Value": "${id.logistical_variant_ID_code?json_string!""}" }<#sep>, - - ], - - - <#-- LV Metadata inclusion --> - <#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">, - - "IsBaseLogisticVariant": ${logistical_variant.base_lv}, - - <#if logistical_variant.base_lv != "true"> - "RefLV": "${logistical_variant.subpackaging_lv_code}", + + ], - + + <#-- LV Metadata inclusion --> + <#include "RFXtoRP_HsaItm_ItemCreated_LogisticVariantMetadata.ftl">, + + "IsBaseLogisticVariant": ${logistical_variant.base_lv}, + + <#if logistical_variant.base_lv != "true"> + "RefLV": "${logistical_variant.subpackaging_lv_code?json_string}", + + "QuantityInRefLV": ${logistical_variant.quantity_in_subpackaging_lv}, - + "NetWeight": { "Value": ${logistical_variant.net_weight}, "Unit": "${weight_unit_rfx}" }, "GrossWeight": { - "Value": ${logistical_variant.gross_weight}, + "Value": ${logistical_variant.gross_weight}, "Unit": "${weight_unit_rfx}" }, "Volume": { "Value": ${logistical_variant.volume}, "Unit": "${volume_unit_rfx}" - }, + }, "Height": { "Value": ${logistical_variant.height}, "Unit": "${length_unit_rfx}" - }, + }, "Width": { "Value": ${logistical_variant.width}, "Unit": "${length_unit_rfx}" - }, + }, "Length": { "Value": ${logistical_variant.depth}, "Unit": "${length_unit_rfx}" - }, - - + }, + + <#if logistical_variant.packaging_lv == "true"> "BranchIDs": ["${logistical_variant.logistical_variant_code}"] <#else> "BranchIDs": [] - - + + } - <#sep>, - - - ] + <#sep>, + + + ] <#-- End of LV loop --> - + } } ] diff --git a/RFXtoRP_HsaItm_ItemDeleted.ftl b/RFXtoRP_HsaItm_ItemDeleted.ftl index 9250205..c8775d9 100644 --- a/RFXtoRP_HsaItm_ItemDeleted.ftl +++ b/RFXtoRP_HsaItm_ItemDeleted.ftl @@ -1,12 +1,12 @@ <#include "HfRpConfig.ftl"> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${item.item_code}" + "RefID": "${item.item_code?json_string}" }, - "Payload": {} + "Payload": {} } ] diff --git a/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl b/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl index 847ec8a..e0f1939 100644 --- a/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsaProStatus_ExecutionflowCancelled.ftl @@ -3,12 +3,12 @@ <#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparationStatusInterface.preparation_order_originator_reference}", + "RefID": "${preparationStatusInterface.preparation_order_originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsaProStatus_PreparationCompleted.ftl b/RFXtoRP_HsaProStatus_PreparationCompleted.ftl index 110b7f6..3c66b75 100644 --- a/RFXtoRP_HsaProStatus_PreparationCompleted.ftl +++ b/RFXtoRP_HsaProStatus_PreparationCompleted.ftl @@ -2,19 +2,19 @@ <#include "ReflexUtils.ftl"> <#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparationStatusInterface.preparation_order_originator_reference}", + "RefID": "${preparationStatusInterface.preparation_order_originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, - + "Payload": {} - + } ] diff --git a/RFXtoRP_HsaProStatus_PreparationExpected.ftl b/RFXtoRP_HsaProStatus_PreparationExpected.ftl index 110b7f6..3c66b75 100644 --- a/RFXtoRP_HsaProStatus_PreparationExpected.ftl +++ b/RFXtoRP_HsaProStatus_PreparationExpected.ftl @@ -2,19 +2,19 @@ <#include "ReflexUtils.ftl"> <#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparationStatusInterface.preparation_order_originator_reference}", + "RefID": "${preparationStatusInterface.preparation_order_originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, - + "Payload": {} - + } ] diff --git a/RFXtoRP_HsaProStatus_PreparationStarted.ftl b/RFXtoRP_HsaProStatus_PreparationStarted.ftl index 110b7f6..3c66b75 100644 --- a/RFXtoRP_HsaProStatus_PreparationStarted.ftl +++ b/RFXtoRP_HsaProStatus_PreparationStarted.ftl @@ -2,19 +2,19 @@ <#include "ReflexUtils.ftl"> <#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparationStatusInterface.preparation_order_originator_reference}", + "RefID": "${preparationStatusInterface.preparation_order_originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, - + "Payload": {} - + } ] diff --git a/RFXtoRP_HsaProStatus_TransportStarted.ftl b/RFXtoRP_HsaProStatus_TransportStarted.ftl index 110b7f6..3c66b75 100644 --- a/RFXtoRP_HsaProStatus_TransportStarted.ftl +++ b/RFXtoRP_HsaProStatus_TransportStarted.ftl @@ -2,19 +2,19 @@ <#include "ReflexUtils.ftl"> <#assign preparation_status_datetime = RfxDateTimetoUTC(preparationStatusInterface.preparation_status_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparationStatusInterface.preparation_order_originator_reference}", + "RefID": "${preparationStatusInterface.preparation_order_originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, - + "Payload": {} - + } ] diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index 5a219ad..e5b33cc 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -1,37 +1,37 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code}" + "RefID": "${actor.code?json_string}" }, - + "Payload": { "Name": "${actor.designation?json_string}", "ManagedStock": false, - "IsCarrier": false, + "IsCarrier": false, <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - + <#-- <#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">, --> - + "Address": { <#-- if Reflex WMS address is structured --> - <#if actor.supplier_structured_address?? > + <#if actor.supplier_structured_address?? > "Name": "${actor.supplier_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", + "StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}", "PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}", "City" : "${actor.supplier_structured_address.post_code_area_name?json_string}", "CountryCode" : "${actor.supplier_structured_address.country_code?json_string}", "ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}", "State": "${actor.supplier_structured_address.country_designation?json_string}" - + <#-- if Reflex WMS address is not structured --> <#else> <#if actor.optional_attributes?? > @@ -41,14 +41,14 @@ "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}" - + }, <#if actor.optional_attributes?? > - "Phones": ["${actor.optional_attributes.telephone?json_string}", + "Phones": ["${actor.optional_attributes.telephone?json_string}", "${actor.optional_attributes.other_number?json_string}" ], "Typology": "TYPOLOGY_UNKNOWN" } - } + } ] diff --git a/RFXtoRP_HsaSup_ActorDeleted.ftl b/RFXtoRP_HsaSup_ActorDeleted.ftl index 07f19fc..bb838af 100644 --- a/RFXtoRP_HsaSup_ActorDeleted.ftl +++ b/RFXtoRP_HsaSup_ActorDeleted.ftl @@ -1,12 +1,12 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${actor.code}" + "RefID": "${actor.code?json_string}" }, - + "Payload": {} - } + } ] diff --git a/RFXtoRP_HsrDepot_ActorCreated.ftl b/RFXtoRP_HsrDepot_ActorCreated.ftl index 07adb7e..187fae8 100644 --- a/RFXtoRP_HsrDepot_ActorCreated.ftl +++ b/RFXtoRP_HsrDepot_ActorCreated.ftl @@ -1,37 +1,37 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${depot.physical_depot_code}" + "RefID": "${depot.physical_depot_code?json_string}" }, - + "Payload": { "Name": "${depot.physical_depot_designation?json_string}", "ManagedStock": true, "IsCarrier": false, <#-- ***Partner ID could be added here *** --> <#-- "PartnerID": "${}", --> - + <#-- <#include "RFXtoRP_HsrDepot_ActorCreated_Metadata.ftl">, --> - + "Address": { <#-- if Reflex WMS address is structured --> - <#if depot.physical_depot_structured_address?? > + <#if depot.physical_depot_structured_address?? > "Name": "${depot.physical_depot_structured_address.name_or_company?json_string}", "StreetAddressOne" : "${depot.physical_depot_structured_address.street_and_PO?json_string}", - "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", + "StreetAddressTwo" : "${depot.physical_depot_structured_address.additionnal_data?json_string}", "PostalCode" : "${depot.physical_depot_structured_address.postal_code?json_string}", "City" : "${depot.physical_depot_structured_address.post_code_area_name?json_string}", "CountryCode" : "${depot.physical_depot_structured_address.country_code?json_string}", "ProvinceCode": "${depot.physical_depot_structured_address.territorial_div_code?json_string}", "State": "${depot.physical_depot_structured_address.country_designation?json_string}" - + <#-- if Reflex WMS address is not structured --> <#else> "Name": "${depot.physical_depot_address.company_name?json_string}", @@ -39,12 +39,12 @@ "StreetAddressTwo" : "${depot.physical_depot_address.address_2?json_string}", "StreetAddressThree" : "${depot.physical_depot_address.address_3?json_string}" - + }, - "Phones": ["${depot.physical_depot_address.telephone?json_string}", + "Phones": ["${depot.physical_depot_address.telephone?json_string}", "${depot.physical_depot_address.other_number?json_string}" ], "Typology": "TYPOLOGY_UNKNOWN" } - } + } ] diff --git a/RFXtoRP_HsrDepot_ActorDeleted.ftl b/RFXtoRP_HsrDepot_ActorDeleted.ftl index 164f67e..0e82294 100644 --- a/RFXtoRP_HsrDepot_ActorDeleted.ftl +++ b/RFXtoRP_HsrDepot_ActorDeleted.ftl @@ -1,12 +1,12 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${depot.physical_depot_code}" + "RefID": "${depot.physical_depot_code?json_string}" }, - + "Payload": {} - } + } ] diff --git a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl index 89cae0e..6e5d826 100644 --- a/RFXtoRP_HsrPrepa_CarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_CarrierUpdated.ftl @@ -1,22 +1,22 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - - { + + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID":{ - "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference}" + "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?json_string}" }, "Payload":{ "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code}" + "ActorID":"${preparationOrder.load_data.carrier_code?json_string}" } - <#-- Add transport grade code + <#-- Add transport grade code <#if preparationOrder.transport_grade_code!=""> , - "CarrierService":"${preparationOrder.transport_grade_code}" + "CarrierService":"${preparationOrder.transport_grade_code?json_string}" --> } } diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl index 92f5bfa..92cda11 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl @@ -3,25 +3,25 @@ [ <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list??) as preparation_line> <#list preparation_line.despatched_ipg_list as despatched_ipg> - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - <#if despatched_ipg.carton_number != "000000000000000000"> + <#if despatched_ipg.carton_number != "000000000000000000"> "RefID": "${despatched_ipg.carton_number}" <#else> "RefID": "${despatched_ipg.hd_number}" }, - + "Payload": { "Information" :{ - <#if despatched_ipg.carton_number != "000000000000000000"> + <#if despatched_ipg.carton_number != "000000000000000000"> "ContainerType": "${despatched_ipg.carton_type_code}" <#if preparation_line.despatched_cartons_list?? > <#list preparation_line.despatched_cartons_list?filter(l ->l.carton_number==despatched_ipg.carton_number) as dimensionCarton> - , + , "Length": { "Unit": "${length_unit_rfx}", "Value": "${dimensionCarton.overall_depth}" @@ -37,11 +37,11 @@ "Width": { "Unit": "${length_unit_rfx}", "Value": "${dimensionCarton.overall_width}" - } + } - + <#else> - "ContainerType": "${despatched_ipg.hd_type_code}", + "ContainerType": "${despatched_ipg.hd_type_code?json_string}", <#if preparation_line.despatched_hds_list??> <#list preparation_line.despatched_hds_list?filter(j ->j.handling_device_number==despatched_ipg.hd_number) as dimensionHU> "Length": { @@ -55,20 +55,20 @@ "Width": { "Unit": "${length_unit_rfx}", "Value": "${dimensionHU.hd_type_width}" - } + } }, <#-- HU Metadata inclusin inclusion --> - <#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl"> + <#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl"> , "PreparedContents" :[ { "Goods": { - "ItemID": "${preparation_line.item_code}", - "LVBranchID": "${preparation_line.item_lv_code}", + "ItemID": "${preparation_line.item_code?json_string}", + "LVBranchID": "${preparation_line.item_lv_code?json_string}", <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", @@ -86,42 +86,42 @@ "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> - <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> - <#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> + <#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> "PriorityDate": "error_date", - - - - - - - + + + + + + + <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_SegmentationKeys.ftl"> }, - "ExecutionflowID": "${preparation_line.preparation_order_originator_reference}", - <#if (preparation_line.pro_originator_reference_line_number!0) != 0> + "ExecutionflowID": "${preparation_line.preparation_order_originator_reference?json_string}", + <#if (preparation_line.pro_originator_reference_line_number!0) != 0> "LineID": "${preparation_line.pro_originator_reference_line_number}", <#else> "LineID": "${preparation_line.pro_line_number!0}", - "ActorID": "${preparationOrder.physical_depot_code}", + "ActorID": "${preparationOrder.physical_depot_code?json_string}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": ${despatched_ipg.quantity_lvs} - } + "Value": ${despatched_ipg.quantity_lvs} + } } ] } - + }<#sep>, - + <#sep>, - + ] diff --git a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl index 7b3176a..e9da77f 100644 --- a/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl +++ b/RFXtoRP_HsrPrepa_OrderCarrierUpdated.ftl @@ -1,17 +1,17 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - - { + + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID":{ - "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference}" + "RefID": "${preparationOrder.preparation_line_lst[0].preparation_order_originator_reference?json_string}" }, "Payload":{ "Carrier": { - "ActorID":"${preparationOrder.load_data.carrier_code}" + "ActorID":"${preparationOrder.load_data.carrier_code?json_string}" } } } diff --git a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl index 69ca2f6..495a261 100644 --- a/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl +++ b/RFXtoRP_HsrPrepa_TrackingHuLabelled.ftl @@ -1,16 +1,16 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - - { + + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${despatched_ipg.consignment_unit_id}" + "RefID": "${despatched_ipg.consignment_unit_id?json_string}" }, "Payload": { - <#if despatched_ipg.carton_number != "000000000000000000"> + <#if despatched_ipg.carton_number != "000000000000000000"> "HandlingunitID": "${despatched_ipg.carton_number}" <#else> "HandlingunitID": "${despatched_ipg.hd_number}" @@ -18,7 +18,7 @@ <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > , "HUCarrier":{ - "ActorID": "${preparationOrder.load_data.carrier_code}" + "ActorID": "${preparationOrder.load_data.carrier_code?json_string}" } diff --git a/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl b/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl index d933eed..952e8b8 100644 --- a/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowCancelled.ftl @@ -2,12 +2,12 @@ <#include "ReflexUtils.ftl"> <#assign preparation_status_datetime = RfxDateTimetoUTC(preparation_order.modification_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparation_order.originator_reference}", + "RefID": "${preparation_order.originator_reference?json_string}", "RefDate": { "DateTime": "${preparation_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl index 00a2f46..8cfafad 100644 --- a/RFXtoRP_HsrPro_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrPro_ExecutionflowDetected.ftl @@ -1,57 +1,57 @@ <#include "HfRpConfig.ftl"> <#include "ReflexUtils.ftl"> [ - { + { <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) /> <#assign pro_creation_datetime = RfxDateTimetoUTC(preparation_order.creation_datetime,time_zone_offset_rfx) /> "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${preparation_order.originator_reference}", + "RefID": "${preparation_order.originator_reference?json_string}", "RefDate": { "DateTime": "${pro_creation_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" + "AuthorTimeZone": "${time_zone_rfx}" } }, "Payload": { "CreationDateTime": { "DateTime": "${pro_creation_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - }, + "AuthorTimeZone": "${time_zone_rfx}" + }, <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_HeaderMetadata.ftl">, - <#-- Add transport grade code + <#-- Add transport grade code <#if preparation_order.transport_grade_code!=""> - "CarrierService":"${preparation_order.transport_grade_code}", + "CarrierService":"${preparation_order.transport_grade_code?json_string}", --> - "ShipFrom": { - "ActorID": "${preparation_order.physical_depot_code}" + "ShipFrom": { + "ActorID": "${preparation_order.physical_depot_code?json_string}" }, - "ShipFromAcked": true, + "ShipFromAcked": true, "ShipTo": { - <#if - <#-- preparation_order.address.type_code == "" && - preparation_order.address.title_code == "" && - preparation_order.address.first_name == "" && - preparation_order.address.last_name == "" && - preparation_order.address.mail_address == "" && - preparation_order.address.contact_type_code == "" && - preparation_order.address.mobile_phone_number == "" && - preparation_order.address.land_line_phone_number == "" && + <#if + <#-- preparation_order.address.type_code == "" && + preparation_order.address.title_code == "" && + preparation_order.address.first_name == "" && + preparation_order.address.last_name == "" && + preparation_order.address.mail_address == "" && + preparation_order.address.contact_type_code == "" && + preparation_order.address.mobile_phone_number == "" && + preparation_order.address.land_line_phone_number == "" && preparation_order.address.fax_number == "" && --> - preparation_order.address.address_type_code == "" && - preparation_order.address.name_or_company_name == "" && - preparation_order.address.additional_address_data_1 == "" && - preparation_order.address.additional_address_data_2 == "" && - preparation_order.address.post_code_area_name == "" && - preparation_order.address.territorial_division_code == "" && - preparation_order.address.postal_code == "" && - preparation_order.address.iso_country_code == ""> + preparation_order.address.address_type_code == "" && + preparation_order.address.name_or_company_name == "" && + preparation_order.address.additional_address_data_1 == "" && + preparation_order.address.additional_address_data_2 == "" && + preparation_order.address.post_code_area_name == "" && + preparation_order.address.territorial_division_code == "" && + preparation_order.address.postal_code == "" && + preparation_order.address.iso_country_code == ""> "ActorID": "${preparation_order.end_consignee_code}" - <#else> - "Actor": - { + <#else> + "Actor": + { "Name" : "${preparation_order.address.name_or_company_name?json_string!""}", "Address" : { @@ -63,62 +63,62 @@ "StreetAddressThree" : "${preparation_order.address.additional_address_data_2?json_string!""}" } }, - "Contact" : + "Contact" : { "FirstName" : "${preparation_order.address.first_name?json_string!""}", - "LastName" : "${preparation_order.address.last_name?json_string!""}", - "Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)}, - "Phones" : ["${preparation_order.address.mobile_phone_number!""}","${preparation_order.address.land_line_phone_number!""}", "${preparation_order.address.fax_number!""}" ] - } - + "LastName" : "${preparation_order.address.last_name?json_string!""}", + "Emails" : ${splitEmailsIntoArray(preparation_order.address.mail_address!""?json_string)}, + "Phones" : ["${preparation_order.address.mobile_phone_number?json_string!""}","${preparation_order.address.land_line_phone_number?json_string!""}", "${preparation_order.address.fax_number?json_string!""}" ] + } + }, - - <#if preparation_order.line_list??> + + <#if preparation_order.line_list??> "Lines" : [ <#list preparation_order.line_list as preparation_order_line > - { - <#if (preparation_order_line.originator_reference_line_number!0) != 0> + { + <#if (preparation_order_line.originator_reference_line_number!0) != 0> "LineID": "${preparation_order_line.originator_reference_line_number}", <#else> "LineID": "${preparation_order_line.preparation_order_line_number!0}", <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_LineMetadata.ftl">, - - "RequestedContent": - { - "Goods": + + "RequestedContent": + { + "Goods": { - "ItemID": "${preparation_order_line.item_code!"0"}", - "LVBranchID": "${preparation_order_line.item_lv_code!"0"}", + "ItemID": "${preparation_order_line.item_code?json_string!"0"}", + "LVBranchID": "${preparation_order_line.item_lv_code?json_string!"0"}", <#if (preparation_order_line.optional_attributes.forced_priority_date?length != 0) && (preparation_order_line.optional_attributes.forced_priority_date?starts_with("00") == false)> - <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> - "PriorityDate": "${forced_priority_date}", + <#assign forced_priority_date = preparation_order_line.optional_attributes.forced_priority_date?datetime(rfx_date_format_default)?iso_utc /> + "PriorityDate": "${forced_priority_date}", - + <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrPro_ExecutionflowDetected_SegmentationKeys.ftl"> - + }, - "Quantity" : + "Quantity" : { "LVID": "${quantity_in_base_lv_RP_Cst}", - "Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}" + "Value": "${preparation_order_line.base_lv_quantity_to_prepare!0}" } } }<#sep>, - + ], - + "RequestedMilestones" : { - "RequestedDeliveryDateTime" : + "RequestedDeliveryDateTime" : { - "DateTime": "${planned_final_delivery_start_datetime}", - "AuthorTimeZone": "${time_zone_rfx}" - } - } + "DateTime": "${planned_final_delivery_start_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + } } } ] diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl index e294ccf..368c776 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowCancelled.ftl @@ -3,12 +3,12 @@ <#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.modification_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference}", + "RefID": "${receipt.receipt_reference?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index 6d55a0f..d2b5463 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -8,7 +8,7 @@ "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference}", + "RefID": "${receipt.receipt_reference?json_string}", "RefDate": { "DateTime": "${receipt_creation_datetime}", "AuthorTimeZone": "${time_zone_rfx}" @@ -25,16 +25,16 @@ "ShipFrom": { - "ActorID": "${receipt.original_code}" + "ActorID": "${receipt.original_code?json_string}" }, "ShipTo" : { - "ActorID": "${receipt.physical_depot_code}" + "ActorID": "${receipt.physical_depot_code?json_string}" }, "ShipToAcked": true, <#if receipt.carrier_informations.carrier_code != ""> - "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code}"}, + "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?json_string}"}, @@ -49,8 +49,8 @@ { "Goods": { - "ItemID": "${line.item_code!"0"}", - "LVBranchID": "${line.item_lv_code!"0"}", + "ItemID": "${line.item_code?json_string!"0"}", + "LVBranchID": "${line.item_lv_code?json_string!"0"}", <#if line.line_without_detail??> <#if (line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> diff --git a/RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl b/RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl index 3d36bb1..7c3171f 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptCompleted.ftl @@ -2,12 +2,12 @@ <#include "ReflexUtils.ftl"> <#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.confirmation_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference}", + "RefID": "${receipt.receipt_reference?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" diff --git a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl index 823866d..c82554d 100644 --- a/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl +++ b/RFXtoRP_HsrReceiptList_ReceiptExpected.ftl @@ -3,19 +3,19 @@ <#assign receipt_status_datetime = RfxDateTimetoUTC(receipt.creation_datetime,time_zone_offset_rfx) /> [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { - "RefID": "${receipt.receipt_reference}", + "RefID": "${receipt.receipt_reference?json_string}", "RefDate": { "DateTime": "${receipt_status_datetime}", "AuthorTimeZone": "${time_zone_rfx}" } }, - + "Payload": {} - + } ] diff --git a/RFXtoRP_PrepOrder_ShipFromAcked.ftl b/RFXtoRP_PrepOrder_ShipFromAcked.ftl index 69d0247..6a4ab2c 100644 --- a/RFXtoRP_PrepOrder_ShipFromAcked.ftl +++ b/RFXtoRP_PrepOrder_ShipFromAcked.ftl @@ -1,15 +1,15 @@ [ - { + { "Header": { - "ProjectID": "${projectRP}" + "ProjectID": "${projectRP}" }, "ID": { "RefID": "${id.refid}" }, - + "Payload": { "ShipFromAcked": true } - + } ]