
# Stock plan

Look for: nc-work-center/init.json and nc-stock/init.json

Big idea is that with nc-stock people see open purchase order and their rows. Idea is for human to unload truck, print optionally barcodes  (to be done) to packets and put packets to stock
  shelves. Map should show what is default location of each product group and where is room and is there enough room for all packets. Then big amount is spliced in to packets and those
  packets (like one steel sheet) is placed in the stock.

Next work-center is screen where employees see work phases they should start in starting order. Person select work phase to start and presses material -button to, system starts to calculate time for material picking. Here left low grid shows materials to pick and map where they are found, in stock on maybe other persons work table. We need to make as easy as possible for person to collect materials for work. When pickup is confirmed we create stock event. Old packet in the self will get end time, part that is left is shelf is new packet and part that goes with user is also a new packet that has location of persons work table or material trolley where all needed materials can be pre-picked.

AXIOM: Every time when new is created old has only end_time set (nothing else changed) and new packets have same start_time.

After material is picked person presses start -button and set started amount. Those materials are RESERVED to that works.

After build user enters produced amount and failed amount of THAT phase. Many materials like zipper an cloth are joined together and that product is new stock packet of type semi-finished good. last phase creates final products and semi-finished have their end_time set. Use MUST enter how much she/he actually used and where remaining is set? Back to stock shelve, trolley, to waste (what bin was used?). Also if final product was not faulty, but maybe zipper was already broken or broke while sewing. All these info is important to track material, we heed to know WHERE and HOW MUCH everything was at ANY time.

Product has stock unit and with metals it's almost always kg. Product has multiplier for secondary stock unit like sheet and multiplier kg/sheet. But in design it's much easier to enter dimensions like 100 * 200 mm. Also with sheets it's nice to know ho many pieces we get from a sheet (like 5 / sheet) and amount of sheets 1/5 = 0.2 sheets per one produced. It's VERY important to be able to enter all these info and rest will be calculated.

In nc-stock we have incoming kg and it should tell how many full packets and how many in last packet contains. There is a good start to this in web page. EXACTLY same code file should be for used for person to pick up materials to work phase.
This is the MOST important part of the ERP system because it has almost ALL users in the company and employees need to have EXTREMELY easy and nice system to use. Focus on user experience.

We need to plan all the UI first and at the same time finish calculation code and stock event creation code.

> Make really good high level plan. Create Linear project for this. The we start creating lots of subtasks.
