Commit 28cc3773 authored by rtiwari's avatar rtiwari

change to remove item_category validation


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@93811 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 2ff8c778
...@@ -516,9 +516,10 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta ...@@ -516,9 +516,10 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta
System.out.println("@@@@@@@ taxPerc ::::"+taxPerc); System.out.println("@@@@@@@ taxPerc ::::"+taxPerc);
System.out.println("@@@@@@@ taxType ::::"+taxType); System.out.println("@@@@@@@ taxType ::::"+taxType);
sql = " select count(1) from tax_item_stan where stan_code = ? "; sql = " select count(1) from tax_item_stan where stan_code = ? and item_category = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,stanCode); pstmt.setString(1,stanCode);
pstmt.setString(2,itemCategory);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
if(rs.next()) if(rs.next())
{ {
...@@ -531,9 +532,10 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta ...@@ -531,9 +532,10 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta
Timestamp validuptoDB = null,effFromDB = null; Timestamp validuptoDB = null,effFromDB = null;
sql = " select valid_upto,eff_from,item_category from tax_item_stan where stan_code = ? "; sql = " select valid_upto,eff_from,item_category from tax_item_stan where stan_code = ? and item_category = ? ";
pstmt = conn.prepareStatement(sql); pstmt = conn.prepareStatement(sql);
pstmt.setString(1,stanCode); pstmt.setString(1,stanCode);
pstmt.setString(2,itemCategory);
rs = pstmt.executeQuery(); rs = pstmt.executeQuery();
int cntR = 0; int cntR = 0;
while(rs.next()) while(rs.next())
...@@ -578,11 +580,12 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta ...@@ -578,11 +580,12 @@ public class TaxItemStanIC extends ValidatorEJB implements TaxItemStanICLocal,Ta
if(expiryDate.after(validuptoDB)){ if(expiryDate.after(validuptoDB)){
continue; continue;
}else{ }else{
sql = "update tax_item_stan set valid_upto = ? where stan_code = ? and eff_from = ?"; sql = "update tax_item_stan set valid_upto = ? where stan_code = ? and eff_from = ? and item_category = ? ";
pstmt1 = conn.prepareStatement(sql); pstmt1 = conn.prepareStatement(sql);
pstmt1.setTimestamp(1,expiryDate); pstmt1.setTimestamp(1,expiryDate);
pstmt1.setString(2,stanCode); pstmt1.setString(2,stanCode);
pstmt1.setTimestamp(3,effFromDB); pstmt1.setTimestamp(3,effFromDB);
pstmt1.setString(4,itemCategory);
int rows = pstmt1.executeUpdate(); int rows = pstmt1.executeUpdate();
cntR = cntR + rows; cntR = cntR + rows;
pstmt1.close();pstmt1 = null; pstmt1.close();pstmt1 = null;
......
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