This is known as buying on credit. You order the stock, it is sent to you and then you pay for it at a later date. This is ideal as it allows the business to sell the stock which generates money to pay for it.
Here are the T Accounts:
Notice how we have debited the purchases account, but not added an entry to the bank? This is because Tom hasn't actually paid for the stock yet. He will do in 30 days time. So we need to open a new account- the purchase ledger control account.
Because Tom owes money to the supplier, it is a liability so we need to credit the purchase ledger control account.
We now know that we owe £500. We can also enter this into an individual purchase ledger for the particular supplier. It is simply another T account titled 'Purchase Ledger [Supplier Name]' where we would enter all the credit purchases from this supplier. It is only a single sided entry and is not necessary to do (It simply helps us know how much we owe each supplier). The purchase ledger control account (PLCA) is a summary of these individual purchase ledgers.
Later on, when Tom pays for the stock we will Cr the bank and Dr the PLCA, to remove the liability.