database - design decision for inventory system -
that's class diagram @ moment:
i believe can control level of stock @ each venue difference between quantity of purchased ingredient , quantity of beverage sold (as each beverage composed ingredient).
however, have requirement should allow users transfer ingredients between venues, , wondering best approach that...
a new purchase order add product 1 venue's inventory, how can remove other one?
just in case question, here goes solution:
i decided create table transfer_stocks
register transfers between venues. table used solve discrepancy when stock counted (when recipient_id
nil, means wastage or stock missing in venue -sender_id
).
the products in stock calculated de difference between purchases, sales , stock transferred.
my class diagram:
Comments
Post a Comment