How to add item in Sales contract amendment if the following error occurs ‘Currency code cannot be blank.’?

Cause: System shows error ‘Currency code cannot be blank.’ or ‘Null pointer exception’ while adding line item in Sales contract amendment when currency code of the header is not entered.

Remedies:
The user should ensure the currency code is entered correctly and it should be present in the currency master. Please note, At the time of tax calculation the system uses header currency code value.