Compare commits

..

6 Commits

Author SHA1 Message Date
5897da576e Release 1.2.64+3 2026-11-05 14:35:24 +01:00
85cb423a1c Merge branch 'release1.2-SCPN1-11488' into 'release/1.2'
release1.2-SCPN1-11488 into release/1.2

See merge request r-d-technique/tiers/reflex-wms-connector!328
2026-11-05 12:54:38 +00:00
ed8ab4e1c4 release1.2-SCPN1-11488 into release/1.2 2026-11-05 12:54:38 +00:00
d612f5c8a5 Release 1.2.64+2 2026-10-23 12:03:52 +02:00
8a1d1a02ab Merge branch 'SCPN1-11443_1.2' into 'release/1.2'
SCPN1-11443_1.2

See merge request r-d-technique/tiers/reflex-wms-connector!318
2026-10-23 09:49:22 +00:00
a972733d88 SCPN1-11443
(cherry picked from commit 16ed4678fb84fc300b0a0be470860505dbc283f8)

Co-authored-by: Laurie Montant <laurie.montant@hardis-group.com>
2026-10-22 15:06:48 +00:00
10 changed files with 77 additions and 79 deletions

View File

@@ -26,13 +26,7 @@
"Goods": { "Goods": {
"ItemID": "${stock.item_code?trim?json_string}", "ItemID": "${stock.item_code?trim?json_string}",
"LVBranchID": "${stock.item_logistical_variant_code}", "LVBranchID": "${stock.item_logistical_variant_code}",
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(stock.priority_date,rfx_date_format_default)}",
<#if (stock.priority_date!="") && (stock.priority_date?starts_with("00")== false) >
"PriorityDate" : "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusion --> <#-- Segmentation keys inclusion -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl"> <#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
} }

View File

@@ -34,14 +34,12 @@
"ItemID": "${line.item_code?trim?json_string!"0"}", "ItemID": "${line.item_code?trim?json_string!"0"}",
"LVBranchID": "${line.item_lv_code?json_string!"0"}", "LVBranchID": "${line.item_lv_code?json_string!"0"}",
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(line.line_without_detail.priority_date,rfx_date_format_default)}",
"PriorityDate": "${line_without_detail_priority_date}",
<#else> <#else>
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(line.line_detail[0].priority_date,rfx_date_format_default)}",
"PriorityDate": "${line_detail_priority_date}",
<#else> <#else>
"PriorityDate": "1970-01-01T00:00:00Z", "PriorityDate": "${DEFAULT_TIMESTAMP}",
</#if> </#if>
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->

View File

@@ -3,7 +3,6 @@
<#include "ActorPrefix.ftl"> <#include "ActorPrefix.ftl">
[ [
<#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) /> <#assign receipt_confirmation_datetime = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
<#assign priority_date = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
{ {
"Header": { "Header": {
"ProjectID": "${projectRP}" "ProjectID": "${projectRP}"
@@ -22,11 +21,7 @@
"Goods": { "Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}", "LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) > "PriorityDate": "${RfxDatetoTimestampUTC(reflexMvtStockInterface.ipg_priority_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Goods received Segmentation Keys inclusion --> <#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl"> <#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
}, },

View File

@@ -22,7 +22,6 @@
"520":"STOCK_MOVEMENT_TYPE_OUTBOUND" "520":"STOCK_MOVEMENT_TYPE_OUTBOUND"
}> }>
<#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) /> <#assign generation_date = RfxDateTimetoUTCWithTimezone(reflexMvtStockInterface.ipg_move_creation_datetime,time_zone_rfx) />
<#assign ipg_priority_datetime = reflexMvtStockInterface.ipg_priority_date?datetime(rfx_date_format_default)?iso_utc />
[ [
{ {
"Header": { "Header": {
@@ -31,11 +30,7 @@
"Payload": { "Payload": {
"Goods": { "Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}", "ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
<#if (reflexMvtStockInterface.ipg_priority_date!="") && (reflexMvtStockInterface.ipg_priority_date?starts_with("00")== false) > "PriorityDate": "${RfxDatetoTimestampUTC(reflexMvtStockInterface.ipg_priority_date,rfx_date_format_default)}",
"PriorityDate": "${ipg_priority_datetime}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Segmentation keys inclusions --> <#-- Segmentation keys inclusions -->
<#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">, <#include "RFXtoRP_HsaIpgMove_StockMoved_SegmentationKeys.ftl">,

View File

@@ -82,31 +82,25 @@
"ItemID": "${preparation_line.item_code?trim?json_string}", "ItemID": "${preparation_line.item_code?trim?json_string}",
"LVBranchID": "${preparation_line.item_lv_code?json_string}", "LVBranchID": "${preparation_line.item_lv_code?json_string}",
<#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> <#if despatched_ipg.ipg_use_by_date?? && despatched_ipg.ipg_use_by_date?length != 0 && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(despatched_ipg.ipg_use_by_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> <#if despatched_ipg.ipg_best_before_date?? && despatched_ipg.ipg_best_before_date?length != 0 && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(despatched_ipg.ipg_best_before_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> <#if despatched_ipg.ipg_sell_by_date?? && (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(despatched_ipg.ipg_sell_by_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> <#if despatched_ipg.ipg_manufacture_date?? && (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(despatched_ipg.ipg_manufacture_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
<#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> <#if despatched_ipg.ipg_receipt_date?? && (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)>
<#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(despatched_ipg.ipg_receipt_date,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
<#if (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)> <#if preparationOrder.stock_despatch_at_preparation_datetime?? && (preparationOrder.stock_despatch_at_preparation_datetime?length != 0) && (preparationOrder.stock_despatch_at_preparation_datetime?starts_with("00")== false)>
<#assign priority_date = preparationOrder.stock_despatch_at_preparation_datetime?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(preparationOrder.stock_despatch_at_preparation_datetime,rfx_date_format_default)}",
"PriorityDate": "${priority_date}",
<#else> <#else>
"PriorityDate": "1970-01-01T00:00:00Z", "PriorityDate": "${DEFAULT_TIMESTAMP}",
</#if> </#if>
</#if> </#if>
</#if> </#if>

View File

@@ -67,7 +67,6 @@
"ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}" "ActorID": "${RFXtoRPprefixDepot(receipt.physical_depot_code?trim?json_string)}"
}, },
"ShipToAcked": true, "ShipToAcked": true,
<#if receipt.carrier_informations.carrier_code != ""> <#if receipt.carrier_informations.carrier_code != "">
"Carrier": "Carrier":
{ {
@@ -93,14 +92,12 @@
"ItemID": "${line.item_code?trim?json_string!"0"}", "ItemID": "${line.item_code?trim?json_string!"0"}",
"LVBranchID": "${line.item_lv_code?json_string!"0"}", "LVBranchID": "${line.item_lv_code?json_string!"0"}",
<#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)> <#if (line.line_without_detail?? && line.line_without_detail.priority_date?length != 0) && (line.line_without_detail.priority_date?starts_with("00") == false)>
<#assign line_without_detail_priority_date = line.line_without_detail.priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(line.line_without_detail.priority_date,rfx_date_format_default)}",
"PriorityDate": "${line_without_detail_priority_date}",
<#else> <#else>
<#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)> <#if (line.line_detail?? && line.line_detail?size == 1 && line.line_detail[0].priority_date?length != 0) && (line.line_detail[0].priority_date?starts_with("00") == false)>
<#assign line_detail_priority_date = line.line_detail[0].priority_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${RfxDatetoTimestampUTC(line.line_detail[0].priority_date,rfx_date_format_default)}",
"PriorityDate": "${line_detail_priority_date}",
<#else> <#else>
"PriorityDate": "1970-01-01T00:00:00Z", "PriorityDate": "${DEFAULT_TIMESTAMP}",
</#if> </#if>
</#if> </#if>
<#-- Segmentation Keys inclusion --> <#-- Segmentation Keys inclusion -->

View File

@@ -41,7 +41,7 @@
"pick_sequence_code": "${pick_sequence_code}", "pick_sequence_code": "${pick_sequence_code}",
"intermediate_consignee": "false", "intermediate_consignee": "false",
"protected": "false", "protected": "false",
"automatic_generation": "true", "automatic_generation": "${automatic_generation_flag}",
"deactivate": "false", "deactivate": "false",
"optional_attributes": { "optional_attributes": {
<#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl"> <#include "RPtoRFX_PrepOrder_OptionalAttributes.ftl">

View File

@@ -19,6 +19,7 @@
<#assign preparation_type_code = ""/> <#assign preparation_type_code = ""/>
<#assign requested_delivery_date_type = ""/> <#assign requested_delivery_date_type = ""/>
<#assign pick_sequence_code = ""/> <#assign pick_sequence_code = ""/>
<#assign automatic_generation_flag = ""/>
<#-- A supprimer si utilisation de la table de correspondance--> <#-- A supprimer si utilisation de la table de correspondance-->
<#--To be deleted if using the correspondence table--> <#--To be deleted if using the correspondence table-->

View File

@@ -1,6 +1,6 @@
<#-- --------------------------------------------------------------------------------------- --> <#-- -------------------------------------------------------------------------------------------- -->
<#-- Concat reflex timestamp with reflex time zone and format this date in ISO UTC format --> <#-- Concat HARDIS WMS timestamp with HARDIS WMS time zone and format this date in ISO UTC format -->
<#-- --------------------------------------------------------------------------------------- --> <#-- -------------------------------------------------------------------------------------------- -->
<#function RfxDateTimetoUTC rfxdatetime offset > <#function RfxDateTimetoUTC rfxdatetime offset >
<#return ((rfxdatetime + offset)?datetime.iso?iso_utc)> <#return ((rfxdatetime + offset)?datetime.iso?iso_utc)>
</#function> </#function>
@@ -25,9 +25,8 @@
<#return (endDate?long - startDate?long) / 1000 > <#return (endDate?long - startDate?long) / 1000 >
</#function> </#function>
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
<#-- Split email reflex into json array string --> <#-- Split email HARDIS WMS into json array string -->
<#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" --> <#-- Example : splitemail "john.doe@hardis-group.com,; name@hardis-group.com" -->
<#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" --> <#-- return "["john.doe@hardis-group.com","name@hardis-group.com"]" -->
<#-- --------------------------------------------------------------------------------------- --> <#-- --------------------------------------------------------------------------------------- -->
@@ -46,3 +45,28 @@
<#local str += "]"> <#local str += "]">
<#return (str)> <#return (str)>
</#function> </#function>
<#-- --------------------------------------------------------------------------------------- -->
<#-- validate and convert HARDIS WMS date field into UTC timestamp -->
<#-- Example : RfxDatetoTimestampUTC("2025-11-00", "yyyy-MM-dd) -->
<#-- return "2025-11-00T00:00:00Z" -->
<#-- --------------------------------------------------------------------------------------- -->
<#-- Default timestamp to use in case of invalid date -->
<#assign DEFAULT_TIMESTAMP = "1970-01-01T00:00:00Z">
<#function RfxDatetoTimestampUTC rfxdate rfx_date_format >
<#local fallback = DEFAULT_TIMESTAMP>
<#if !rfxdate?matches("[0-9]*-[0-9]*-[0-9]*")>
<#return fallback>
</#if>
<#attempt>
<#if rfxdate?? && rfxdate == rfxdate?date(rfx_date_format)?string(rfx_date_format) >
<#return rfxdate?datetime(rfx_date_format)?iso_utc>,
<#else>
<#return fallback>
</#if>
<#recover>
<#return fallback>
</#attempt>
</#function>

View File

@@ -1 +1 @@
1.2.64+1 1.2.64+3