Commit 7eb0269e authored by steurwadkar's avatar steurwadkar

Changes made to format double to 2 digit

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@178677 ce508802-f39f-4f6c-b175-0d175dae99d5
parent aaeca085
......@@ -6,6 +6,7 @@ import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Timestamp;
import java.text.DecimalFormat;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
......@@ -467,6 +468,7 @@ public class PricelistGenEJB extends ValidatorEJB
private double getDoubleValue(String input) throws Exception
{
double value = 0.0;
DecimalFormat df = new DecimalFormat("#.00");
try
{
if(input == null)
......@@ -478,6 +480,9 @@ public class PricelistGenEJB extends ValidatorEJB
if(input.trim().length() > 0)
{
value = Double.valueOf(E12GenericUtility.checkNull(input));
String roundValue = df.format(value);
System.out.println("formatted value = ["+roundValue+"]");
value = Double.parseDouble(roundValue);
}
}
System.out.println("retutn value["+value+"]");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment