How to save payment against a voucher if the following error occurs: ‘ Invalid CCTR code’?

Cause:
System shows the error ‘Invalid CCTR code, Please enter valid CCTR code’ while saving payment against voucher, when users have entered invalid cost center account code or cost center account code is blank or users have entered space in cost center account code value.
Remedies:
Users should ensure that the cost center code is entered correctly for the debit account and credit account. Users should also check if space is not entered in the account value Cost center code must be defined in cost center master.