This means you haven’t created a period with a start date before, and an end date after, the date of the move that goes with the invoice.
To create a period you need to create a Fiscal Year: Financial --> Configuration --> Fiscal Years --> Fiscal Years.
Also see: