<#include "ReflexUtils.ftl"> <#include "HfRpConfig.ftl"> <#include "ActorPrefix.ftl"> [ { <#assign creationDate = RfxDateTimetoUTCWithTimezone(dataRfx.time,time_zone_rfx) /> "Header": { "ProjectID": "${projectRP}" }, "ID": { "CustomFields": [ { "Key": "anticipated_receipt_reference", "Value": "${ancReceipt.anticipated_receipt_reference?json_string}" }, { "Key": "anticipated_receipt_year", "Value": "${ancReceipt.anticipated_receipt_year?json_string}" }, { "Key": "anticipated_receipt_number", "Value": "${ancReceipt.anticipated_receipt_number?json_string}" }, { "Key": "originator_code", "Value": "${ancReceipt.originator_code?json_string}" }, { "Key": "activity_code", "Value": "${ancReceipt.activity_code?json_string}" }, { "Key": "depot_code", "Value": "${ancReceipt.physical_depot_code?json_string}" } ], "RefID": "${ancReceipt.anticipated_receipt_reference?json_string}" }, "Payload": { "ShipFrom": { "ActorID": "${RFXtoRPprefixSupplier(ancReceipt.original_code?json_string)}" }, "ShipTo": { "ActorID": "${RFXtoRPprefixDepot(ancReceipt.physical_depot_code?json_string)}" }, "CreationDateTime": { "DateTime": "${creationDate}", "AuthorTimeZone": "${time_zone_rfx}" }, <#-- Header Metadata inclusion --> <#include "RFXtoRP_HsrAntRec_Created_HeaderMetadata.ftl">, "Lines": [ <#list ancReceipt.line_list?filter(l -> l??) as line> { <#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=""> "LineID": ${line.anticipated_receipt_reference_line_no}, <#else> "LineID": ${line.anticipated_receipt_line_number}, <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">, "RequestedContent":{ "Goods":{ "ItemID":"${line.item_code?trim?json_string!"0"}", "LVBranchID":"${line.item_lv_code?trim?json_string!"0"}", <#-- Segmentation Keys inclusion --> <#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl"> }, "Quantity" : { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": "${line.planned_quantity_in_base_lv!0}" } } }<#sep>, ] } } ]