POS Treansaction ledger

Hi,
I have issue with ERPnext POS,
my case is I have Item with Qty 20, when I sell by POS for example 3 qty, it should create a stock ledger entry to be after transaction 17,
but in my case is still 20

and When I want to sell 20 from sales invoice is told me you need 3 qty in warehouse,

How I can disable the out stock in POS, or the POS should create a stock ledger entry to update the stock

any idea?