Login  Register

[jira] Commented: (OFBIZ-484) Wrong total of offline payments received is calculated by the org.ofbiz.order.OrderManagerEvents.receiveOfflinePayment(...) method

Posted by Nicolas Malin (Jira) on Nov 27, 2006; 11:03am
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-484-Wrong-total-of-offline-payments-received-is-calculated-by-the-org-ofbiz-orderd-tp174671p174674.html

    [ http://issues.apache.org/jira/browse/OFBIZ-484?page=comments#action_12453559 ]
           
Jacopo Cappellato commented on OFBIZ-484:
-----------------------------------------

Jacques,

sorry, the issue is still there but my explanation was awful...

Can you have a look at the order:
https://demo.dejc.com:8443/ordermgr/control/orderview?orderId=WS10000

As you can see the payments received are for a total of $60, and the order amount is $62.84
However the order has been approved right after the last $10 payment: in fact the current code counts two times the last payment received when it performs the balance.
So when I have 50$ received and I issue a new $10 payment, the system performs the following calculation:
50$ + 10$
+10$ (wrong!)
and approves the order

Jacopo


> Wrong total of offline payments received is calculated by the org.ofbiz.order.OrderManagerEvents.receiveOfflinePayment(...) method
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: OFBIZ-484
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-484
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: order
>    Affects Versions: SVN trunk
>            Reporter: Jacopo Cappellato
>         Assigned To: Jacopo Cappellato
>         Attachments: offline_payment.patch
>
>
> It should fix an issue I've discovered in the way the total total of offline payments received is calculated by the org.ofbiz.order.OrderManagerEvents.receiveOfflinePayment(...) method.
> I think that the new amount received is summed two times to the total of already received offline amounts.
> For example, if the order total is $80, and you receive an offline payment of $50, due to the bad calculation, the method says 50+50 = 100 > 80 and so approves the order.
> Could you please review the attached patch (that fix the issue)?

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira