Is it possible to have 3 libraries, 1 for each warehouse
For example
WAREHOUSE A (1st library)
stock 100
WAREHOUSE B (2nd library)
stock 0
WAREHOUSE C (3rd library)
stock 0
If I transfer 10 stocks from Warehouse A to B
WAREHOUSE A will be 90
WAREHOUSE B will be 10
Is this possible?
The actual contents of the warehouse -- the warehouse items or stock -- would normally be stored in its own separate library, maybe called Stock, with fields describing the stock items themselves, like item number, quantity on hand, pallet or lot, bin or location, etc. Each entry would probably represent an item type (model, pet number), or if the stock is serialized, it might contain an entry for each individual item, or serial number. In fact, if the stock is serialized, you might make that three libraries: Warehouses, Products, and Items -- indexed by warehouse number, product (part, model) number, and serial number, respectively.
Memento allows an entry of a library to link to an entry of another library, so camera (item) EJ4682-3 might link to model number EOS-250, and one of those two entries would link to warehouse 5 -- if each warehouse holds all cameras of a given model, then EOS-250 might link to warehouse 5, but if any warehouse might hold any item, then you'd have each item (in this case EJ4682-3) link to warehouse 5.
Of course, a real implementation would probably deal with more detail, like, lots, bins, etc, and depending on how much you want to track on those, you might have more libraries, like Bins or Lots. It's up to you. Memento is very powerful, without being complex to use.
The model typically has libraries for Customers, Products, Orders, and Order Items; in your case, you're tracking the warehousing of the product, so we'll add Warehouses, Warehouse Items (inventory), Warehouse Receipts, Deliveries, and Delivery Items.
Unfortunately, I don't (yet) have reference implementations to show you, but the data structure is pretty straightforward, with a quantity on hand in the warehouse, probably in library Warehouse Items, a quantity ordered in Order Items, and a quantity shipped/delivered in Delivery Items.
There are many variations on how to do it, but they are usually pretty similar. They all get to one point and have an issue to deal with. How and when do you adjust quantity on hand?
If the implementation is purely analytical, it is best to keep the data at its origin and not even store quantity on hand; rather, just compute it when you want to show it. That involves spinning through the Order Items and Delivery Items, getting a net change, and comparing that to Warehouse Receipts to get a final figure. In Memento, that's a trigger script written in JavaScript.
If your implementation is more operational or even transactional, you might maintain the quantity on hand within Warehouse Items and handle the incoming orders and outgoing shipments in a real-time fashion. Once again, in Memento, the solution for this is a trigger script written in JavaScript, but a shorter one that merely updates the quantity on hand each time a new entry comes into Order Items or Delivery Items -- no spinning through whole libraries to compute anything.
If you tell us a little about your business process and maybe also the way you might be thinking to implement the system, we can zoom in to more specific topics.
The canonical example is inventory management. One could previously not do such a thing with Memento. So, I'll implement that, put it in the wiki, and post in the forum that it exists, so people will know about it. And who knows? Maybe I'll create a template and put it in the catalog, also.
Stay tuned. If you're a beta user, you can try it out now, I think, but I'll need some time to do my thing.
I will sign to beta testing to try it now,im very curious!