What is the best way to stock products with different purchase prices & expiration date?
问题 I'm developing a stock inventory system using PHP, Mysql. This system have purchase module to add/update/increase quantity and expire date of products & sale module to decrease/out the quantity of products. Now what is creating confusion to me and what is my real question is that Suppose we have PRODUCT A1 in our stock with quantity 20 and the price of PRODUCT A1 was $15 when we purchase it. Now we want to stock this product more for example we want to buy 100 more items of PRODUCT A1 but now