Add period_id to transaction just in time