I have written an application that my clients use to keep inventory. The inventory system includes a purchase order module. Each purchase order has a list of line items including:
- Description of item
- Quantity to order
- Unit of measure
- Unit price
among others. When asked about the "unit of measure" field, my response is always to use a unit label that reflects the manner in which you consume or resell the items. Here are a couple examples of what I mean:
- "cc" for liquid medication stored in a bottle
- "Bar" for a candy bar
- "Bag" for a bag of dog food
This is clear when the unit of measure being consumed or resold matches the unit of measure on a received invoice. My problem is when it does not match. For example, medication is usually sold by the bottle, but dispensed by the cc or pill, candy bars are purchased by the box or case and sold individually, and dog food can be purchased by the pallet and sold by the bag.
In my experience in the past few months, I have realized that's it's unrealistic for a user to translate boxes into bars or bottles into cc, but I have not yet found a good way to remove the need for the mental translation.
Should I set up a table for equivalencies (1 box = 12 candy bars, 1 bottle = 1000cc, etc) and ask the user which they are ordering? This seems like it would add a lot of complexity behind the scenes when a vendor changes their packaging or offers new options. I'd like to keep the whole process as easy as possible.
Am I thinking about this incorrectly? Is there a simpler more elegant solution?
Update: Here are some line items I'm getting that don't work:
Cephalexin 1 Bottle $100.00 Snickers 10 Box $12.97 Dog food 1 Pallet $122.50
These are almost completely useless to me because the units and quantities aren't useful when updating the inventory. People don't resell dog food by the pallet or antibiotics by the bottle. This is what I need:
Cephalexin 100 Pill $1.00 Snickers 120 Bar $1.297 Dog food 20 Bag $6.125
Those units, quantities, and prices directly correlate to the units that are consumed or resold. The first set are what the OEM vendor expects.