"Applied fix from trunk for revision: 1564111" 
------------------------------------------------------------------------
r1564111 | jleroux | 2014-02-03 23:29:40 +0100 (lun. 03 févr. 2014) | 12 lignes

A (slightly modified) patch from  Ritu Raj Lakhera for "Order return is not refunding the money" https://issues.apache.org/jira/browse/OFBIZ-5528

When we placed an order with two items and generate a return towards one item then code is refunding the money correctly.
But if we again do return for second item then code is not refunding the money because first return-refund process has changed the status of OrderPaymentPreference from 'PAYMENT_SETTLED' to ‘PAYMENT_REFUNDED’.
I think We should create the new OrderPaymentPreference with PAYMENT_REFUNDED status against old OrderPaymentPreference of 'PAYMENT_SETTLED' status at the time of return-refund process. So second return can also refund the money.

In other words we should create the new OrderPaymentPreference for each refund amount as we are doing with Payment entity(processRefundResult PaymentGatewayServices.java).

jleroux: I 
* replaced the deprecated findByPrimaryKey by a finByOne
* replaced Exception GenericServiceException in catch (as it was before)
* reformatted some parts 
------------------------------------------------------------------------
?\026

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