Commit f6fa4a7c authored by agaikwad's avatar agaikwad

set wrong variable to to get tax amount(igst)


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106763 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 7b079f35
......@@ -205,6 +205,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
String igstdr = "", igstdracct = "", igstdrcctr="";
String acctCodesgstadj = "", cctrCodesgstadj = "";
double taxAmtSgst = 0, taxAmttemp = 0, taxAmtcgsttemp = 0;
double taxAmtigsttemp=0,taxAmtcessttemp=0;
double taxAmtCgst = 0;
Timestamp gettranDate = null;
String cessadvcr = "", cessadvcracct = "", cessadvcrcctr="";
......@@ -593,6 +594,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
getLineNo = (Integer) detMapMain.get("line_no");
if ("1".equalsIgnoreCase(getRefType))
{
System.out.println("Refrence Type is :["+getRefType+"]");
sql = "select sum(ti.tax_amt) from taxtran ti, tax tm,adv_rcp_tax a "
+ "where tm.tax_code = ti.tax_code and ti.tran_code = 'RADTAX' and ti.tran_id =a.tran_id and tm.tax_type ='G' and ti.tran_id = ? and ti.line_no= ?";
......@@ -602,8 +604,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
rs = pstmt.executeQuery();
if (rs.next()) {
taxAmttemp = rs.getDouble(1);
System.out.println(" taxAmttemp [" + taxAmttemp
+ "] ");
System.out.println(" taxAmttemp [" + taxAmttemp+ "] ");
}
rs.close();
......@@ -634,9 +635,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, sgstcracct, sgstcrcctr, taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 2["+ RcpAcctList + "]");
/*Added code-*/
////////////////////////////CGST ADVANCE
sql = "select sum(ti.tax_amt) from taxtran ti, tax tm,adv_rcp_tax a "
+ "where tm.tax_code = ti.tax_code and ti.tran_code = 'RADTAX' and ti.tran_id =a.tran_id and tm.tax_type ='H' and ti.tran_id = ? and ti.line_no= ?";
pstmt = conn.prepareStatement(sql);
......@@ -656,24 +655,26 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
// invAcctMap.put("line_no",detLineNo);
RcpAcctMap.put("acct_code", cgstdracct);
RcpAcctMap.put("cctr_code", cgstdrcctr);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtcgsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 3["+ RcpAcctList + "]");
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cgstdracct, cgstdrcctr,taxAmt);
System.out.println("After Modify[" + taxAmttemp + "");
RcpAcctMap = new HashMap();
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cgstcracct);
RcpAcctMap.put("cctr_code", cgstcrcctr);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtcgsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cgstcracct, cgstcrcctr,taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 4["+ RcpAcctList + "]");
//IGST
//IGST ADVANCE
sql = "select sum(ti.tax_amt) from taxtran ti, tax tm,adv_rcp_tax a "
+ "where tm.tax_code = ti.tax_code and ti.tran_code = 'RADTAX' and ti.tran_id =a.tran_id and tm.tax_type ='I' and ti.tran_id = ? and ti.line_no= ?";
pstmt = conn.prepareStatement(sql);
......@@ -681,8 +682,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
pstmt.setInt(2, getLineNo);
rs = pstmt.executeQuery();
if (rs.next()) {
taxAmtcgsttemp = rs.getDouble(1);
System.out.println(" taxAmtcgsttemp ["+ taxAmtcgsttemp + "] ");
taxAmtigsttemp = rs.getDouble(1);
System.out.println(" taxAmtigsttemp ["+ taxAmtigsttemp + "] ");
}
rs.close();
rs = null;
......@@ -693,18 +694,20 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
// invAcctMap.put("line_no",detLineNo);
RcpAcctMap.put("acct_code", igstdracct);
RcpAcctMap.put("cctr_code", igstdrcctr);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtigsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 5["+ RcpAcctList + "]");
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, igstdracct, igstdrcctr,taxAmt);
System.out.println("After Modify[" + taxAmttemp + "");
RcpAcctMap = new HashMap();
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", igstcracct);
RcpAcctMap.put("cctr_code", igstcrcctr);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtigsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, igstcracct, igstcrcctr,taxAmt);
......@@ -721,8 +724,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
rs = pstmt.executeQuery();
if (rs.next())
{
taxAmtcgsttemp = rs.getDouble(1);
System.out.println(" taxAmtcesstemp ["+ taxAmtcgsttemp + "] ");
taxAmtcessttemp = rs.getDouble(1);
System.out.println(" taxAmtcessttemp ["+ taxAmtcessttemp + "] ");
}
rs.close();
rs = null;
......@@ -732,7 +735,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cessadvdracct);
RcpAcctMap.put("cctr_code", cessadvdrcctr);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtcessttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 7["+ RcpAcctList + "]");
......@@ -743,7 +746,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cessadvcracct);
RcpAcctMap.put("cctr_code", cessadvcrcctr);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtcessttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cessadvcracct, cessadvcrcctr,taxAmt);
......@@ -781,6 +784,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, sgstdracctadj, sgstdrcctradj,taxAmt);
System.out.println("Sgst cr amount after " + taxAmttemp);
System.out.println("RcpAcctListADJ@@@@@@@@@@ 1["+ RcpAcctList + "]");
RcpAcctMap = new HashMap();
RcpAcctMap.put("tran_id", tranId);
// invAcctMap.put("line_no",detLineNo);
......@@ -792,7 +797,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, sgstcracctadj, sgstcrcctradj, taxAmt);
System.out.println("RcpAcctListAdj@@@@@@@@@@ 2["+ RcpAcctList + "]");
//////////////////////////////CGST ADJUSTMENT
sql = "select sum(ti.tax_amt) from taxtran ti, tax tm,adv_rcp_tax a "
+ "where tm.tax_code = ti.tax_code and ti.tran_code = 'RADTAX' and ti.tran_id =a.tran_id and tm.tax_type ='H' and ti.tran_id = ? and ti.line_no= ?";
pstmt = conn.prepareStatement(sql);
......@@ -812,22 +818,25 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cgstdracctadj);
RcpAcctMap.put("cctr_code", cgstdrcctradj);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtcgsttemp);
System.out.println("taxAmtadj[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 3["+ RcpAcctList + "]");
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cgstdracctadj, cgstdrcctradj,taxAmt);
System.out.println("After Modify[" + taxAmttemp + "");
RcpAcctMap = new HashMap();
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cgstcracctadj);
RcpAcctMap.put("cctr_code", cgstcrcctradj);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtcgsttemp);
System.out.println("taxAmtAdj[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cgstcracctadj, cgstcrcctradj,taxAmt);
System.out.println("RcpAcctListADJ@@@@@@@@@@ 4["+ RcpAcctList + "]");
/////////////////IGST//////////////////////////////
sql = "select sum(ti.tax_amt) from taxtran ti, tax tm,adv_rcp_tax a "
+ "where tm.tax_code = ti.tax_code and ti.tran_code = 'RADTAX' and ti.tran_id =a.tran_id and tm.tax_type ='I' and ti.tran_id = ? and ti.line_no= ?";
......@@ -836,8 +845,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
pstmt.setInt(2, getLineNo);
rs = pstmt.executeQuery();
if (rs.next()) {
taxAmtcgsttemp = rs.getDouble(1);
System.out.println(" taxAmtcgsttemp ["+ taxAmtcgsttemp + "] ");
taxAmtigsttemp = rs.getDouble(1);
System.out.println(" taxAmtigsttemp ["+ taxAmtigsttemp + "] ");
}
rs.close();
rs = null;
......@@ -848,7 +857,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
// invAcctMap.put("line_no",detLineNo);
RcpAcctMap.put("acct_code",igstcracctadj);
RcpAcctMap.put("cctr_code", igstcrcctradj);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtigsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 5["+ RcpAcctList + "]");
......@@ -860,7 +869,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", igstdracctadj);
RcpAcctMap.put("cctr_code", igstdrcctradj);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtigsttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, igstdracctadj, igstdrcctradj,taxAmt);
......@@ -876,8 +885,8 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
pstmt.setInt(2, getLineNo);
rs = pstmt.executeQuery();
if (rs.next()) {
taxAmtcgsttemp = rs.getDouble(1);
System.out.println(" taxAmtcgsttemp ["+ taxAmtcgsttemp + "] ");
taxAmtcessttemp = rs.getDouble(1);
System.out.println(" taxAmtcessttemp ["+ taxAmtcessttemp + "] ");
}
rs.close();
rs = null;
......@@ -888,7 +897,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
// invAcctMap.put("line_no",detLineNo);
RcpAcctMap.put("acct_code",cesscracctadj);
RcpAcctMap.put("cctr_code", cesscrcctradj);
taxAmt = getCreditAmt(taxAmttemp);
taxAmt = getCreditAmt(taxAmtcessttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
System.out.println("RcpAcctList@@@@@@@@@@ 7["+ RcpAcctList + "]");
......@@ -900,7 +909,7 @@ public class RcpAdvTaxcalcConf extends ActionHandlerEJB implements RcpAdvTaxcalc
RcpAcctMap.put("tran_id", tranId);
RcpAcctMap.put("acct_code", cessdracctadj);
RcpAcctMap.put("cctr_code", cessdrcctradj);
taxAmt = getDebitAmt(taxAmttemp);
taxAmt = getDebitAmt(taxAmtcessttemp);
System.out.println("taxAmt[" + taxAmt + "]");
RcpAcctMap.put("amount", "" + taxAmt);
RcpAcctList = modifyRcpAcctList(RcpAcctList,RcpAcctMap, cessdracctadj, cessdrcctradj,taxAmt);
......
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