Automation of hrm_credential.end_date based on deployment setting

Would be great to have this logic abstracted for use by both users...so that if we need to extend it then we can do so in just 1 place