IDEMPIERE-307 Improve readability of AmtInWords_EN output. Apply patch from hahmed ( Hesham S. Ahmed ).

This commit is contained in:
Heng Sin Low 2012-06-22 17:03:52 +08:00
parent 350bbce59e
commit 4da9bf4cac
1 changed files with 35 additions and 35 deletions

View File

@ -36,50 +36,50 @@ public class AmtInWords_EN implements AmtInWords
/** Thousands plus */ /** Thousands plus */
private static final String[] majorNames = { private static final String[] majorNames = {
"", "",
"Thousand-", "Thousand ",
"Million-", "Million ",
"Billion-", "Billion ",
"Trillion-", "Trillion ",
"Quadrillion-", "Quadrillion ",
"Quintillion-" "Quintillion "
}; };
/** Ten to Ninety */ /** Ten to Ninety */
private static final String[] tensNames = { private static final String[] tensNames = {
"", "",
"Ten", "Ten ",
"Twenty", "Twenty ",
"Thirty", "Thirty ",
"Forty", "Forty ",
"Fifty", "Fifty ",
"Sixty", "Sixty ",
"Seventy", "Seventy ",
"Eighty", "Eighty ",
"Ninety" "Ninety "
}; };
/** numbers to 19 */ /** numbers to 19 */
private static final String[] numNames = { private static final String[] numNames = {
"", "",
"One", "One ",
"Two", "Two ",
"Three", "Three ",
"Four", "Four ",
"Five", "Five ",
"Six", "Six ",
"Seven", "Seven ",
"Eight", "Eight ",
"Nine", "Nine ",
"Ten", "Ten ",
"Eleven", "Eleven ",
"Twelve", "Twelve ",
"Thirteen", "Thirteen ",
"Fourteen", "Fourteen ",
"Fifteen", "Fifteen ",
"Sixteen", "Sixteen ",
"Seventeen", "Seventeen ",
"Eighteen", "Eighteen ",
"Nineteen" "Nineteen "
}; };
/** /**
@ -105,7 +105,7 @@ public class AmtInWords_EN implements AmtInWords
} }
if (number == 0) if (number == 0)
return soFar; return soFar;
return numNames[number] + "Hundred-" + soFar; return numNames[number] + "Hundred " + soFar;
} // convertLessThanOneThousand } // convertLessThanOneThousand
/** /**