reflex-wms-connector/RFXtoRP_HfDtlStockLs_StockSnapshotted.ftl
2025-03-07 14:14:28 +01:00

45 lines
1.4 KiB
Java

<#include "ReflexUtils.ftl">
<#include "HfRpConfig.ftl">
<#include "ActorPrefix.ftl">
[
<#list reflexStockPicturesInterface.detailled_stock_list as stock>
{
"Header": {
"ProjectID": "${projectRP}"
},
"Payload": {
"ActorID": "${RFXtoRPprefixDepot(stock.physical_depot_code)}",
<#assign generation_date = RfxDateTimetoUTCWithTimezone(stock.generation_date,time_zone_rfx) />
"Snapshot": {
"DateTime": {
"DateTime": "${generation_date}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"ID": "${stock.physical_depot_code}-${idSnapshot}",
"Quantity":
{
"Value" : "${stock.quantity_in_base_lvs!"0"}",
"LVID": "${quantity_in_base_lv_RP_Cst}"
}
},
"Goods": {
"ItemID": "${stock.item_code?trim?json_string}",
"LVBranchID": "${stock.item_logistical_variant_code}",
<#assign priority_date = stock.priority_date?datetime(rfx_date_format_default)?iso_utc />
<#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 -->
<#include "RFXtoRP_HfDtlStockLs_StockSnapshotted_SegmentationKeys.ftl">
}
}
}<#sep>,</#sep>
</#list>
]