diff --git a/RPtoRFX_AppointmentEvent.ftl b/RPtoRFX_AppointmentEvent.ftl index 41434b1..ee1119d 100644 --- a/RPtoRFX_AppointmentEvent.ftl +++ b/RPtoRFX_AppointmentEvent.ftl @@ -37,79 +37,75 @@ } <#else> <#if eventRP.commissionsUpdated> - <#if eventRP.executionflowCustomFields?has_content> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> - } - - <#assign AddComma = true /> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_associations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptAssociationByRef.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0> + <#if AddComma == true> + , - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> - } - <#else> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> - } - - <#assign AddComma = true /> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByNumber.ftl"> + } + <#else> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_physical_receipt_dissociations_by_ref> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentPhysicalReceiptDissociationByRef.ftl"> + } + <#assign AddComma = true /> - <#if eventRP.orderCustomFields?has_content> - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != ""> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_associations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl"> - } - - <#assign AddComma = true /> + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.addedUnloadCommissions?? && eventRP.addedUnloadCommissions != "" && eventRP.addedUnloadCommissions?filter(x -> x.ExecutionflowID == "")?size != 0> + <#if AddComma == true> + , + + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_associations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptAssociationByNumber.ftl"> + } + + <#assign AddComma = true /> + + <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!="" && eventRP.removedUnloadCommissions?filter(x -> x.ExecutionflowID != "")?size != 0> + <#if AddComma == true> + , - <#if appointment.AppointmentType == AppointmentType.APPOINTMENT_TYPE_UNLOADING && eventRP.removedUnloadCommissions?? && eventRP.removedUnloadCommissions!=""> - <#if AddComma == true> - , - - <#if eventRP.appointmentCustomFields?has_content> - { - <#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number> - "apiRestReflexID" : "${apiRestReflexID}", - "datas" : - <#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl"> - } - - <#assign AddComma = true /> + <#if eventRP.appointmentCustomFields?has_content> + { + <#assign apiRestReflexID = ApiRestReflexID.appointment_post_anticipated_receipt_dissociations_by_number> + "apiRestReflexID" : "${apiRestReflexID}", + "datas" : + <#include "RPtoRFX_CarrierAppointmentAnticipatedReceiptDissociationByNumber.ftl"> + } + <#assign AddComma = true /> <#-- *********************************************** Action = reasonUpdated or slotUpdated ******************** -->