diff --git a/RFXtoRP_HsrPrepa.ftl b/RFXtoRP_HsrPrepa.ftl index 1f889a6..8570664 100644 --- a/RFXtoRP_HsrPrepa.ftl +++ b/RFXtoRP_HsrPrepa.ftl @@ -59,12 +59,16 @@ <#if despatched_ipg.carton_number != "000000000000000000" && despatched_ipg.carton_number!=despatched_ipg.hd_number > , { - - <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitHUsAdded> "apiReflexPlatformID" : "${apiReflexPlatformID}", "datas" : <#include "RFXtoRP_HsrPrepa_HandlingunitHUsAdded.ftl"> + }, + { + <#assign apiReflexPlatformID = ApiReflexPlatformID.HandlingunitDispatched> + "apiReflexPlatformID" : "${apiReflexPlatformID}", + "datas" : + <#include "RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched"> } <#sep>, diff --git a/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl new file mode 100644 index 0000000..d4c3d21 --- /dev/null +++ b/RFXtoRP_HsrPrepa_HUsAdded_HandlingUnitDispatched.ftl @@ -0,0 +1,23 @@ +<#include "HfRpConfig.ftl"> +<#include "ReflexUtils.ftl"> +[ +<#assign dispatched_datetime = RfxDateTimetoUTC(preparationOrder.stock_despatch_at_preparation_datetime,time_zone_offset_rfx) /> + <#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": { + "RefID": "${despatched_ipg.hd_number}", + "RefDate": { + "DateTime": "${dispatched_datetime}", + "AuthorTimeZone": "${time_zone_rfx}" + } + }, + "Payload": { } + }<#sep>, + + <#sep>, + +]