OperationServiceExtensionsChangeOrderItemPrice Method |
Changes the base price of the existing order product item without recreating the item. Waiter, print time, cooking state, course, amount, comment, modifiers and marking codes of the item stay unchanged. Service cheque is not printed.
Namespace: Resto.Front.Api.ExtensionsAssembly: Resto.Front.Api.V10 (in Resto.Front.Api.V10.dll)
Syntaxpublic static void ChangeOrderItemPrice(
this IOperationService operationService,
decimal price,
IOrderProductItem orderItem,
IOrder order,
ICredentials credentials
)
Parameters
- operationService IOperationService
- Operation service.
- price Decimal
- New base price of the order item per unit of measure (as IOrderProductItem.Price), not the cost of the item. Must fit the currency settings. Must be from 0 to 9999999999.999999999, or from -9999999999.999999999 to 0 if the product is for purchase.
- orderItem IOrderProductItem
- Order product item which price will be changed. Must not be deleted, must not be a part of a combo, must not be a payment system service and its product must not be a modifier. Can be already printed.
- order IOrder
- Order that contains the order item. Order must be in the New status.
- credentials ICredentials
- Credentials of the user. Required to pass permission and some other checks, as well as execute personalized operations.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IOperationService. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
RemarksThe method sets the base price per unit (IOrderProductItem.Price); discounts and surcharges are applied on top of it, the result sum is not fixed. If the order item supports open price (it is fixed when the item is added, by the IProduct.CanSetOpenPrice setting of the product), the price is set as the open price the same way as SetOpenPrice method does. Otherwise the price becomes predefined, the same as the predefinedPrice argument of AddOrderProductItem method. The predefined price of an item without open price can be recalculated by the price list later: in delivery and banquet orders when the price category is changed (in iikoFront or via API) or when the price list or the size of the item is changed in iikoFront, in banquet orders when the banquet date or time is changed in iikoFront, and when a part of the item is split off into a new item (the new item does not keep the predefined price). If the item is later included in a combo, the combo can override its price. Open price limits from the restaurant settings are not applied and the open price event is not written to the event journal. Marking codes of the item are not verified again after the price change. Changes are rejected if the product of any item of the order is excluded from the menu. If the order item was included in a bill that was cancelled without confirmation, the user must have the permission to cancel bills.
See Also