How to confirm Purchase Return if following error ‘Invalid Tax Code !’ occurs on confirm button click?

Cause:
System will not allow to confirm Purchase Return if tax is not getting calculated. System will show following errors ‘Invalid Tax Code !’
Remedies:
User should edit the record and ensure tax class, tax chapter and tax environement are populated correctly.

User should ensure the line no. fields is having leading spaces before saving the record.