Where does SambaPOS 5 keep GroupCode in the database?

Hello community

I’m new to SambaPOS. Doing an integration with ERPNext using myddleware. Ultimately I need to sync sales to ERPNext as Sales Invoices. I’d like to start with something simple like GroupCode (Categories in ERPNext), but I can’t find a Table for it in the DB, only as a field in MenuItem.

Some direction will be appreciated. Alternative solutions are welcome.

Group codes are freely typeable with drop down only offering suggestions of existing codes so would make sense that they would just be a field on menu items.
Not at pc to check DB but sounds reasonable to me.
Where were you expecting them to be?

Got it ScreenMenuCategories

Thank you @JTRTech that makes sense. Probably means these categories are not appearing as GroupCode (foreign key) in MenuItem. Is that right?

You wouldn’t want to use that for an integration as it relates to the category for on screen menus, not the actual product. You could for example have the same product in multiplier categories on the same menu, or you could have it on multiple menus.

ScreenMenuCategory also have no link to GroupCode - in the sample database they are identical but they don’t have to be.

GroupCode is the way to go but it’s just a text field there is no table storing all the GroupCodes and therefore will be no foreign key or a fable containing primary keys for them.

Thank you @markjw and JTRTech

This makes sense, I’ve put unique GroupCodes from MenuItems into a view and I’m synching this to an Item Group entity in ERPNext.

For reference, here’s the code for creating the view:

USE [training_4443]

/****** Object:  View [dbo].[GroupCodesView]    Script Date: 05/08/2019 16:58:31 ******/


CREATE VIEW [dbo].[GroupCodesView] AS
SELECT          GroupCode, Modified
FROM            dbo.MenuItems
WHERE        (Id IN
                             (SELECT        MIN(Id) AS Expr1
                               FROM            dbo.MenuItems AS MenuItems_1
                               GROUP BY GroupCode))
1 Like