You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Vinay Agarwal (JIRA)" <ji...@apache.org> on 2006/06/23 01:09:30 UTC

[jira] Commented: (OFBIZ-47) createCommissionInvoices throws a "BigInteger divide by zero" in case of Quick Ship Order and "Mail Check/Money Order" paiement

    [ http://issues.apache.org/jira/browse/OFBIZ-47?page=comments#action_12417389 ] 

Vinay Agarwal commented on OFBIZ-47:
------------------------------------

Jacques,

I can reproduce the problem. The problem is caused by createCommissionInvoices receiving an invoiceId that doesn't yet exist and hence determines zero amount. I have added a patch that returns success if it gets invoice with no invoice items that will solve your problem. It returns success if the invoiceId it receives returns zero amount (which is the case when the invoice doesn't exist). 

But it would not calculate commission correctly since it would simply ignore the invoice. Somehow createCommissionInvoices needs to be called after the invoice is created (and stored). Currently it is being called by a seca on createPaymentApplication service on "commit" event and it seems to work correctly when the item is shipped first and then the payment is applied (but not the other way). 

Help!
Regards,
Vinay

> createCommissionInvoices throws a "BigInteger divide by zero" in case of Quick Ship Order and "Mail Check/Money Order" paiement
> -------------------------------------------------------------------------------------------------------------------------------
>
>          Key: OFBIZ-47
>          URL: http://issues.apache.org/jira/browse/OFBIZ-47
>      Project: The Open For Business Project
>         Type: Bug

>   Components: order
>     Versions: SVN trunk
>  Environment: svn 7817
>     Reporter: Jacques Le Roux
>     Priority: Blocker
>      Fix For: SVN trunk
>  Attachments: 06-06-22 CommDivZ.patch
>
> Make an order from ecommerce, pay by "Mail Check/Money Order", receive paiement, try "Quick Ship Order" : createCommissionInvoices throws a "BigInteger divide by zero" 
> Jacques

-- 
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