Exactly the same principle applies when recognizing the existence of business costs as having been incurred. Costs are recognized, and a financial liability to suppliers is recorded, as soon as there comes in to existence a legally binding obligation to make payment to the supplier. The accounting treatment for both income and costs follows the same underlying principle. Both sales revenues, often called turnover in the jargon, and costs are recorded as soon as a legally binding obligation to pay come into existence.
It does not matter at all from a profit and loss account viewpoint when payment these are earned, and recording liabilities for business for costs as these are incurred. In summary a profit and loss account measures whether a business has made a profit or not by setting costs incurred against revenues are recorded when legally binding obligations to pay come into existence, not when the payments happen. There is indeed another business financial statement that concerns itself with the timing of movements of funds in and out of a business, when liabilities to suppliers have to be paid, and when customers are expected to pay their debts. That is known as the cash flow statement.