Hi All,
This one has got me stumped -
I am a noob, in the process of learing on the job - and as always I have set my goals qite high...
I am slowly developing a solution to run my catering company.... and up to now I have read, tried out, backed up and (not to pat myself too hard on the back) have a system that can track all my purchases, return the curent price, the average price over 3 and 6 months - distinguish products that can be used only in recipes, and those that can be sold as dishes in their own right and used in recipes - I can create recipes that take into account the above and the average waste factor (dirty potatoes to peeled) and adjust the price accordingly - and return a cost per portion. I can create quotes refferencing both products and recipes and add the cost of Hired items and staff.
I am now stuck on a problem (which may be a "wood for trees" scenario - for which I appologise)
I have generated a stock take table that is related to my Products and purchases and what I need to do is - at each stock take, I need to create a "Stock variance calculation" which very simply is "Last stock take value" (minus) "new stock take value" this can then be added to the "total purchased" for a period to give me the "Total stock" for that period - I have a summary feild that gives me the total purchased between 2 dates. I have tried everything I can find/ Think of to isolate the last 2 stock take values, but nothing is working.....
I know the above is a little disjointed, but perhaps there is someone out there who can give me some insight....
Ideally what I would like to acheive is the following
MAIN STOCK TAKE TABLE
id
date
comment
stock value - (sum of stock count * current stock price)
housekeeping
STOCK TAKE DETAILS TABLE
id
fk_Main Stock take id
fk_Product - (Links to products and therefore prices and purchases)
Stock count
??Last stock count
Stock variance (??last stock count-Stock count)
Housekeeping
Through the relationships I have, I can relate this back.......