diff --git a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl index 963902c..b55a4b5 100644 --- a/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl +++ b/RFXtoRP_HsrCarrierApt_UpdateAppointment.ftl @@ -65,6 +65,24 @@ "Value": "${carrier_apt.planned_carrier?json_string}" } ], + <#if carrier_apt.physical_receipt_list?? && (carrier_apt.physical_receipt_list?filter(l ->l??)?size != 0)> + "Commissions": [ + <#list carrier_apt.physical_receipt_list?filter(l ->l??) as physical_receipt> + { + "ActorID": "${RFXtoRPprefixDepot(carrier_apt.physical_depot?json_string)}", + <#if physical_receipt.physical_receipt_reference?? && physical_receipt.physical_receipt_reference!=""> + "OrderID": "${physical_receipt.physical_receipt_reference?json_string}", + <#else> + "OrderID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year}${physical_receipt.receipt_number}", + + "ExecutionflowID": "R${carrier_apt.physical_depot?json_string}${physical_receipt.receipt_activity?json_string}${physical_receipt.originator_code?json_string}${physical_receipt.receipt_year?json_string}${physical_receipt.receipt_number?json_string}", + "ProjectID": "${projectRP}", + }<#sep>, + + ], + <#else> + <#stop> + "Slots": [{ <#-- calcul de de la durée en fonction des start et end time--> "DurationInSeconds": "${duration}", diff --git a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl index d93f41f..b8b8924 100644 --- a/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl +++ b/RFXtoRP_HsrReceiptList_ExecutionflowDetected.ftl @@ -29,7 +29,7 @@ <#if receipt.receipt_type == '020'> "ActorID": "${RFXtoRPprefixConsignee(receipt.original_code?trim?json_string)}" <#else> - "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}" + "ActorID": "${RFXtoRPprefixSupplier(receipt.original_code?trim?json_string)}" }, "ShipTo" :