Main 2328

Changed approach. Looking for last generated rollup for given period_id. This is the most optimized way of we could ask DB.