When a product has several lots in stock and you make a sale, Jarbas has to decide which lot to take from. That rule applies to your whole account, and you choose which one to use.
Configurations › Orders and Sales › Lot control strategy
Older (default) — the lot registered longest ago goes out first. The classic rotation: first in, first out.
Newer — the most recently registered lot goes out first.
Bigger — the lot with the largest balance in stock today goes out first.
Smaller — the lot with the smallest balance in stock today goes out first. Handy for clearing out lots with little left.
Expiration — the lot that expires soonest goes out first. The right choice for food, cosmetics and medicines.
Jarbas carries on down the chosen order, topping up from the next lot until the quantity is met. A sale of 10 units can come out of two or three lots, and all of them are recorded in the stock movement.
Empty lots are skipped.
Lots with no expiry date filled in fall back to registration order. If you chose Expiration, it's worth filling in the date on every lot — otherwise the order gets mixed up.
Just below, Lot expiring days is where you say how many days ahead Jarbas should start warning you. The default is 7 days.
That number drives the "expiring" alert in your stock:
Tune it to your products: greengrocers tend to use 2 or 3 days; someone selling cosmetics might prefer 30 or 60, to have time to run a promotion before losing the goods.