Salary Structure creation

In the salary Structure doctype i want to add the earning where the logic is the basic amount * no of total working days divided by no of month days …

how to get this logic and i want it in the basic salary component only …

Please check the documentation and apply the logic.