To close period "%(period)s" you must link all payable/receivable lines to invoices. Only one tax line on cash basis can be without period per move line.