Added conditional ASC, DESC to pay period dao