ItemID as unique value in Item?
I'm building a Business Intelligence application for Lightspeed Retail. I'm collection information from the API in my database. When updating my Item table I use itemID field as primary key. I use a updateOrCreate query which updates exciting rows or creates a new row for new Items.
I joined the Orderline table with Order and Item to make calculations for received stock, but the results where not right. I found out that the ItemID from my Item table isn't corresponding with the ItemID in the Orderline table or Lightspeed Retail.
Now I'm wondering, is the ItemID an unique value from Items? Do I need to use another field as primary key? Does anybody came across the same issue? Can somebody help me with this problem?