WHMCS business logic:
As the invoice is not generated at the time of ordering, it is not associated with the order record. When the daily automation tasks run the next day, the system identifies that the service has not yet been invoiced for the Next Due Date, so a new invoice is generated for the correct amount, just a day later.
Due to some issue with WHMCS an invoice was generated next day after order and this invoice was not associated with an order. Though the invoice was paid the order still shows payment status "No Invoice Due"
The functionality to assign an invoice to an order is essential especially when this invoice was paid.
Blacknight Solutions Ltd