Warehouse registred is not working right

when i registered new stuff in warehouse with best before and last sale it swap them in system

System is

Ubuntu 24.04

Dolibarr 24.0.0

Which screen are you entering the stock from: the manual stock correction on the product’s Stock tab, or a reception from a supplier order? And is it a new lot number or one that already exists? An existing lot keeps the dates stored on it, which can look like a swap. That tells us whether it’s a v24 bug or a setup issue.

Muhammad Ali
Dolibarr Customization Expert
SiliconBlaze

from reception from supplier and when receive a new order with product from same batch it complain about that 2 dates are not same it does not see if best before is older then last sale date

@nemprinter I think that some screenshots would be a great addition to increase understanding

If you’re receiving multiple items with serials/lots/etc., its important that each row is addressed when completing reception.

is that i receive maybe 20 boxes of ink and they have a best before date and then i calculate a last date of sale and they have a batch number this is all fin i have receive it put it in system then next ordre from this supplier have same batch number receive it but now it is complaining that it already have one with same batch but it tell that best before is my calculate last sale and last sale is best before date they have actually swab places

That’s by design. Make your own internal batch number, and link the manufacturers batch via the note or another complimentary attribute on batch. Then each reception will get it’s unique ID. You should not be able to add to or combine a batch by the rules of Dolibarr as I understand them. A batch is finite.

@nemprinter if they have the same batch number, wont they have the same best before date?

yes it shut be so but if i get some in from same batch it swaps that 2 dates at second time receive it

That sounds like a date-handling issue rather than a warehouse setup problem. Since it happens when receiving products from a supplier and the same batch is involved, I’d check how Dolibarr 24.0.0 stores and compares the best-before and last-sale dates for existing lots.