POS item Batch wrong Warehouse

Hi don’t know if anyone has come or already fixed on V11 or V12 but on V10 if an item has two or more Batches and when selling the user “must” or not select the Batch …
When doing the Sync of Invoices the message “… Unable to find a single batch that fulfills this requirement” in which for the Cashier is annoying …

After checking the code i came that on GET_BATCH_NO (batch.py) and is the first call that comes with the ITEM Warehouse instead of the Warehouse selected on the POS PROFILE.

I fixed this by adding a if not batches: return after the call of
batch_no = None
batches = get_batch_qty(item_code = item_code, warehouse = warehouse)

Of course this is just a temp solution for me because we might have an Item with batches on different Warehouses but which are not on the user POS PROFILE.

Can someone check on v11/12 that if you have an item with two batches and on two warehouses where the default selling warehouse is “shopping” … And after selling on POS if will show the message “Please select a batch for item…” .
This message is annoying for users because if they do a sell with more than 2 items … imagine the message length.

As I said on my previous post the system calls get_batch_no with the warehouse of the item instead of the POS config

Me too experiencing the same problem.
Have you got any workarounds?

Hi. Another issue is when an item has two batches and its sold in 1 invoice. User choose the batches but system takes the batch in which it has 2 units which is incorrect. Physically one unit is sold from each batch. Hence, deduction should happen from each batch. We use batch for item expiry date. This issue gives us incorrect value of items expiry.

Not yet… But I do re-enforce the batch selection before saving… As I said on my previous post…
The message still pops up as I could not find what or who is calling get_batch_no before validation.

Are you saying selling different batches correct?
Like user has batch A (stock 1), batch B (stock 2) and instead of selling batch B system sells A (due to expiry date) and the second from batch B.