archives = employee.payroll_archive_ids
result = ''
ann_base = []
for archive in archives:
if archive.code == 'Original_Annual_Base_Salary':
ann_base.append(archive)
if len(ann_base)>0:
ann_base.sort(key= lambda x:x.effective_date, reverse=True)
result=env['employee.certification'].calculate_salary_capital_form(ann_base[0].amount)