The company received the money first, and then the other party said that it didn't need an invoice. Simply put, the company's income is not invoiced, so there is no need to pay taxes (the company likes it best if it doesn't pay taxes). If you don't invoice, it can't be used as income and can be linked to other payables.
Debit: bank deposit
Credit: other payables