calculations for payslip and validations