You do not specify the target of the calculation, as it is assumed the target for the result of the calculation is the field for which the calculation is being written.
The target of the calculation is to determine "prorate."
"prorate" will always equal "day" x "dayrate" unless "day" = 30, in which case "prorate" would equal "monthly" which is an amount entered by the user.
Let me know if I did not answer your question. Thank you!