changed max date to curdate+5days, changed clientAgreementNumber calculation logic