Prohibition of Transferring an Order to a Table of Another Group

Tags: v9

Protection has been added against transferring an order to a table belonging to another group of terminals via the API.

Problem

When using the method ChangeOrderTables, it was possible to transfer an order to a table of another group of terminals, which caused unexpected side effects and data synchronization issues between groups.

var auth = PluginContext.Operations.GetDefaultCredentials();
var group = PluginContext.Operations.GetHostTerminalsGroup();
var table = PluginContext.Operations.GetTables().First(t => !t.RestaurantSection.TerminalsGroup.Equals(group));
PluginContext.Operations.ChangeOrderTables(order, new[] { table }, auth);

Solution

Now, when attempting to transfer an order to a table of another group via the API, an exception is generated. Orders can only be transferred to tables within the current group of terminals.

This prevents incorrect operations and ensures data integrity when working with multiple groups of terminals.

See also