From b9231bb4ddc4a387cc9f61af1d83d784e87b4ee2 Mon Sep 17 00:00:00 2001 From: hieplq Date: Tue, 23 May 2017 00:36:31 +0700 Subject: [PATCH] IDEMPIERE-3371:amount in word get wrong when parse for multiple of 1000 on Viet Nam --- .../src/org/compiere/util/AmtInWords_VI.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java b/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java index 9aa5be7843..4612ad7805 100644 --- a/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java +++ b/org.adempiere.base/src/org/compiere/util/AmtInWords_VI.java @@ -245,7 +245,7 @@ public class AmtInWords_VI implements AmtInWords place++; number /= 1000; } - while (number > 1000); + while (number >= 1000); long m = number % 1000; //see Note 2, this rule does not apply for biggest major name if (m != 0) { @@ -372,6 +372,14 @@ public class AmtInWords_VI implements AmtInWords aiw.print ("1.093.201.034.578"); aiw.print ("100,932,010,345,780"); aiw.print ("109.320.103,48"); + aiw.print ("1,000"); + aiw.print ("1,000,000"); + aiw.print ("1,000,000,000"); + aiw.print ("1,000,001,000"); + aiw.print ("9,000,001,000"); + aiw.print ("9,000,000,000"); + aiw.print ("9,000,000,001"); + } // main } // AmtInWords_VI