From e03da2db8da1bf85f2792e6996d2a26346b3671e Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Tue, 13 Jan 2026 18:01:25 +0100 Subject: [PATCH] hsrAntRec (cherry picked from commit 4496a4a2ce4de3653a264b25bcab2bf1b0ee2174) --- RFXtoRP_HliAntRecLr.ftl | 49 +++++++++++++++++++++++++++++++++++++++ RFXtoRP_HsrAntRec.ftl | 51 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 RFXtoRP_HliAntRecLr.ftl create mode 100644 RFXtoRP_HsrAntRec.ftl diff --git a/RFXtoRP_HliAntRecLr.ftl b/RFXtoRP_HliAntRecLr.ftl new file mode 100644 index 0000000..3833300 --- /dev/null +++ b/RFXtoRP_HliAntRecLr.ftl @@ -0,0 +1,49 @@ +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#-- *********************************************** Action = CREATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#stop create anticipated receipt line> + } + ] + <#break> + <#case "U"> + <#-- *********************************************** Action = UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#stop update anticipated receipt line> + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceiptLine = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#stop delete anticipated receipt line> + } + ] + <#break> + + + <#default> + <#stop > + + diff --git a/RFXtoRP_HsrAntRec.ftl b/RFXtoRP_HsrAntRec.ftl new file mode 100644 index 0000000..10c2bb3 --- /dev/null +++ b/RFXtoRP_HsrAntRec.ftl @@ -0,0 +1,51 @@ +<#-- **** input parameters ***** --> +<#-- input : message HARDIS WMS --> +<#-- project : projectId in HARDIS SC NETWORK --> +<#-- organisation : organisationtId in HARDIS SC NETWORK --> + +<#assign cloudEventMsg = JsonUtil.jsonToMap(input)> +<#assign projectRP = project> +<#assign organisationRP = organisation> + +<#assign aDateTime = .now> + +<#switch cloudEventMsg.action> + <#case "C"> + <#-- *********************************************** Action = CREATE ******************** --> + + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#stop creation anticipated receipt> + } + ] + <#break> + <#case "U"> + <#-- *********************************************** Action = UPDATE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> + [ + { + <#stop update anticipated receipt> + } + ] + <#break> + + <#case "D"> + <#-- *********************************************** Action = DELETE ******************** --> + <#assign dataRfx = JsonUtil.decodeBase64(cloudEventMsg.data) /> + <#assign ancReceipt = JsonUtil.jsonToMap(dataRfx)> + [ + { + + <#stop delete anticipated receipt> + } + ] + <#break> + + + <#default> + <#stop > + +