diff --git a/RPtoRFX_CarrierAppointmentCreated.ftl b/RPtoRFX_CarrierAppointmentCreated.ftl index 017cee7..820c79d 100644 --- a/RPtoRFX_CarrierAppointmentCreated.ftl +++ b/RPtoRFX_CarrierAppointmentCreated.ftl @@ -12,15 +12,25 @@ <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> "unloading_appointment" : "true", "load_appointment" : "false", - "planned_unloading_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl index efd5dfc..d362dfe 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByNumber.ftl @@ -13,15 +13,25 @@ <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#default> <#stop "appointment.AppointmentType not implemented" > diff --git a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl index b7f102d..49b4579 100644 --- a/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl +++ b/RPtoRFX_CarrierAppointmentSlotUpdatedByRef.ftl @@ -12,15 +12,25 @@ <#case "APPOINTMENT_TYPE_LOADING"> "unloading_appointment" : "false", "load_appointment" : "true", - "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_load_start_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_load_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> - "unloading_appointment" : "true", - "load_appointment" : "false", - "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", - "planned_unloading_end_datetime": "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", - <#break> + "unloading_appointment" : "true", + "load_appointment" : "false", + <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,appointment.TimeZone),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,appointment.TimeZone),time_zone_rfx)}", + <#else> + "planned_unloading_start_datetime":"${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.StartDateTime,time_zone_rfx),time_zone_rfx)}", + "planned_unloading_end_datetime" : "${DateTimeUTCtoRfxLocale(RfxDateTimetoUTCWithTimezone(appointment.Slot.EndDateTime,time_zone_rfx),time_zone_rfx)}", + + <#break> <#default> <#stop "appointment.AppointmentType not implemented" >