Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Micros Simphony - Get all menu items from guest check

Status
Not open for further replies.

laura youssef

Programmer
Jul 26, 2021
11
EG
System: Micros Simphony
version: 18.2.4.0

I need to get all of the guest check details, particularly the menu items added to the check and their prices.

I tried using the following code, but it just returns the names and quantities of menu items, not their prices.
Code:
List<ExtensibilityOpsDisplayDetail> displayDetail = OpsContext.DisplayDetail;
foreach (ExtensibilityOpsDisplayDetail display in displayDetail)
                {
                    menuItem = new Item();
                    menuItem.benefitsName = display.MiName;
                    menuItem.total = 0; // Fixed price for now
                    items.Add(menuItem);
                }

thanks in advance.
 
if you use it in OPS.
example:
Code:
public void GetMenu()
{

            Logger.LogAlways("get menuitems " + this.OpsContext.CheckDetail.Count);

            List<MenuItem> menuItems = new List<MenuItem>();
            foreach (var item in this.OpsContext.CheckDetail)
            {

                //menutiem detail
                if (item.DetailType == CheckDetailType.DtlTypeMi)
                {
                    MenuItem menuItem = new MenuItem();

                    //menuitem name
                    menuItem.Name = item.Name;

                    //menuitem price
                    menuItem.Price = item.Total;

                    Logger.LogAlways($"{item.Name}-{item.Total}");
                    menuItems.Add(menuItem);
                }

            }


            //show menuitem details in OPS
            var showMenuitems = new List<OpsSelectionEntry>();
            int index = 1;
            foreach (var item in menuItems)
            {

                string showName = $"{item.Name}-{item.Price}";
                showMenuitems.Add(new OpsSelectionEntry(index, showName));
                index++;
            }

            this.OpsContext.SelectionRequest("SHOW", "Show Check MenuteItem", showMenuitems);
        }


   public class MenuItem
    {

        public string Name { get; set; }

        public decimal Price { get; set; }
    }
effect:

%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20220922113503_slfwix.png
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top