php - Novice purchasing, selling and inventory management design, please guide~
怪我咯
怪我咯 2017-06-05 11:07:08
0
1
670

1. I am learning to develop a purchase, sales and inventory management system. Now I encounter a problem. How to count the quantities when making inventory reports?

2. Let me first list a few data tables I use

⑴Inventory list

⑵Warehouse table

⑶warehousing order

⑷Outbound order
Same as above

⑸Existing scale

3. My idea is this: There are multiple items in a warehouse receipt. First, compare it with the existing inventory to see if there are the same inventory. There are three situations: 1. None; 2. Partially; 3. .all of them. Situations 1 and 3 are easy to solve, but the problem lies in Situation 2. For example, my warehouse receipt has an array of 4 items (1, 2, 3, 4). I compare it with the existing inventory and find that the same array is included. (1,2), Now I have found these 2 items, but how do I filter out the submitted quantities and add them up?

4. Is my design reasonable? Could you guys provide me with some ideas? Thank you very much!

怪我咯
怪我咯

走同样的路,发现不同的人生

reply all(1)
大家讲道理

If the "existing scale" has the product information, then

  1. Into warehouse to increase existing stock

  2. Export from warehouse to reduce on-hand quantity

If the "Existing Scale" does not have the product, then
1 Entry, insert "Existing Scale" records the existing quantity is the warehousing quantity
2 Outgoing warehouse, the product has not been put into the warehouse, an error is reported or an exception is thrown

It is also recommended to add a detailed inventory operation log table to record the increase and decrease of inventory (including the "existing scale" before and after the operation, inventory change type, and change quantity), similar to the bank account fund change record, to facilitate the positioning of inventory changes. and tracking

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template