Commit aab44ea9 authored by mnair's avatar mnair

Added new sql query to first get tax_env and tax_class from site_supplier...

Added new sql query to first get tax_env and tax_class from site_supplier table if not found then from supplier table or else from the current logic 

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@184938 ce508802-f39f-4f6c-b175-0d175dae99d5
parent de2f30c3
......@@ -6453,27 +6453,11 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt = null;
if ("A".equalsIgnoreCase(editFlag)) {
if (taxClass == null || taxClass.trim().length() == 0) {
// taxclassDes =
// gf_get_taxclass('S',suppCode,"",siteCodeDlv)
taxclassDes = distComm.getTaxClass("S", suppCode,
"", siteCodeDlv, conn);
} else {
taxclassDes = taxClass;
}
if (taxChap == null || taxChap.trim().length() == 0) {
// taxchapDes = gf_get_taxchap("", itemSer, 'S',
// suppCode,siteCodeDlv)
taxchapDes = distComm.getTaxChap("", itemSer, "S",
suppCode, siteCodeDlv, conn);
} else {
taxchapDes = taxChap;
}
//Changes by mayur on 11-May-2018---[start]
if(taxEnv == null || taxEnv.trim().length() == 0)
//Changes by mayur on 15-May-2018---[start]
if(taxClass == null || taxClass.trim().length() == 0 && taxEnv == null || taxEnv.trim().length() == 0)
{
sql = "select tax_env from site_supplier where site_code = ?" //checking tax_env in site_supplier table
sql = "select tax_class,tax_env from site_supplier where site_code = ?" //checking tax_class,tax_env in site_supplier table
+" supp_code = ? ";
System.out.println("SQL::"+sql);
......@@ -6483,10 +6467,17 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = pStmt.executeQuery();
if (rs.next())
{
taxClass = rs.getString("tax_class") == null ? "" : rs
.getString("tax_class");
taxclassDes = taxClass ;
taxEnv = rs.getString("tax_env") == null ? "" : rs
.getString("tax_env");
taxenvDes = taxEnv ;
System.out.println("@@taxclassDes in site_supplier@@"+taxclassDes);
System.out.println("@@taxenvDes in site_supplier@@"+taxenvDes);
}
rs.close();
rs = null;
......@@ -6494,9 +6485,9 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
pStmt = null;
}
if(taxEnv == null || taxEnv.trim().length() == 0)
if( taxClass == null || taxClass.trim().length() == 0 && taxEnv == null || taxEnv.trim().length() == 0)
{
sql = "select tax_env from supplier where supp_code = ? "; //checking tax_env in supplier table
sql = "select tax_class,tax_env from supplier where supp_code = ? "; //checking tax_class,tax_env in supplier table
System.out.println("SQL::"+sql);
pStmt = conn.prepareStatement(sql);
......@@ -6504,18 +6495,42 @@ public class POrderIC extends ValidatorEJB implements POrderICRemote,
rs = pStmt.executeQuery();
if (rs.next())
{
taxClass = rs.getString("tax_class") == null ? "" : rs
.getString("tax_class");
taxclassDes = taxClass ;
taxEnv = rs.getString("tax_env") == null ? "" : rs
.getString("tax_env");
taxenvDes = taxEnv ;
System.out.println("@@taxenvDes in supplier@@"+taxenvDes);
System.out.println("@@taxclassDes in site_supplier@@"+taxclassDes);
System.out.println("@@taxenvDes in site_supplier@@"+taxenvDes);
}
rs.close();
rs = null;
pStmt.close();
pStmt = null;
}
//Changes by mayur on 11-May-2018---[end]
}
//Changes by mayur on 15-May-2018---[end]
if (taxClass == null || taxClass.trim().length() == 0) {
// taxclassDes =
// gf_get_taxclass('S',suppCode,"",siteCodeDlv)
taxclassDes = distComm.getTaxClass("S", suppCode,
"", siteCodeDlv, conn);
} else {
taxclassDes = taxClass;
}
if (taxChap == null || taxChap.trim().length() == 0) {
// taxchapDes = gf_get_taxchap("", itemSer, 'S',
// suppCode,siteCodeDlv)
taxchapDes = distComm.getTaxChap("", itemSer, "S",
suppCode, siteCodeDlv, conn);
} else {
taxchapDes = taxChap;
}
if (taxEnv == null || taxEnv.trim().length() == 0) {
// taxenvDes = gf_get_taxenv(stationstanCode,
// stationCodeto, taxchapDes,
......
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