Just in case someone get to this question, here goes my solution:
I decided to create a table transfer_stocks
to register all the transfers between venues. This table is also used to solve any discrepancy when stock is counted (when recipient_id
is nil, it means wastage or stock missing in the venue -sender_id
).
The products in stock is calculated by de difference between purchases, sales and stock transferred.
My class diagram: