From bc61336671408822e725a91166720535e0f61d56 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 8 Jun 2026 14:32:35 +0200 Subject: [PATCH] SCPN1-10878 --- RFXtoRP_HsaIpgMove_GoodsReceived.ftl | 10 +++++++--- RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl | 6 +++++- RPtoRFX_PrepOrder.ftl | 8 ++++---- RPtoRFX_PrepOrder_DefaultHeaderData.ftl | 4 ---- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl index c0d861b..ba4a89c 100644 --- a/RFXtoRP_HsaIpgMove_GoodsReceived.ftl +++ b/RFXtoRP_HsaIpgMove_GoodsReceived.ftl @@ -29,7 +29,7 @@ <#-- Goods received Segmentation Keys inclusion --> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> }, - <#if reflexMvtStockInterface.ipg_move_type?? & reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement --> + <#if reflexMvtStockInterface.ipg_move_type?? && reflexMvtStockInterface.ipg_move_type=="120"> <#-- if it is a transfer-type movement --> <#if reflexMvtStockInterface.origin_order_line_reference?? && reflexMvtStockInterface.origin_order_line_reference!=""> "ExecutionflowID": "${reflexMvtStockInterface.original_receipt_physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}", "OrderID": "${reflexMvtStockInterface.origin_order_line_reference?trim?json_string}", @@ -51,10 +51,14 @@ "OrderID": "R${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.originator_code}${reflexMvtStockInterface.receipt_year_number}${reflexMvtStockInterface.receipt_number}", - <#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0> + <#if reflexMvtStockInterface.origin_order_line_number_reference?? && reflexMvtStockInterface.origin_order_line_number_reference!=0 && reflexMvtStockInterface.ipg_move_type=="120"> "LineID": "${reflexMvtStockInterface.origin_order_line_number_reference}", <#else> - "LineID": "${reflexMvtStockInterface.receipt_line_number}", + <#if reflexMvtStockInterface.line_number_reference?? && reflexMvtStockInterface.line_number_reference!=0> + "LineID": "${reflexMvtStockInterface.line_number_reference}", + <#else> + "LineID": "${reflexMvtStockInterface.receipt_line_number}", + "ActorID": "${RFXtoRPprefixDepot(reflexMvtStockInterface.physical_depot_code?trim?json_string)}", "Quantity": { diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index d340648..05e7ace 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -79,7 +79,11 @@ "Lines" : [ <#list receipt.line_list as line> { - "LineID": "${line.receipt_line_number}", + <#if line.receipt_reference_line_no?? && line.receipt_reference_line_no!=0> + "LineID": "${line.receipt_reference_line_no}", + <#else> + "LineID": "${line.receipt_line_number}", + <#-- Line Metadata inclusion --> <#include "RFXtoRP_HsrReceiptList_ExecutionflowDetected_LineMetadata.ftl">, "RequestedContent": diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index aa1e6ec..cd22c80 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -37,15 +37,15 @@ "requested_delivery_start_datetime": "${DateTimeUTCtoRfxLocale(.now?iso_utc?string,time_zone_rfx)}", "requested_delivery_date_type": "${requested_delivery_date_type}", - "consolidated_delivery": "${consolidated_delivery_flag}", + "consolidated_delivery": "false", "pick_sequence_code": "${pick_sequence_code}", "intermediate_consignee": "false", - "protected": "${protected_flag}", - "automatic_generation": "${automatic_generation_flag}", + "protected": "false", + "automatic_generation": "true", "deactivate": "false", "optional_attributes": { <#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl"> - "apt_with_end_consignee": "${apt_with_end_consignee_flag}", + "apt_with_end_consignee": "false", "apt_with_intermediate": "false", "load_grouping": "${load_grouping}" } diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index bed878f..f93f19d 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -18,11 +18,7 @@ <#assign originator_code = ""/> <#assign preparation_type_code = "010"/> <#assign requested_delivery_date_type = "010"/> -<#assign consolidated_delivery_flag ="false"/> <#assign pick_sequence_code = ""/> -<#assign protected_flag ="false"/> -<#assign automatic_generation_flag ="false"/> -<#assign apt_with_end_consignee_flag="false"/> <#-- A supprimer si utilisation de la table de correspondance--> <#--To be deleted if using the correspondence table-->