diff --git a/RFXtoRP_HsaDispute_ClaimMetadata.ftl b/RFXtoRP_HsaDispute_ClaimMetadata.ftl new file mode 100644 index 0000000..e5b9b99 --- /dev/null +++ b/RFXtoRP_HsaDispute_ClaimMetadata.ftl @@ -0,0 +1,4 @@ +<#-- use protobuf of class HsaDispute to find Reflex Wms fields names --> + + +"MetaData": [ ] \ No newline at end of file diff --git a/RFXtoRP_HsaDispute_Created.ftl b/RFXtoRP_HsaDispute_Created.ftl index de64de8..820fd8b 100644 --- a/RFXtoRP_HsaDispute_Created.ftl +++ b/RFXtoRP_HsaDispute_Created.ftl @@ -39,6 +39,8 @@ "Value": "${dispute.dispute_amount}" }, + <#-- Claim metadata inclusion --> + <#include "RFXtoRP_HsaDispute_ClaimMetadata.ftl">, <#-- To configure --> <#include "RFXtoRP_HsaDispute_TableReasonCodeToClaimTypeID.ftl"> <#if dispute.dispute_type_code=="050" > diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 59b6690..39a9ed0 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -44,6 +44,7 @@ "automatic_generation": "${automatic_generation_flag}", "deactivate": "false", "optional_attributes": { + <#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl"> "apt_with_end_consignee": "${apt_with_end_consignee_flag}", "apt_with_intermediate": "false", "load_grouping": "${load_grouping}" @@ -83,9 +84,13 @@ <#-- ******* line MetaData and Segmentationkeys to maps ******** --> <#if line.MetaData??> <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> + <#else> + <#assign Line_MetaData_Map = {} /> <#if line.RequestedContent.Goods.SegmentationKeys??> <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> + <#else> + <#assign SegmentationKeys_Map = {} /> <#include "RPtoRFX_PrepOrder_DefaultLineData.ftl"> { diff --git a/RPtoRFX_PrepOrder_OptionalAttributes.ftl b/RPtoRFX_PrepOrder_OptionalAttributes.ftl new file mode 100644 index 0000000..de764b7 --- /dev/null +++ b/RPtoRFX_PrepOrder_OptionalAttributes.ftl @@ -0,0 +1,8 @@ +<#-- Here are the fields that can be added +"end_consignee_apt_start_datetime": "0000-00-00T00:00:00", +"end_consignee_apt_end_datetime": "0000-00-00T00:00:00", +"reason_code": "str", +"planned_preparation_date": "0000-00-00", +"despatch_grouping": "string", +"reservation_end_datetime": "0000-00-00T00:00:00", +--> diff --git a/RPtoRFX_Receipt.ftl b/RPtoRFX_Receipt.ftl index a0c50cf..6b524ec 100644 --- a/RPtoRFX_Receipt.ftl +++ b/RPtoRFX_Receipt.ftl @@ -38,9 +38,13 @@ <#-- ******* line MetaData and Segmentationkeys to maps ******** --> <#if line.MetaData??> <#assign Line_MetaData_Map = JsonUtil.sequenceToMap(line.MetaData, "Key", "Value") /> + <#else> + <#assign Line_MetaData_Map = {} /> <#if line.RequestedContent.Goods.SegmentationKeys??> <#assign SegmentationKeys_Map = JsonUtil.sequenceToMap(line.RequestedContent.Goods.SegmentationKeys, "Key", "Value") /> + <#else> + <#assign SegmentationKeys_Map = {} /> <#include "RPtoRFX_Receipt_DefaultLineData.ftl"> {