65 lines
2.4 KiB
Java
65 lines
2.4 KiB
Java
[
|
|
{
|
|
"Header": {
|
|
"ProjectID": "${projectRP}"
|
|
},
|
|
"ID": {
|
|
<#if uniqueness?? && uniqueness!="" >
|
|
"RefID": "${actor.code?trim?json_string}"
|
|
<#else>
|
|
"RefID": "S${actor.code?trim?json_string}"
|
|
</#if>
|
|
},
|
|
|
|
"Payload": {
|
|
"Name": "${actor.designation?json_string}",
|
|
"ManagedStock": false,
|
|
"IsCarrier": false,
|
|
<#-- ***Partner ID could be added here *** -->
|
|
<#-- "PartnerID": "${}", -->
|
|
|
|
|
|
<#include "RFXtoRP_HsaSup_ActorCreated_Metadata.ftl">,
|
|
|
|
|
|
"Address":
|
|
{
|
|
<#-- if Reflex WMS address is structured -->
|
|
<#if actor.supplier_structured_address?? >
|
|
|
|
"Name": "${actor.supplier_structured_address.name_or_company?json_string}",
|
|
"StreetAddressOne" : "${actor.supplier_structured_address.street_and_PO?json_string}",
|
|
"StreetAddressTwo" : "${actor.supplier_structured_address.additionnal_data?json_string}",
|
|
"PostalCode" : "${actor.supplier_structured_address.postal_code?json_string}",
|
|
"City" : "${actor.supplier_structured_address.post_code_area_name?json_string}",
|
|
<#assign isCountryCode = JsonUtil.isCountryCode(actor.supplier_structured_address.country_code?upper_case) />
|
|
<#if isCountryCode>
|
|
"CountryCode" : "${actor.supplier_structured_address.country_code?upper_case?json_string}",
|
|
<#else>
|
|
"CountryCode" : "",
|
|
</#if>
|
|
"ProvinceCode": "${actor.supplier_structured_address.territorial_div_code?json_string}",
|
|
"State": "${actor.supplier_structured_address.country_designation?json_string}"
|
|
|
|
<#-- if Reflex WMS address is not structured -->
|
|
<#else>
|
|
<#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}",
|
|
"CountryCode" : ""
|
|
</#if>
|
|
</#if>
|
|
|
|
},
|
|
<#if actor.optional_attributes?? >
|
|
"Phones": ["${actor.optional_attributes.telephone?json_string}",
|
|
"${actor.optional_attributes.other_number?json_string}"
|
|
],
|
|
</#if>
|
|
"Typology": "TYPOLOGY_UNKNOWN"
|
|
}
|
|
}
|
|
]
|