How to set currency to a field?

Hi,

I have a currency field where all the currencies listed from Currency DocType.
I have another field which is of type currency and is the total of 3 different fields say X, Y and Z and Total (Currency Type)
I am updating the value of Total by adding the values of X, Y and Z.

But the issue is whatever currency I select from the currency field it doesn’t get updated in Total it always shows INR.

Any idea what needs to be done in this?

Regards
Ruchin Sharma