Certain large customers (a bank, an airline) had contracts where they would order large batches of printed forms, luggage tickets, sick bags, etc, at some negotiated quantity / price (taking into account the size of the print run, our capacity at the time, etc.). We (the print company) would then print it and warehouse it, and ship it directly to their individual locations in smaller batches as they ordered it.
The billing was done on some cost + shipping basis, so at the end of the month you'd have to look at everything that was shipped, work out which original batches going into inventory that came from on a FIFO basis, and then use that as a basis for the cost plus billing.
It was a horrible messy old codebase, and it was sometimes difficult to explain the results.
Anyway, I just thought I'd share this as an example use-case for a sufficiently generic / flexible / reliable implementation of your potential side project.