[REBASE] Imp fix hr attendance analysis various bugs