[SOLVED] Inventory prediction on menu item names

Hi Dears,

For my customer I would like to do something like that - inventory prediction on menu item names.

It works, but I have some problems.

Try 1. ({REPORT CONSUMPTION DETAILS:C.Prediction.sum})

image

Try 2. ({REPORT CONSUMPTION DETAILS:C.Prediction.asc})

image

I need to show prediction for each items and also without decimals

I would like to do something like that ({REPORT CONSUMPTION DETAILS:C.ItemName:Sazan,C.Prediction.sum,##}) but it not works, maybe I’m doing something wrong.

Well the report expression you show doesnt factor in the product the button is related to, its just a generic report like you would have on printed report.
Im not sure if $1 or {0} work in button headers like in other places list state formatting but even if it did this would only work if your inventory items were named exactly matching your product names.
You will need to add the inventory item name constraint to the report and set its value dependent of the inventory item for each related button.

Where should I insert $1? I can relate each product to custom deparments, they will enter prediction every day.

{REPORT CONSUMPTION DETAILS:C.Prediction,C.Warehouse=Tea}

I need something like that, but I don’t know what am I doing wrong.

But that is going to give a list for the department, you don’t want a list for each button surely.?
Plus pretty sure that =tea will sort anyway…
You need to specify inventory item in the expression I would have though, not wharehouse…

It won’t work at all.

This:

C.Warehouse=Tea

… is written like a Constraint, but is part of the Field Selection list, where it is not allowed.

I created (example: Tea) Warehouse = Tea, Group Code = Tea, Inventory Item = Tea for product Tea :slight_smile: And think to do for each product like it.

Anyway, thanks for your help.

@emre for the next update, please :slight_smile:

What for next update, you can do stock on buttons I’m sure it’s shown on gorum, it’s just your expression is we ng

I found what I need. It must be like that {REPORT INVENTORY:Tea:Local Warehouse} (actually I changed Local Warehouse name to Tea)

But it doesn’t show it on mobile unfortunately. Hope for the next update of android app, we can use it.

It likely wont ever be on mobile to keep It fast. I could be wrong though.

GraphQL already has support for the Menu Item Header field. I cannot speak for the Mobile Client, but QMX uses the value in Header, if present.

However, as shown above, when it comes to having a Report Tag in the Header, it does not display as you might expect. Presumably, this is because when requesting getMenu(), the Server does not process Tags before returning the Menu to the Client.

This makes sense for speed of course, since it takes some time to process even 1 Tag (ie. in SambaPOS it took about 3 seconds to show the Level for just 1 Product). Multiply that by 10 or 20 or 30 (or however many Menu Items you have), and suddenly you’re waiting 30s, or 60s, or 90s, (or more), before the Menu is returned from the Server to the Client.

So like @Jesse says, it’s very unlikely this will ever be implemented in GraphQL (Server).


query q1 {
  menu: getMenu(name: "Menu") {
    categories {
      id
      name
      color
      foreground
      image
      header
      menuId
      isFastMenu
      menuItems {
        id
        name
        color
        foreground
        image
        header
        caption
        categoryId
        productId
        portion
        quantity
        defaultOrderTags
        groupTags
        autoSelect
        product {
          id
          name
          barcode
          groupCode
          price
          portions {
            id
            name
            productId
            price
          }
        }
      }
    }
  }
}

1 Like