reflex-wms-connector/RFXtoRP_HsaIpgMove_GoodsReceived.ftl
2024-05-17 11:00:25 +02:00

49 lines
1.9 KiB
Java

<#include "HfRpConfig.ftl">
<#include "ReflexUtils.ftl">
[
<#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 />
{
"Header": {
"ProjectID": "${projectRP}"
},
"ID": {
"RefID": "${reflexMvtStockInterface.hd_number?trim?json_string}"
},
"Payload": {
"ReceivedContents" :[
{
"DateTime": {
"DateTime": "${receipt_confirmation_datetime}",
"AuthorTimeZone": "${time_zone_rfx}"
},
"Goods": {
"ItemID": "${reflexMvtStockInterface.item_code?trim?json_string}",
"LVBranchID": "${reflexMvtStockInterface.lv_code?json_string}",
<#if (priority_date!="") && (priority_date?starts_with("00")== false) >
"PriorityDate": "${priority_date}",
<#else>
"PriorityDate": "1970-01-01T00:00:00Z",
</#if>
<#-- Goods received Segmentation Keys inclusion -->
<#include "RFXtoRP_HsaIpgMove_GoodsReceived_SegmentationKeys.ftl">
},
<#if reflexMvtStockInterface.receipt_reference!="">
"ExecutionflowID": "${reflexMvtStockInterface.receipt_reference?trim?json_string}",
<#else>
"ExecutionflowID": "${reflexMvtStockInterface.physical_depot_code}${reflexMvtStockInterface.activity_code}${reflexMvtStockInterface.ipg_move_year_number}${reflexMvtStockInterface.extended_ipg_move_number}",
</#if>
"LineID": "${reflexMvtStockInterface.receipt_line_number}",
"ActorID": "${reflexMvtStockInterface.physical_depot_code?trim?json_string}",
"Quantity": {
"LVID": "${quantity_in_base_lv_RP_Cst}",
"Value": ${reflexMvtStockInterface.ipg_move_quantity_in_base_lvs}
}
}
]
}
}
]