That's the usual state of affairs.
Tax is keyed to your invoice date, not to when the customer pays. If you send a customer an invoice in December, it will often have a due date in January, but that money is taxable as income in the old year. It generally works smoothly because by the time you've filed your tax returns and the taxman wants you to pay for taxes for that December income, the customer has already paid you.
If the customer doesn't pay before the end of the year, you have an outstanding debt in your accounts. If the customer doesn't pay at all, you write it off and make a tax-deductible loss. In that case, you may have to pay income on that December invoice in April (even though you haven't received it) and the taxman pays it back in July or next April.
Note that if someone owes you money and that money is income for tax purposes, then it's also a debt that you can collect. The paperwork that makes it income is the same paperwork as what the courts require to force the debtor to pay.