diff --git a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl index 926bc9b..6ad9c0b 100644 --- a/RFXtoRP_HsrPrepa_GoodsPrepared.ftl +++ b/RFXtoRP_HsrPrepa_GoodsPrepared.ftl @@ -33,29 +33,28 @@ "ItemID": "${preparation_line.item_code}", "LVBranchID": "${preparation_line.item_lv_code}", <#if (despatched_ipg.ipg_manufacture_date?length != 0) && (despatched_ipg.ipg_manufacture_date?starts_with("00") == false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_manufacture_date) /> --> <#assign priority_date = despatched_ipg.ipg_manufacture_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_receipt_date?length != 0) && (despatched_ipg.ipg_receipt_date?starts_with("00")== false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_receipt_date) /> --> <#assign priority_date = despatched_ipg.ipg_receipt_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_best_before_date?length != 0) && (despatched_ipg.ipg_best_before_date?starts_with("00")== false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_best_before_date) /> --> <#assign priority_date = despatched_ipg.ipg_best_before_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_sell_by_date?length != 0) && (despatched_ipg.ipg_sell_by_date?starts_with("00")== false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_sell_by_date) /> --> - <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> + <#assign priority_date = despatched_ipg.ipg_sell_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", <#else> <#if (despatched_ipg.ipg_use_by_date?length != 0) && (despatched_ipg.ipg_use_by_date?starts_with("00")== false)> - <#-- <#assign priority_date = JsonUtil.createUTCDateTime(despatched_ipg.ipg_use_by_date) /> --> <#assign priority_date = despatched_ipg.ipg_use_by_date?datetime(rfx_date_format_default)?iso_utc /> "PriorityDate": "${priority_date}", + <#else> + <#if (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": "${priority_date}", <#else> "PriorityDate": "error_date", diff --git a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl index 89d07dc..7055d66 100644 --- a/RPtoRFX_PrepOrder_DefaultHeaderData.ftl +++ b/RPtoRFX_PrepOrder_DefaultHeaderData.ftl @@ -2,10 +2,18 @@ <#-- How to use MD Header map Example : - <#assign pick_sequence_code = Header_MetaData_Map["OrderType"]!""/> + <#assign pick_sequence_code = Header_MetaData_Map["OrderType"].String!""/> + + If your MD is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String --> + <#assign activity_code = ""/> <#assign originator_code = ""/> <#assign preparation_type_code = ""/> diff --git a/RPtoRFX_PrepOrder_DefaultLineData.ftl b/RPtoRFX_PrepOrder_DefaultLineData.ftl index 1ff229a..eb0e902 100644 --- a/RPtoRFX_PrepOrder_DefaultLineData.ftl +++ b/RPtoRFX_PrepOrder_DefaultLineData.ftl @@ -3,7 +3,14 @@ <#-- How to use MD or SK map Example : - <#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"]!""/> + <#assign owner_code_to_prepare = SegmentationKeys_Map["Owner"].String!""/> + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String --> <#assign owner_code_to_prepare = SegmentationKeys_Map["myOwner"]!""/> diff --git a/RPtoRFX_Receipt_DefaultHeaderData.ftl b/RPtoRFX_Receipt_DefaultHeaderData.ftl index e510b3c..5e4bc78 100644 --- a/RPtoRFX_Receipt_DefaultHeaderData.ftl +++ b/RPtoRFX_Receipt_DefaultHeaderData.ftl @@ -2,7 +2,14 @@ <#-- How to use MD Header map Example : - <#assign receipt_type = Header_MetaData_Map["OrderType"]!""/> + <#assign receipt_type = Header_MetaData_Map["OrderType"].String!""/> + + If your MD is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String --> <#assign activity_code = ""/> diff --git a/RPtoRFX_Receipt_DefaultLineData.ftl b/RPtoRFX_Receipt_DefaultLineData.ftl index 7ed934d..112da79 100644 --- a/RPtoRFX_Receipt_DefaultLineData.ftl +++ b/RPtoRFX_Receipt_DefaultLineData.ftl @@ -3,7 +3,14 @@ <#-- How to use MD or SK map Example : - <#assign owner_code = SegmentationKeys_Map["Owner"]!""/> + <#assign owner_code = SegmentationKeys_Map["Owner"].String!""/> + + If your SK is : + Boolean : .Bool + Float : .Float + Timestamp : .Timestamp.DateTime or .Timestamp.AuthorTimeZone + Int : .Int + String : .String --> diff --git a/ReflexUtils.ftl b/ReflexUtils.ftl index d1e2569..bc58619 100644 --- a/ReflexUtils.ftl +++ b/ReflexUtils.ftl @@ -15,12 +15,14 @@ <#function splitEmailsIntoArray emails > <#local str = "["> <#list emails?split(';|,| ',"r")?filter(l -> l != "") as email> +<#if email?matches("^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$")> <#if str != "["> <#local str += ","> <#local str += "\""> <#local str += email> <#local str += "\""> + <#local str += "]"> <#return (str)>