Actually i need to check whether the employee had taken unpaid leave this month or not in basic calculation. I had used the below function
result = (worked_days.WORK100.number_of_days-worked_days.Unpaid.number_of_days) * (contract.basic / worked_days.WORK100.number_of_days) if (worked_days.Unpaid.number_of_days) != 'False'
else contract.basic
This is not working