Leave Encashment formula based

Leave Encashment formula based - basic salary +Dearness allowance /30*no. of leaves taken

I am trying to create leave encashment for the employee but value is not calculated. Would you please help?