You've already forked reflex-wms-connector
48 lines
1.9 KiB
Java
48 lines
1.9 KiB
Java
<#include "ReflexUtils.ftl">
|
|
<#include "HfRpConfig.ftl">
|
|
<#include "ActorPrefix.ftl">
|
|
|
|
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
<#if AncReceipt.anticipated_receipt_reference?? && AncReceipt.anticipated_receipt_reference!="">
|
|
"RefID": "${AncReceipt.anticipated_receipt_reference?json_string}"
|
|
<#else>
|
|
"RefID": "AR-${AncReceipt.physical_depot_code?trim?json_string}${AncReceipt.activity_code?trim?json_string}${AncReceipt.originator_code?trim?json_string}${AncReceipt.anticipated_receipt_year?json_string}${AncReceipt.anticipated_receipt_number?json_string}"
|
|
</#if>
|
|
},
|
|
"Payload": {
|
|
"Lines": [
|
|
<#-- Lines iteration -->
|
|
<#list AncReceipt.line_list?filter(l -> l??) as line>
|
|
{
|
|
<#if line.anticipated_receipt_reference_line_no?? && line.anticipated_receipt_reference_line_no!=0>
|
|
"LineID": "${line.anticipated_receipt_reference_line_no}",
|
|
<#else>
|
|
"LineID": "${line.anticipated_receipt_line_number}",
|
|
</#if>
|
|
<#-- Line Metadata inclusion -->
|
|
<#include "RFXtoRP_HsrAntRec_Created_LineMetadata.ftl">,
|
|
"RequestedContent":{
|
|
"Goods":{
|
|
"ItemID":"${line.item_code?trim?json_string!"0"}",
|
|
"LVBranchID":"${line.item_lv_code?trim?json_string!"0"}",
|
|
<#-- Segmentation Keys inclusion -->
|
|
<#include "RFXtoRP_HsrAntRec_Created_SegmentationKeys.ftl">
|
|
},
|
|
"Quantity" :
|
|
{
|
|
"LVID": "${quantity_in_base_lv_RP_Cst}",
|
|
"Value": ${line.planned_quantity_in_base_lv!0}
|
|
}
|
|
}
|
|
}<#sep>,</#sep>
|
|
</#list>
|
|
]
|
|
}
|
|
}
|
|
]
|