diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl index 7070611..cf838fe 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl @@ -80,22 +80,24 @@ } <#if preparation_line.despatched_cartons_list?? > - , - "Information": { - "ContainerType": "${preparation_line.despatched_cartons_list.carton_type_code}", - "Length": { - "Unit": "${length_unit_rfx}", - "Value": "${preparation_line.despatched_cartons_list.overall_depth}" - }, - "Weight": { - "Unit": "${weight_unit_rfx}", - "Value": "${preparation_line.despatched_cartons_list.carton_gross_weight}" - }, - "Width": { - "Unit": "${length_unit_rfx}", - "Value": "${preparation_line.despatched_cartons_list.overall_width}" - } - } + <#if despatched_ipg.carton_number == preparation_line.despatched_cartons_list.carton_number > + , + "Information": { + "ContainerType": "${preparation_line.despatched_cartons_list[0].carton_type_code}", + "Length": { + "Unit": "${length_unit_rfx}", + "Value": "${preparation_line.despatched_cartons_list[0].overall_depth}" + }, + "Weight": { + "Unit": "${weight_unit_rfx}", + "Value": "${preparation_line.despatched_cartons_list[0].carton_gross_weight}" + }, + "Width": { + "Unit": "${length_unit_rfx}", + "Value": "${preparation_line.despatched_cartons_list[0].overall_width}" + } + } + } ]