From 3d9ec5b813fe301e45e6f8feb25fb8b2de33ba36 Mon Sep 17 00:00:00 2001 From: Laurie Montant Date: Wed, 22 Nov 2023 14:59:25 +0100 Subject: [PATCH] Modif FTL 2211231459 --- RFXtoRP_HsaCons_ActorCreated.ftl | 18 ++++++++++-------- RFXtoRP_HsaSup_ActorCreated.ftl | 18 +++++++++++------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/RFXtoRP_HsaCons_ActorCreated.ftl b/RFXtoRP_HsaCons_ActorCreated.ftl index 8f09d9c..06bc6c2 100644 --- a/RFXtoRP_HsaCons_ActorCreated.ftl +++ b/RFXtoRP_HsaCons_ActorCreated.ftl @@ -35,18 +35,20 @@ <#-- if Reflex WMS is not structured --> <#else> + <#if actor.address?? > - "Name": "${actor.address.company_name?json_string}", - "StreetAddressOne" : "${actor.address.address_1?json_string}", - "StreetAddressTwo" : "${actor.address.address_2?json_string}", - "StreetAddressThree" : "${actor.address.address_3?json_string}" - + "Name": "${actor.address.company_name?json_string}", + "StreetAddressOne" : "${actor.address.address_1?json_string}", + "StreetAddressTwo" : "${actor.address.address_2?json_string}", + "StreetAddressThree" : "${actor.address.address_3?json_string}" + }, - - "Phones": ["${actor.address.telephone?json_string}", + <#if actor.address?? > + "Phones": ["${actor.address.telephone?json_string}", "${actor.address.other_number?json_string}" - ], + ], + "Typology": "TYPOLOGY_UNKNOWN" } } diff --git a/RFXtoRP_HsaSup_ActorCreated.ftl b/RFXtoRP_HsaSup_ActorCreated.ftl index a4e5d12..5a219ad 100644 --- a/RFXtoRP_HsaSup_ActorCreated.ftl +++ b/RFXtoRP_HsaSup_ActorCreated.ftl @@ -34,16 +34,20 @@ <#-- if Reflex WMS address is not structured --> <#else> - "Name": "${actor.optional_attributes.company_name?json_string}", - "StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}", - "StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}", - "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}" + <#if actor.optional_attributes?? > + "Name": "${actor.optional_attributes.company_name?json_string}", + "StreetAddressOne" : "${actor.optional_attributes.address_1?json_string}", + "StreetAddressTwo" : "${actor.optional_attributes.address_2?json_string}", + "StreetAddressThree" : "${actor.optional_attributes.address_3?json_string}" + }, - "Phones": ["${actor.optional_attributes.telephone?json_string}", - "${actor.optional_attributes.other_number?json_string}" - ], + <#if actor.optional_attributes?? > + "Phones": ["${actor.optional_attributes.telephone?json_string}", + "${actor.optional_attributes.other_number?json_string}" + ], + "Typology": "TYPOLOGY_UNKNOWN" } }