Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039734Openbravo ERP07. Sales managementpublic2018-12-03 11:502019-06-18 10:09
nitasujena 
collazoandy4 
highminoralways
closedno change required 
5
main 
 
Sandrahuguet
Core
No
0039734: rounding error in number to word module
There is a rounding error in the number to word module.
Let Say order total amount is : 29825.28

It is printing as twentynine thousand eight hundred twentyfive and 28/100, where decimal part is coming wrong.
1. Add Number To Word (English) on the instance.
2. Create any field to display order totalamount in word.
2. create an object of NumberToWord and call the convert method to display the total in a word.

Let say :
 "total amount " + new
 org.openbravo.numbertoword_en.erpCommon.utility.NumberToWord_en().convert($F{total amount}

3. Take a print of sales order.
--alter convert function logic
    
        if (number_decimal == 0) {
          value = toWord(number_whole).concat("and 00/100");
        } else {
          value = toWord(number_whole).concat("and").concat(Integer.toString(number_decimal).concat("/100"));
        }
    //code
      }
In the else session,instead of converting [ concat(Integer.toString(number_decimal).concat("/100")] call toWord() again.
No tags attached.
Issue History
2018-12-03 11:50pramodkumarNew Issue
2018-12-03 11:50pramodkumarAssigned To => Triage Finance
2018-12-03 11:50pramodkumarModules => Core
2018-12-03 11:50pramodkumarTriggers an Emergency Pack => No
2019-05-24 13:07nitasujenaReporterpramodkumar => nitasujena
2019-06-17 12:40nitasujenaTypedesign defect => defect
2019-06-17 12:56SandrahuguetAssigned ToTriage Finance => collazoandy4
2019-06-18 09:56SandrahuguetSeveritymajor => minor
2019-06-18 10:09SandrahuguetReview Assigned To => Sandrahuguet
2019-06-18 10:09SandrahuguetNote Added: 0112849
2019-06-18 10:09SandrahuguetStatusnew => closed
2019-06-18 10:09SandrahuguetResolutionopen => no change required

Notes
(0112849)
Sandrahuguet   
2019-06-18 10:09   
Number to word was implemented to use in check printing and is a common and correct way to write decimal part like 28/100.