<#include "HfRpConfig.ftl"> [ <#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}" }, "ID": { <#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"> "ContainerType": "${despatched_ipg.carton_type_code}" <#else> "ContainerType": "${despatched_ipg.hd_type_code}" }, <#-- HU Metadata inclusin inclusion --> <#include "RFXtoRP_HsrPrepa_GoodsPrepared_HandlingUnitMetadata.ftl"> , "PreparedContents" :[ { "Goods": { "ItemID": "${preparation_line.item_code}", "LVBranchID": "${preparation_line.item_lv_code}", <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> --> <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> --> <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> --> <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> --> <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> "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 = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> --> <#assign priority_date = despatched_ipg.ipg_use_by_date?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}", "LineID": "${preparation_line.pro_line_number}", "ActorID": "${preparationOrder.physical_depot_code}", "Quantity": { "LVID": "${quantity_in_base_lv_RP_Cst}", "Value": ${despatched_ipg.quantity_lvs} } } ] } }<#sep>, <#sep>, ]