You can see that it is only hitting your bank when transaction is reconciled.
It works same way when you receive good and have bill pending.
Dr stock
Cr Goods received not invoiced
When bill is received
Dr Goods received not invoiced
Cr Accounts payable