diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 01b428a..5ebd44a 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -41,7 +41,7 @@ } <#else> <#if eventRP.commissionsUpdated> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0> <#if eventRP.appointmentCustomFields?has_content> { <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> @@ -59,7 +59,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (x.ExecutionflowID?? && x.ExecutionflowID != ""))?size != 0> <#if AddComma == true> , @@ -82,7 +82,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID == "")?size != 0> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0> <#if AddComma == true> , @@ -96,7 +96,7 @@ <#assign AddComma = true /> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID == "")?size != 0> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> (!x.ExecutionflowID?? || x.ExecutionflowID == ""))?size != 0> <#if AddComma == true> , diff --git a/RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl index a387efd..5f3bd82 100644 --- a/RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl @@ -17,7 +17,7 @@ "anticipated_receipt_list": [ - <#list addedCommissions?filter(l -> l.OrderID??) as addedCommission> + <#list addedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as addedCommission> { "activity": "${orderCustomFields[addedCommission.OrderID].activity_code?json_string}", "originator_code": "${orderCustomFields[addedCommission.OrderID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl b/RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl index 17a4dd6..6528680 100644 --- a/RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl @@ -17,7 +17,7 @@ "anticipated_receipt_list": [ - <#list removedCommissions?filter(l -> l.OrderID??) as removedCommission> + <#list removedCommissions?filter(l -> (l.OrderID?? && (!l.ExecutionflowID?? || l.ExecutionflowID == ""))) as removedCommission> { "activity": "${orderCustomFields[removedCommission.OrderID].activity_code?json_string}", "originator_code": "${orderCustomFields[removedCommission.OrderID].originator_code?json_string}", diff --git a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl index 2d532b1..63352a1 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl @@ -17,7 +17,7 @@ "physical_receipt_list": [ - <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> + <#list addedCommissions?filter(l -> (l.ExecutionflowID?? && 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 0fef024..f62bde4 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list addedCommissions?filter(l -> l.ExecutionflowID??) as addedCommission> + <#list addedCommissions?filter(l -> (l.ExecutionflowID?? && 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_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl index 20735f9..a5223eb 100644 --- a/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl +++ b/RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl @@ -16,7 +16,7 @@ "physical_receipt_list": [ - <#list removedCommissions?filter(l -> l.ExecutionflowID??) as removedCommission> + <#list removedCommissions?filter(l -> (l.ExecutionflowID?? && l.ExecutionflowID != "")) as removedCommission> { "receipt_activity": "${executionflowCustomFields[removedCommission.ExecutionflowID].activity_code?json_string}", "originator_code": "${executionflowCustomFields[removedCommission.ExecutionflowID].originator_code?json_string}",