From 2b25c4853d2934424376ab38326d9daad777999b Mon Sep 17 00:00:00 2001 From: Francis Reat Date: Fri, 24 Apr 2026 09:41:03 +0200 Subject: [PATCH] back SCPN1 10519 --- ...CarrierApt_BookingForceBookAppointment.ftl | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl index d2b0ba7..b45dee9 100644 --- a/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_BookingForceBookAppointment.ftl @@ -61,8 +61,12 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_unloading_end_datetime?datetime.iso) /> - <#if (duration <= 0)> + <#if (duration < 0)> <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#else> + <#if (duration == 0)> + <#assign duration = 1 /> + <#else> <#if carrier_apt.unloading_appointment == "false" && carrier_apt.load_appointment == "true" > @@ -71,8 +75,12 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_LOADING> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_load_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> - <#stop "planned_unloading_start_datetime or planned_unloading_end_datetime field of appointmend are not valid" > + <#if (duration < 0)> + <#stop "planned_load_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + <#else> + <#if (duration == 0)> + <#assign duration = 1 /> + <#else> <#if carrier_apt.unloading_appointment == "true" && carrier_apt.load_appointment == "true"> @@ -81,8 +89,12 @@ <#assign appointmentType = AppointmentType.APPOINTMENT_TYPE_UNLOADING> <#assign duration = DurationBetweenTwoDatetimeInSeconds(carrier_apt.planned_unloading_start_datetime?datetime.iso,carrier_apt.planned_load_end_datetime?datetime.iso) /> - <#if (duration <= 0)> + <#if (duration < 0)> <#stop "planned_unloading_start_datetime or planned_load_end_datetime field of appointmend are not valid" > + <#else> + <#if (duration == 0)> + <#assign duration = 1 /> + <#else> <#stop "Appointment type not supported" >