diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index da1299f..5677a75 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl index 60e2655..d19ea66 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list addedCommissions as addedCommission> + <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> { "receipt_activity": "${executionflowCustomFields[addedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[addedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl index 7f09d94..f3f2b2b 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 6f9691e..85a66dc 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list removedCommissions as removedCommission> + <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl index 21333a8..ba489cf 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -10,10 +10,10 @@ "payload" : { <#include "RPtoRFX_CarrierAppointmentDataUpdated.ftl"> - "unloading_appointment" : "${eventRP.appointmentCustomFields.unloading?json_string}", - "load_appointment" : "${eventRP.appointmentCustomFields.loading?json_string}", - <#switch appointment.AppointmentType> + <#switch appointment.AppointmentType> <#case "APPOINTMENT_TYPE_LOADING"> + "unloading_appointment" : "false", + "load_appointment" : "true", <#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)}", @@ -23,6 +23,8 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> + "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)}",