Monday, July 6, 2009

Exchange Rate in Payables

1150 Payables

If 'Require Exchange Rate Entry' in Payables Options is checked, you won't be able to save foreign currency invoices without having the exchange rate in place.

If you uncheck this option, then you would be able to save invoices and the system would create a hold. But you could also confirm the payments without defining exchange rate, and it would not create accounting though.

This can be an issue, if your business process sends out the confirmed payments information before accounting.

So how do we prevent creation of payments if there is no exchange rate?

The solution is to create a forms personalization on the Payment Batch and Single Entry Payment to prevent creation of new record if there is no exchange rate information available.

For the Payments Batch form, create a personalization and use this condition in the WHEN-VALIDATE-RECORD of BAT_SUM_FOLDER block.

/**/:parameter.entry_screen = 'PAYMENT BATCHES'
AND :bat_sum_folder.exchange_rate IS NULL
AND :bat_sum_folder.status                       = 'UNSTARTED'
AND NVL(:parameter.make_rate_mandatory_flag,'N') = 'N'
AND :bat_sum_folder.currency_code <> :parameter.base_currency_code
If this condition is true, then show error message and then raise form trigger failure. Create this personalization for Single Payment Entry form as well.

And use FNDLOAD to migrate this personalization.
For Download
FNDLOAD apps/apps@appsDB 0 Y DOWNLOAD $FND_TOP/patch/115/import/affrmcus.lct PERZ.ldt FND_FORM_CUSTOM_RULES function_name=%APXPAWKB%

For Upload
FNDLOAD apps/apps@appsDB 0 Y UPLOAD $FND_TOP/patch/115/import/affrmcus.lct PERZ.ldt
To verify the upload, check log file, also check data in these tables
FND_FORM_CUSTOM_RULES
FND_FORM_CUSTOM_SCOPES
FND_FORM_CUSTOM_ACTIONS
FND_FORM_CUSTOM_PARAMS