F
F
foonfyrick2021-12-22 09:08:04
1C
foonfyrick, 2021-12-22 09:08:04

How to limit storage capacity?

For example, in the directory I create Warehouse No. 1, I want this warehouse to have a capacity of 1000 pieces of something, and could never change, and Warehouse No. 2 had a capacity of 1500 pieces of something, but in the future it may increase .
In which application element should I create these values?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
K
kalapanga, 2021-12-22
@foonfyrick

If we assume that the entire range is so similar in properties that the storage capacity can really be counted in pieces, no matter what, then for a start, the warehouse just needs to add an attribute in which and indicate its capacity. And then it all depends on how you store the balance in warehouses. In general terms, documents that implement the receipt of goods to warehouses must check somewhere during the execution whether there is a place in the warehouse, and, as a result, either place the goods in the warehouse (increase the balance) or give an error.

F
full_stack_newbie, 2021-12-22
@full_stack_newbie

In user mode, no way.
You can develop it in any way you like, but in this production it's a bad idea, there's a difference between things.

D
Dmitry Kinash, 2022-03-27
@Dementor

The head-on solution described in the question is a one-time one and will need to be redone when changing the type of stored goods, which will have different parameters.
First you need to decide on the storage units. If only floor storage of goods is provided, then it makes sense to stop at square meters. If there is shelving storage, then it can be stored in cubes. And if the goods are very heavy and there are design restrictions on the permissible weight, then we take the weight.
Then, in the description of the warehouse, you can specify the type and size of storage limits, and specify geometric or weight indicators in the storage units of goods. If we are finalizing the existing configuration and there is already some kind of register of warehouse balances, then on its basis we make calculations (we multiply the number of balances by the parameters of the storage units of these balances - squares, cubes or kilograms) and compare the resulting result with the storage capacity - if it exceeds, then we issue error.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question