From 446d13127af9cdcda8acbf40eb6479c13a4b9541 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Mon, 4 May 2026 16:52:06 +0200 Subject: [PATCH] SCPN1-10706 --- ActorPrefix.ftl | 24 ++++++++++++++++++++---- RPtoRFX_PrepOrder.ftl | 14 ++------------ 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/ActorPrefix.ftl b/ActorPrefix.ftl index e12b76d..b22886b 100644 --- a/ActorPrefix.ftl +++ b/ActorPrefix.ftl @@ -37,7 +37,11 @@ <#if uniqueness> <#local depot = actor> <#else> - <#local depot = actor[4..]> + <#if actor?length le 4> + <#local depot = actor[4..]> + <#else> + <#local depot = actor> + <#return (depot)> @@ -78,7 +82,11 @@ <#if uniqueness> <#local supplier = actor> <#else> - <#local supplier = actor[4..]> + <#if actor?length le 4> + <#local supplier = actor[4..]> + <#else> + <#local supplier = actor> + <#return (supplier)> @@ -117,7 +125,11 @@ <#if uniqueness> <#local carrier = actor> <#else> - <#local carrier = actor[4..]> + <#if actor?length le 4> + <#local carrier = actor[4..]> + <#else> + <#local carrier = actor> + <#return (carrier)> @@ -156,7 +168,11 @@ <#if uniqueness> <#local consignee = actor> <#else> - <#local consignee = actor[4..]> + <#if actor?length le 4> + <#local consignee = actor[4..]> + <#else> + <#local consignee = actor> + <#return (consignee)> \ No newline at end of file diff --git a/RPtoRFX_PrepOrder.ftl b/RPtoRFX_PrepOrder.ftl index 9c2d2c3..aa1e6ec 100644 --- a/RPtoRFX_PrepOrder.ftl +++ b/RPtoRFX_PrepOrder.ftl @@ -11,11 +11,7 @@ <#-- If you are using unreferenced actors, you will need to create a "VIZ" consignee in HARDIS WMS to use this feature --> <#assign defaultactor ="VIZ"> <#if executionflow.ShipTo.ActorID?? && executionflow.ShipTo.ActorID!=""> - <#if (executionflow.ShipTo.ActorID?length gt 4) > - <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" > - <#else> - <#assign actorID = "${executionflow.ShipTo.ActorID}" > - + <#assign actorID = "${RPtoRFXprefixConsignee(executionflow.ShipTo.ActorID)}" > <#else> <#assign actorID = defaultactor > @@ -26,13 +22,7 @@ "method" : "POST", "uri_substitutions": { "activity_code": "${activity_code}", - <#if executionflow.ShipFrom.ActorID?? && executionflow.ShipFrom.ActorID!=""> - <#if (executionflow.ShipFrom.ActorID?length gt 4) > - "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}", - <#else> - "physical_depot_code": "${executionflow.ShipFrom.ActorID}", - - + "physical_depot_code": "${RPtoRFXprefixDepot(executionflow.ShipFrom.ActorID)}", "originator_code": "${originator_code}" }, "payload" :