Login  Register

[jira] Closed: (OFBIZ-109) InvoiceServices.updatePaymentApplicationDefBd

Posted by Nicolas Malin (Jira) on Aug 31, 2006; 7:07am
URL: http://ofbiz.116.s1.nabble.com/jira-Created-OFBIZ-109-InvoiceServices-updatePaymentApplicationDefBd-tp170079p170080.html

     [ http://issues.apache.org/jira/browse/OFBIZ-109?page=all ]

Jacopo Cappellato closed OFBIZ-109.
-----------------------------------


> InvoiceServices.updatePaymentApplicationDefBd
> ---------------------------------------------
>
>                 Key: OFBIZ-109
>                 URL: http://issues.apache.org/jira/browse/OFBIZ-109
>             Project: OFBiz (The Open for Business Project)
>          Issue Type: Bug
>          Components: accounting
>            Reporter: Chris Howe
>
> variable invoiceItemApplyAvailable is the difference between a big decimal without scale and a user inputed big decimal, which generally has a scale.  Therfore 8.1899999999999999787 - 8.19 is < 0 and the payment application will not be entered
> around line 1861 (my copy is mocked up for a temporary thing, otherwise, I'd submit a patch)
> reads
>                     invoiceItemApplyAvailable = invoiceItem.getBigDecimal("amount").multiply(quantity).subtract(InvoiceWorker.getInvoiceItemAppliedBd(invoiceItem));
> should read
>                     invoiceItemApplyAvailable = invoiceItem.getBigDecimal("amount").multiply(quantity).setScale(decimals,rounding).subtract(InvoiceWorker.getInvoiceItemAppliedBd(invoiceItem));

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