[EventParameter] Incorrect parameter in events OnBeforeAutoReserveXXX from codeunit Reservation Management
In the codeunit 99000845 (Reservation Management) it exist the following integration event:
local procedure OnBeforeAutoReserveItemLedgEntry(ReservSummEntryNo: Integer; var RemainingQtyToReserve: Decimal; var RemainingQtyToReserveBase: Decimal; Description: Text[100]; AvailabilityDate: Date; var IsReserved: Boolean; CalcReservEntry: Record "Reservation Entry")
We see that is uses the parameters RemainingQtyToReserve and RemainingQtyToReserveBase. But when it is related in the code this two parameters are refering into the same variable:
OnBeforeAutoReserveItemLedgEntry( ReservSummEntryNo, RemainingQtyToReserve, RemainingQtyToReserve, Description, AvailabilityDate, IsReserved, CalcReservEntry);
The second RemainingQtyToReserve must be RemainingQtyToReserveBase.
The same error exists in all the other events OnBeforeAutoReserveXXX of this codeunit:
OnBeforeAutoReserveItemLedgEntry OnBeforeAutoReservePurchLine OnBeforeAutoReserveSalesLine OnBeforeAutoReserveProdOrderLine OnBeforeAutoReserveProdOrderComp OnBeforeAutoReserveAssemblyHeader OnBeforeAutoReserveAssemblyLine OnBeforeAutoReserveTransLine OnBeforeAutoReserveServLine OnBeforeAutoReserveJobPlanningLine
Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. We will update this issue with information about availability. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.