Information about the terminal that saved the last changes has been added to orders and reserves

Tags:

A new property LastChangedTerminalId has been added to the order (IOrder.LastChangedTerminalId) and to the reserve (IReserve.LastChangedTerminalId), which allows determining which terminal saved the current state of these objects.

In some scenarios, such as when processing events like OrderChanged, DeliveryOrderChanged, or ReserveChanged, there may be a need to separate changes saved on the local terminal from changes received over the network from neighboring terminals. Now, it is sufficient to compare LastChangedTerminalId and PluginContext.Operations.GetHostTerminal().Id.

Previously, a method GetLastChangedOrderTerminal was added for these purposes, which returned the terminal where the last changes of the specified object were saved. However, between the plugin obtaining a specific state of IOrder and calling GetLastChangedOrderTerminal, new changes could have been made on another terminal, and then the GetLastChangedOrderTerminal method would return that other terminal, relying on a newer state of IOrder than what the plugin has. This issue no longer exists, as the LastChangedTerminalId property is now directly obtained by the plugin in the IOrder object. The GetLastChangedOrderTerminal method has been removed.