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 a7d6ad5..74eee06 100644 --- a/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentSlotOrCarrierInformationUpdatedByNumber.ftl @@ -13,7 +13,10 @@ "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)}", @@ -24,6 +27,9 @@ <#break> <#case "APPOINTMENT_TYPE_UNLOADING"> <#if appointment.TimeZone?? && appointment.TimeZone!=""> + "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>