The setting of the period_id was not multi company safe. Now set it according to the journal used.