I am developing a retail management system with inventory management module, I am facing a logic design problem and I don't really know how to address the problem in an easy way, so I wrote an example which illustrates that problem:
Let's say I have an item (e.g. Cola Can), this item have a Barcode (11...1), this is so good until now and we can sell the item smoothly using the Cola Can barcode(11...1). However, when the warehouse buys cola can they buy with larger package for simplicity 6 cans packages which have different barcode(11...2), after that the 6 packages is braked down into 1-1 cans and sold per item of barcode (11...1).
The problem is that you buy with package and sell per item which will make the reports for the inventory incorrect, and the inventory stock will never match.
How to control this packages problem or should the system deals with the smallest package only (e.g. when I buy 6 cans package, the warehouse should enter 6 items of single can barcode)?