Commit 7c6aac3f authored by arawankar's avatar arawankar

DistCommon.java

Changes made in getTaxChapter method to return tax_chapter

git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@197083 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 923b5172
...@@ -8184,15 +8184,23 @@ public class DistCommon { ...@@ -8184,15 +8184,23 @@ public class DistCommon {
String sql = "", taxClass = "", taxChap = ""; String sql = "", taxClass = "", taxChap = "";
try { try {
if ("S".equalsIgnoreCase(suppOrCustCode)) { if ("S".equalsIgnoreCase(suppOrCustCode)) {
sql = "select tax_class " + " from supplieritem " //Modified by Anjali R. on [13/02/2019][Wrong column get][Start]
/*sql = "select tax_class " + " from supplieritem "
+ " where supp_code = ? " + "and item_code = ? ";*/
sql = "select tax_chap from supplieritem "
+ " where supp_code = ? " + "and item_code = ? "; + " where supp_code = ? " + "and item_code = ? ";
//Modified by Anjali R. on [13/02/2019][Wrong column get][End]
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1, custCode); pstmt.setString(1, custCode);
pstmt.setString(2, itemCode); pstmt.setString(2, itemCode);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if (rs.next()) { if (rs.next()) {
taxClass = rs.getString("tax_class") != null ? rs //Modified by Anjali R. on [13/02/2019][Wrong column get][Start]
.getString("tax_class") : ""; /*taxClass = rs.getString("tax_class") != null ? rs
.getString("tax_class") : "";*/
taxChap = rs.getString("tax_chap") != null ? rs
.getString("tax_chap") : "";
//Modified by Anjali R. on [13/02/2019][Wrong column get][End]
} }
rs.close(); rs.close();
rs = null; rs = null;
...@@ -8216,9 +8224,14 @@ public class DistCommon { ...@@ -8216,9 +8224,14 @@ public class DistCommon {
pstmt = null; pstmt = null;
} }
if (taxClass != null && taxClass.trim().length() > 0) { //Modified by Anjali R. on [13/02/2019][Wrong variable check for tax chapter][Start]
/*if (taxClass != null && taxClass.trim().length() > 0) {
return taxClass; return taxClass;
}*/
if (taxChap != null && taxChap.trim().length() > 0) {
return taxChap;
} }
//Modified by Anjali R. on [13/02/2019][Wrong variable check for tax chapter][End]
sql = " select tax_chap " + " from siteitem " sql = " select tax_chap " + " from siteitem "
+ " where site_code = ? " + " and item_code =? "; + " where site_code = ? " + " and item_code =? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
......
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