This commit is contained in:
Laurie MONTANT 2024-09-17 10:25:53 +02:00
parent 956105fc38
commit c05a4653ba
20 changed files with 113 additions and 288 deletions

7
ActorPrefix.ftl Normal file
View File

@ -0,0 +1,7 @@
<#-- --------------------------------------------------------------------------------------- -->
<#-- Prefix -->
<#-- --------------------------------------------------------------------------------------- -->
<#assign depot = "" >
<#assign carrier = "" >
<#assign supplier = "" >
<#assign consignee = "" >

View File

@ -1,6 +1,6 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -8,18 +8,10 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${stock.physical_depot_code}"
"ActorID": "${stock.physical_depot_code}" <#else>
<#else> "ActorID": "${depot}${stock.physical_depot_code}"
"ActorID": "DEP${stock.physical_depot_code}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}"
<#else>
"ActorID": "DEP${stock.physical_depot_code}"
</#if>
</#if> </#if>
}, },
"Payload": { "Payload": {
@ -29,18 +21,11 @@
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}",
"ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
</#if> </#if>
"MessageNb": ${sum_elt} "MessageNb": ${sum_elt}
} }

View File

@ -1,5 +1,6 @@
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
<#list reflexStockPicturesInterface.detailled_stock_list as stock> <#list reflexStockPicturesInterface.detailled_stock_list as stock>
{ {
@ -7,18 +8,10 @@
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"Payload": { "Payload": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}",
<#else>
"ActorID": "DEP${stock.physical_depot_code}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ActorID": "${stock.physical_depot_code}", "ActorID": "${stock.physical_depot_code}",
<#else> <#else>
"ActorID": "DEP${stock.physical_depot_code}", "ActorID": "${depot}${stock.physical_depot_code}",
</#if>
</#if> </#if>
<#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) /> <#assign generation_date = RfxDateTimetoUTC(stock.generation_date,time_zone_offset_rfx) />
@ -27,20 +20,11 @@
"DateTime": "${generation_date}", "DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}" "AuthorTimeZone": "${time_zone_rfx}"
}, },
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}", "ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else> <#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}", "ID": "${depot}${stock.physical_depot_code}-${idSnapshot}",
</#if> </#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ID": "${stock.physical_depot_code}-${idSnapshot}",
<#else>
"ID": "DEP${stock.physical_depot_code}-${idSnapshot}",
</#if>
</#if>
"Quantity": "Quantity":
{ {
"Value" : "${stock.quantity_in_base_lvs!"0"}", "Value" : "${stock.quantity_in_base_lvs!"0"}",

View File

@ -1,25 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${carrier.carrier_code?trim?json_string}" <#else>
<#else> "RefID": "${carrier}${carrier.carrier_code?trim?json_string}"
"RefID": "TRA${carrier.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "CAR${carrier.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": { "Payload": {
"Name": "${carrier.carrier_designation?json_string}", "Name": "${carrier.carrier_designation?json_string}",
"ManagedStock": false, "ManagedStock": false,

View File

@ -1,24 +1,17 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${carrier.carrier_code?trim?json_string}"
"RefID": "${carrier.carrier_code?trim?json_string}" <#else>
<#else> "RefID": "${carrier}${carrier.carrier_code?trim?json_string}"
"RefID": "TRA${carrier.carrier_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${carrier.carrier_code?trim?json_string}"
<#else>
"RefID": "CAR${carrier.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": {} "Payload": {}

View File

@ -1,24 +1,17 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code?trim?json_string}" <#else>
<#else> "RefID": "${consignee}${actor.code?trim?json_string}"
"RefID": "DES${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "CON${actor.code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": { "Payload": {

View File

@ -1,25 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code?trim?json_string}" <#else>
<#else> "RefID": "${consignee}${actor.code?trim?json_string}"
"RefID": "DES${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "CON${actor.code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": {} "Payload": {}
} }
] ]

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) /> <#assign receipt_confirmation_datetime = RfxDateTimetoUTC(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_offset_rfx) />
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc /> <#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
@ -33,35 +34,14 @@
<#if reflexMvtStockInterface.receipt_reference!=""> <#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}", "ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else> <#else>
<#if text_language_rfx="fr"> "ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
<#if uniqueness?? && uniqueness!="" >
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
<#else>
"ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
<#else>
"ExecutionflowID": "DEP${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
</#if>
</#if> </#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}", "LineID": "${reflexMvtStockInterface.receipt_line_number}",
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
</#if> </#if>
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs} "Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
<#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION", <#assign MoveType_KV = {"130":"STOCK_MOVEMENT_TYPE_PRODUCTION",
"200":"STOCK_MOVEMENT_TYPE_FIX", "200":"STOCK_MOVEMENT_TYPE_FIX",
@ -42,20 +43,11 @@
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}" "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}"
}, },
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}", <#else>
<#else> "ActorID": "${depot}${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
</#if>
</#if> </#if>
"Movement": { "Movement": {
"DateTime": { "DateTime": {

View File

@ -1,25 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code?trim?json_string}" <#else>
<#else> "RefID": "${supplier}${actor.code?trim?json_string}"
"RefID": "FOU${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "SUP${actor.code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": { "Payload": {
"Name": "${actor.designation?json_string}", "Name": "${actor.designation?json_string}",
"ManagedStock": false, "ManagedStock": false,
@ -27,10 +20,8 @@
<#-- ***Partner ID could be added here *** --> <#-- ***Partner ID could be added here *** -->
<#-- "PartnerID": "${}", --> <#-- "PartnerID": "${}", -->
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">, <#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
"Address": "Address":
{ {
<#-- if Reflex WMS address is structured --> <#-- if Reflex WMS address is structured -->

View File

@ -1,25 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${actor.code?trim?json_string}"
"RefID": "${actor.code?trim?json_string}" <#else>
<#else> "RefID": "${supplier}${actor.code?trim?json_string}"
"RefID": "FOU${actor.code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${actor.code?trim?json_string}"
<#else>
"RefID": "SUP${actor.code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": {} "Payload": {}
} }
] ]

View File

@ -1,25 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr">
<#if uniqueness?? && uniqueness!="" >
"RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "DEP${depot.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" > <#if uniqueness?? && uniqueness!="" >
"RefID": "${depot.physical_depot_code?trim?json_string}" "RefID": "${depot.physical_depot_code?trim?json_string}"
<#else> <#else>
"RefID": "DEP${depot.physical_depot_code?trim?json_string}" "RefID": "${depot}${depot.physical_depot_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": { "Payload": {
"Name": "${depot.physical_depot_designation?json_string}", "Name": "${depot.physical_depot_designation?json_string}",
"ManagedStock": true, "ManagedStock": true,

View File

@ -1,26 +1,18 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
}, },
"ID": { "ID": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "RefID": "${depot.physical_depot_code?trim?json_string}"
"RefID": "${depot.physical_depot_code?trim?json_string}" <#else>
<#else> "RefID": "${depot}${depot.physical_depot_code?trim?json_string}"
"RefID": "DEP${depot.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"RefID": "${depot.physical_depot_code?trim?json_string}"
<#else>
"RefID": "DEP${depot.physical_depot_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"Payload": {} "Payload": {}
} }
] ]

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign refIDHmap_local ={}> <#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
@ -18,20 +19,11 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
} }
<#-- Add transport grade code <#-- Add transport grade code
<#if preparationOrder.transport_grade_code!=""> <#if preparationOrder.transport_grade_code!="">

View File

@ -1,4 +1,6 @@
<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[ [
<#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.despatched_ipg_list?? && l.preparation_order_originator_reference!="") as preparation_line>
<#list preparation_line.despatched_ipg_list as despatched_ipg> <#list preparation_line.despatched_ipg_list as despatched_ipg>
@ -116,20 +118,11 @@
<#else> <#else>
"LineID": "${preparation_line.pro_line_number!0}", "LineID": "${preparation_line.pro_line_number!0}",
</#if> </#if>
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}",
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID": "${depot}${preparationOrder.physical_depot_code?trim?json_string}",
"ActorID": "${preparationOrder.physical_depot_code?trim?json_string}",
<#else>
"ActorID": "DEP${preparationOrder.physical_depot_code?trim?json_string}",
</#if>
</#if> </#if>
"Quantity": { "Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}", "LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${despatched_ipg.quantity_lvs} "Value": ${despatched_ipg.quantity_lvs}

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
<#assign refIDHmap_local ={}> <#assign refIDHmap_local ={}>
<#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line> <#list preparationOrder.preparation_line_lst?filter(l ->l.preparation_order_originator_reference!="") as preparation_line>
@ -18,21 +19,11 @@
}, },
"Payload":{ "Payload":{
"Carrier": { "Carrier": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
} }
} }
} }

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
@ -18,18 +19,10 @@
<#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" > <#if preparationOrder.load_data?? && preparationOrder.load_data.carrier_code?? && preparationOrder.load_data.carrier_code!="" >
, ,
"HUCarrier":{ "HUCarrier":{
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"TRA${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID":"${carrier}${preparationOrder.load_data.carrier_code?trim?json_string}"
"ActorID":"${preparationOrder.load_data.carrier_code?trim?json_string}"
<#else>
"ActorID":"CAR${preparationOrder.load_data.carrier_code?trim?json_string}"
</#if>
</#if> </#if>
} }

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
<#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) /> <#assign planned_final_delivery_start_datetime = RfxDateTimetoUTC(preparation_order.planned_final_delivery_start_datetime,time_zone_offset_rfx) />
@ -26,20 +27,11 @@
"CarrierService":"${preparation_order.transport_grade_code?trim?json_string}", "CarrierService":"${preparation_order.transport_grade_code?trim?json_string}",
</#if> --> </#if> -->
"ShipFrom": { "ShipFrom": {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}"
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID": "${depot}${preparation_order.physical_depot_code?trim?json_string}"
"ActorID": "${preparation_order.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${preparation_order.physical_depot_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"ShipFromAcked": true, "ShipFromAcked": true,
"ShipTo": { "ShipTo": {
@ -61,18 +53,10 @@
preparation_order.address.territorial_division_code == "" && preparation_order.address.territorial_division_code == "" &&
preparation_order.address.postal_code == "" && preparation_order.address.postal_code == "" &&
preparation_order.address.iso_country_code == ""> preparation_order.address.iso_country_code == "">
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${preparation_order.end_consignee_code}"
"ActorID": "${preparation_order.end_consignee_code}"
<#else>
"ActorID": "DES${preparation_order.end_consignee_code}"
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "ActorID": "${consignee}${preparation_order.end_consignee_code}"
"ActorID": "${preparation_order.end_consignee_code}"
<#else>
"ActorID": "CON${preparation_order.end_consignee_code}"
</#if>
</#if> </#if>
<#else> <#else>
"Actor": "Actor":

View File

@ -1,5 +1,6 @@
<#include "HfRpConfig.ftl"> <#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl"> <#include "ReflexUtils.ftl">
<#include "ActorPrefix.ftl">
[ [
{ {
<#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) /> <#assign receipt_datetime = RfxDateTimetoUTC(receipt.receipt_datetime,time_zone_offset_rfx) />
@ -29,40 +30,22 @@
}, },
"ShipTo" : "ShipTo" :
{ {
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "ActorID": "${receipt.physical_depot_code?trim?json_string}"
"ActorID": "${receipt.physical_depot_code?trim?json_string}" <#else>
<#else> "ActorID": "${depot}${receipt.physical_depot_code?trim?json_string}"
"ActorID": "DEP${receipt.physical_depot_code?trim?json_string}"
</#if>
<#else>
<#if uniqueness?? && uniqueness!="" >
"ActorID": "${receipt.physical_depot_code?trim?json_string}"
<#else>
"ActorID": "DEP${receipt.physical_depot_code?trim?json_string}"
</#if>
</#if> </#if>
}, },
"ShipToAcked": true, "ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != ""> <#if receipt.carrier_informations.carrier_code != "">
<#if text_language_rfx="fr"> <#if uniqueness?? && uniqueness!="" >
<#if uniqueness?? && uniqueness!="" > "Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#else>
"Carrier" : {"ActorID": "TRA${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
<#else> <#else>
<#if uniqueness?? && uniqueness!="" > "Carrier" : {"ActorID": "${carrier}${receipt.carrier_informations.carrier_code?trim?json_string}"},
"Carrier" : {"ActorID": "${receipt.carrier_informations.carrier_code?trim?json_string}"},
<#else>
"Carrier" : {"ActorID": "CAR${receipt.carrier_informations.carrier_code?trim?json_string}"},
</#if>
</#if> </#if>
</#if> </#if>
<#if receipt.line_list??> <#if receipt.line_list??>
"Lines" : [ "Lines" : [
<#list receipt.line_list as line> <#list receipt.line_list as line>

View File

@ -17,14 +17,14 @@
<#function splitEmailsIntoArray emails > <#function splitEmailsIntoArray emails >
<#local str = "["> <#local str = "[">
<#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email> <#list emails?split(";|,| |à|/","r")?filter(l -> l != "") as email>
<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> <#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")>
<#if str != "["> <#if str != "[">
<#local str += ","> <#local str += ",">
</#if> </#if>
<#local str += "\""> <#local str += "\"">
<#local str += email> <#local str += email>
<#local str += "\""> <#local str += "\"">
</#if> </#if>
</#list> </#list>
<#local str += "]"> <#local str += "]">
<#return (str)> <#return (str)>