added sum on done and pending permits process