Applied fix from trunk for revision: 1579155 
===

This should fix (and hopefully make it more readable) the code that was supposed to handle payment to invoice applications with different currencies but it was broken: see the bug report by Adrian Stern OFBIZ-5576.
The fix is in the spirit of the original code that is handling the fields Payment.actualCurrencyUomId and Payment.actualCurrencyAmount: however in my opinion this is a wrong design; unfortunately I don't have time now to refactor this code.
 



git-svn-id: https://svn.apache.org/repos/asf/ofbiz/branches/release13.07@1579157 13f79535-47bb-0310-9956-ffa450edef68