Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

General Discussion

Tabish Rafique
Tabish Rafique
5,913 Points

Inventory Management with multiple units of sale

Hi, developing a web application for inventory management. App admin will purchase item for inventory from supplier as a single unit lets say a box which contains 50 packages.. but admin may sale that box or a single package by opening that box. Package and box both have different prices, sizes etc. If you were to develop such app how would you handle it. I mean any suggestions for database design. To make it more clear here's an example.. Purchased 1 Carton of Sunsilk Shampoos (25 shampoos per carton) Sold 3 Shampoos.. 23 shampoos in stock. I thought to add a base unit for each product.. The smallest units for selling something.. Now in above case sunsilk gonna sale as bottle as well as whole carton.. So, first a base unit (bottle) will be defined then another unit (box) and base quanitity will be defined for it i.e 1 Box (25 Bottle[base units])