[ https://issues.apache.org/jira/browse/OFBIZ-2702?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12729862#action_12729862 ]
BJ Freeman edited comment on OFBIZ-2702 at 7/10/09 3:15 PM: ------------------------------------------------------------ some research to aid in a solution http://www.ibm.com/developerworks/java/library/j-jtp0114/ BCD math http://forums.sun.com/thread.jspa?forumID=31&threadID= the solution in my mind is to store all numbers as strings. the math package would first do the integers side then sift the decimal to integer perform the math the sift the result back to decimal side and add th e integer component. example 19595.3457 + 200.12 would first add 19595 and 200 then add 3457+1200 this keeps the numbers out of the floating point type of math the return result is the longest (in string) decimal. in this case .xxxx truncation and rounding would only be done at the last calculation point. in the case of the trial balance the result of the sumation of all the entries. was (Author: bjfreeman): some research to aid in a solution http://www.ibm.com/developerworks/java/library/j-jtp0114/ BCD math http://forums.sun.com/thread.jspa?forumID=31&threadID= the solution in my mind is to store all numbers as strings. the math package would first do the integers side then sift the decimal to integer perform the math the sift the result back to decimal side and add th e integer component. example 19595.3457 + 200.12 would first add 19595 and 200 then add 3457+12 this keeps the numbers out of the floating point type of math the return result is the longest (in string) decimal. in this case .xxxx truncation and rounding would only be done at the last calculation point. in the case of the trial balance the result of the sumation of all the entries. > Rounding error(?) prohibits posting > ----------------------------------- > > Key: OFBIZ-2702 > URL: https://issues.apache.org/jira/browse/OFBIZ-2702 > Project: OFBiz > Issue Type: Bug > Affects Versions: SVN trunk > Reporter: Hans Bakker > Fix For: SVN trunk > > > how to re-create using normal ofbiz demo data > Enter an order to DemoCustomer for product WG-9943-B3 quantity 11. > Use quick shipping and look at the invoice created. All transactions into > suspense. > to see the reason goto GlSettings' -> accounting 'company' -> 'unposted > transactions' -> verify transaction > then you het the message: Not posting GL Accounting Transaction with ID > because the trial balance failed: Debit Total=522.51 Credit Total=522.49 > Debit/Credit Difference=0.02 > ... looks like some rounding problem. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.