Forum Discussion
Access stock taking system
While you've done a good job of introducing the CONCEPT, there isn't really enough detail in that description to offer any suggestions. "...all relevant tables..." could mean a number of different things to different people, for example. And none of them would be able to do much with that anyway because we wouldn't know if OUR assumptions matched the reality.
Let's start with a relationship diagram. That'll get us started being able to ask you useful questions about the system and maybe lead to some suggestions.
Thanks.
- Ivan__TorrJan 19, 2021Copper Contributor
See attached. Sorry new to Access. Its amazing what Covid get a person up too.
It is a Recipe and Dish coster . It also does allergens and Calorie counts on each dish.
hope this helps
- George_HepworthJan 19, 2021Silver Contributor
Thanks. I see a number of things to comment on, many of which have little to do with the current Inventory question. Let's get those out of the way.
- Multi-Value Field for PlatePic in TblPlating. As a matter of principle, most experienced Access developers refuse to use these things. I would recommend, therefore, that there be a separate table for the pictures and that the image files themselves be stored externally, not inside the accdb.
- Indeterminate relationships between tblSizes and TblRecipes and TblFoodProducts and tblProdList. These should be designated as one-to-many and they should have Referential Integrity Enforced.
- Several tables (TblOrders, TblSupp, and TblOrderPurch, as well as TblAllergens) which have no relationships identified. These need to be designated and have Referential Integrity Enforced on them. Otherwise it is all too easy to have "orphan" records added to tables.
Okay, a couple of other things could bear attention, but overall it otherwise seems fine.
It looks like TblOrderPurch is where incoming product quantities are stored. It's not clear to me, though, what the difference is between ProdQty and PurchAmount. ProdQty appears to be the value that determines how much you have received of each product, though. That means your Stock Take will be based on a query that Sums ProdQty by ProdID:
SELECT ProdID, Sum(ProdQty) As ProductQuantityPurchasedFROM tblOrderPurch
You can include additional tables to bring in things like ProdName from the TblProdList, or to bring in Dates from the TblOrders table to group purchases by time period (i.e. Group By OrderDate).
To get product quantity going out, it looks to be like "Plate" is the central concept, i.e. products are use in different recipes which are combined into "Plates". But I can't tell for sure how you want to calculate that and which "xxxQty" field(s) to use.
If I had to venture a guess, I would say that you'd need to include tblRecProducts to get the quantity per recipe, and join that to either TblRecipes or tblPlateRec, or both, to get to the RecQty and then join that to TblPlating to get to the ProdQtyPPlate in tblPlateProducts. Once you get there you should have the quantity of each product used in the total number of plates sold.
With that, you should be able to finally join the two queries on ProdID to get the quantity in and the quantity out for a final value of remaining quantity in stock.
I hope that helps your thinking.
- Ivan__TorrJan 20, 2021Copper Contributor
I don't think I explained it right. What i am looking for is to do a physical stock count and compare the counts to each other. My thoughts would be the following. If i create a table as below .
ProdID ProdName StockQty ProdSize 1 ProdPrice ProdValue 1 cabbage 2 kg € 1.20 € 2.40 2 carrots 3 2.5kg € 2.20 € 6.60 3 potatos 5 5kg € 6.00 € 30.00 4 peas 2.5 2.5kg € 1.00 € 2.50 5 turnip 2.1 kg € 1.25 € 2.63 6 cream 5.4 litre € 3.20 € 17.28 Where ProdID, Prod Price and ProdSize1 is from TblProdList and StockQty is a value that i can manually input from a form. the StockQty would be a calculated field. So I physically count my stock and input the value. I can then calculate a stock Value. What I need to be able to do is compare my opening stock on ProdID= 1 in one stock take to ProdID1 in the second stock take( month of week later)
Because I have create da new table , the value will not be changed when updating prices from my purchases.
StockTakeID1 StocktakeID2 ProdID ProdName StockQty ProdSize 1 ProdPrice ProdValue StockQty ProdPrice ProdValue 1 cabbage 2 kg € 1.20 € 2.40 6 € 1.20 € 7.20 2 carrots 3 2.5kg € 2.20 € 6.60 € 2.30 € - 3 potatos 5 5kg € 6.00 € 30.00 5 € 5.80 € 29.00 4 peas 2.5 2.5kg € 1.00 € 2.50 8 € 1.00 € 8.00 5 turnip 2.1 kg € 1.25 € 2.63 € 1.23 € - 6 cream 5.4 litre € 3.20 € 17.28 4 € 3.20 € 12.80 Once I have the second stock take completed, I can calculate my usage so where ProdID =6 Usage = 5.4 - 4 + Purchases
Thanks
Ivan