Price in database different than in SambaPOS

The price from the SambaPOS product list is different from the price displayed by the following SQL query.
Order :

Product list :

Query :

Result :

Maybe I’m missing some point, but I can’t explain this behaviour.
Thank You

There is no direct correlation between MenuItems and MenuItemPrices. The Prices are linked to MenuItemPortions, which are then linked to MenuItems. So this join that you did, does not work:

INNER JOIN MenuItemPrices ON MenuItems.Id = MenuItemPrices.Id

The [Id] columns in those tables have no correlation to each-other.

Try this query instead:

,mi.[Name] as [Item]
,p.[Name] as [Portion]
FROM [MenuItemPrices] mp
join [MenuItemPortions] p on p.[Id] = mp.[MenuItemPortionId]
join [MenuItems] mi on mi.[Id] = p.[MenuItemId]
WHERE [ItemType]=0
ORDER BY [GroupCode], mi.[Name]

P.S. Your Topic has been changed to a Question, since this is not an Issue.

1 Like

Thanks for your help.