Automatically open current period

Also: bugfix where allowance was also given is exactly 12 hours were
worked