Answer the question
In order to leave comments, you need to log in
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
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.
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.
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 questionAsk a Question
731 491 924 answers to any question