Commit 52ce781f authored by mmhatre's avatar mmhatre

add code when decimal are zero then doesn't throw error

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@213904 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 0c0d66c1
......@@ -10,32 +10,32 @@ Modification:-
.............................................*/
package ibase.webitm.ejb.dis;
import java.io.ByteArrayInputStream;
import java.io.OutputStreamWriter;
import java.rmi.RemoteException;
import java.sql.*;
import java.util.*;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.sql.Timestamp;
import java.text.NumberFormat;
import java.text.DecimalFormat;
import ibase.webitm.ejb.*;
import ibase.webitm.utility.*;
import ibase.utility.CommonConstants;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.fin.FinCommon;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import ibase.webitm.ejb.sys.UtilMethods;
import java.util.HashMap;
import javax.script.ScriptEngine;
import javax.script.ScriptEngineManager;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Document;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import ibase.utility.E12GenericUtility;
import ibase.webitm.ejb.fin.FinCommon;
import ibase.webitm.ejb.sys.UtilMethods;
import ibase.webitm.utility.GenericUtility;
import ibase.webitm.utility.ITMException;
//import com.ibm.db2.jcc.a.p;
public class DistCommon {
......@@ -11056,7 +11056,7 @@ public class DistCommon {
// added by rupali on 30/04/19 for getting rate slab_no wise if ref_no is geting
// blank [end]
//added by manish mhatre on 02-dec-2019
//added by a mhatre on 02-dec-2019
//start manish
public String checkDecimal(double quantity, String unit,Connection conn ) throws ITMException
{
......@@ -11078,8 +11078,11 @@ public class DistCommon {
{
decPlaces=rs.getInt("dec_opt");
}
System.out.println("decimalLength["+decimalLength+"]unit["+unit+"]places["+decPlaces+"]");
//decval for if decimal 0 there are skip the decimal value
int decVal = Integer.parseInt(splitter[1] == null ? "0": splitter[1]);
System.out.println("decimalLength["+decimalLength+"]unit["+unit+"]places["+decPlaces+"]"+"]decval["+decVal+"]");
if(decVal > 0)
{
if(decPlaces > 0)
{
if (decimalLength != decPlaces)
......@@ -11091,6 +11094,7 @@ public class DistCommon {
{
errCode="VTUOMDEC3";
}
}
rs.close();
rs = null;
pstmt.close();
......
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