Create service/tests to divide products added to baskets between farmers
ericrlessa opened this issue · comments
Eric Rosetti Lessa commented
Precondition:
-
There is a fair validity period, normally one week, to sell products.
-
The farmers will add their products to the fair to be available to sell.
-
The partners will add the available products to baskets regardless of the farmer that produced
Use case:
-
For each product added in different baskets, the service should divide equally the products between farmers' production available.
-
If it is impossible to divide the products equally among the farmers due to variations in available stock, the farmer with the least amount available should receive priority for the remainder of the distribution. This means that farmers with less stock may receive a greater portion than others