Fiscal Section Number in API
Tags:
v8
The API has added the ability to retrieve the fiscal section number of a dish at any moment. Previously, the number was only available when obtaining ChequeTask.
New properties have been added:
FiscalSectionMapinITerminalGroup- a map of the correspondence between cooking place types and FR section numbersCookingPlaceTypeinIProduct- the cooking place type for the productKitcheninIOrderServiceItem- the kitchen where the order item is prepared
Usage
var terminal = PluginContext.Operations.GetHostTerminal();
var terminalGroup = PluginContext.Operations.GetHostTerminalGroup();
var orderItem = order.Items.OfType<IOrderProductItem>().First();
var cookingPlaceType = orderItem.Product.CookingPlaceType;
var kitchen = orderItem.Kitchen;
// Getting the fiscal section number
var fiscalSection = terminalGroup.FiscalSectionMap[cookingPlaceType];