Commit 990eff25 authored by cpatil's avatar cpatil

modify for cctr code null and tax tran sql while loop


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@101350 ce508802-f39f-4f6c-b175-0d175dae99d5
parent ee5dce63
...@@ -604,7 +604,7 @@ public class MiscPayGltracePreview extends ActionHandlerEJB implements MiscPayGl ...@@ -604,7 +604,7 @@ public class MiscPayGltracePreview extends ActionHandlerEJB implements MiscPayGl
} }
if(cctrCodeReco == null || cctrCodeReco.trim().length() == 0) if(cctrCodeReco == null || cctrCodeReco.trim().length() == 0)
{ {
cctrCodeReco = ""; cctrCodeReco = " ";
}//8th march changes }//8th march changes
hdrmap.put("tran_date",tranDate); hdrmap.put("tran_date",tranDate);
hdrmap.put("eff_date", effDate); hdrmap.put("eff_date", effDate);
...@@ -672,7 +672,7 @@ public class MiscPayGltracePreview extends ActionHandlerEJB implements MiscPayGl ...@@ -672,7 +672,7 @@ public class MiscPayGltracePreview extends ActionHandlerEJB implements MiscPayGl
{ {
if(cctr_code == null) if(cctr_code == null)
{ {
hdrmap.put("cctr_code",""); hdrmap.put("cctr_code"," ");
} }
hdrmap.put("acct_code",acct_code__revr); hdrmap.put("acct_code",acct_code__revr);
hdrmap.put("cctr_code",cctr_code__revr); hdrmap.put("cctr_code",cctr_code__revr);
......
...@@ -469,7 +469,7 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P ...@@ -469,7 +469,7 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P
if(cctrcode == null || cctrcode.trim().length() == 0) if(cctrcode == null || cctrcode.trim().length() == 0)
{ {
cctrcode = ""; cctrcode = " ";
} }
hdrmap.put("emp_code",""); hdrmap.put("emp_code","");
hdrmap.put("anal_code",""); hdrmap.put("anal_code","");
...@@ -822,21 +822,17 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P ...@@ -822,21 +822,17 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P
System.out.println("Transaction Type >>>>"+tranType); System.out.println("Transaction Type >>>>"+tranType);
System.out.println("acctCodePh >>>>"+acctCodePh+ " cctrCodePh "+cctrCodePh); System.out.println("acctCodePh >>>>"+acctCodePh+ " cctrCodePh "+cctrCodePh);
String[] arrayOne = new String[1000]; String[] arrayOne = new String[1000];
if(acctCodePh == null || acctCodePh.trim().length() == 0) if(acctCodePh == null || acctCodePh.trim().length() == 0 )
{ {
System.out.println("706********INSIDING DETERMINATION TYPE"); System.out.println("706********INSIDING DETERMINATION TYPE");
acctCodePh = finCommon.getAcctDetrTtype(itemCode, itemSer, "IN", tranType, conn); acctCodePh = finCommon.getAcctDetrTtype(itemCode, itemSer, "IN", tranType, conn);
arrayOne = getTokens(acctCodePh,","); arrayOne = getTokens(acctCodePh,",");
}
System.out.println("cctrCodePh******"+arrayOne[1]+" acctCodePhStr*********"+arrayOne[0]); System.out.println("cctrCodePh******"+arrayOne[1]+" acctCodePhStr*********"+arrayOne[0]);
//prcp_id = rs.getString("prcp_id");
if(arrayOne.length > 1) if(arrayOne.length > 1)
{ {
cctrCodePhStr = arrayOne[1]; //cctrCodePhStr = arrayOne[1];
cctrCodePhStr = arrayOne[1]==null?" ":arrayOne[1];
} }
else else
{ {
...@@ -850,10 +846,17 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P ...@@ -850,10 +846,17 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P
{ {
acctCodePhStr = " "; acctCodePhStr = " ";
} }
System.out.println("cctrCodePhStr******"+cctrCodePhStr+" acctCodePhStr*********"+acctCodePhStr); System.out.println("inside ==> cctrCodePhStr******"+cctrCodePhStr+" acctCodePhStr*********"+acctCodePhStr);
}
else
{
acctCodePhStr = acctCodePh;
cctrCodePhStr = cctrCodePh;
}
/// pick up the std rate and find out the std amt. /// pick up the std rate and find out the std amt.
System.out.println("outside ==> cctrCodePhStr******"+cctrCodePhStr+" acctCodePhStr*********"+acctCodePhStr);
/****adding code***/ /****adding code***/
qty = rs.getDouble("vouch_qty"); qty = rs.getDouble("vouch_qty");
stdRate = rs.getDouble("std_rate"); stdRate = rs.getDouble("std_rate");
...@@ -1071,11 +1074,11 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P ...@@ -1071,11 +1074,11 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P
cctrCodeReco = rs1.getString("cctr_code__reco"); cctrCodeReco = rs1.getString("cctr_code__reco");
sumRecAmt = rs1.getDouble("reco_amount"); sumRecAmt = rs1.getDouble("reco_amount");
} /* }
rs1.close(); rs1.close();
rs1=null; rs1=null;
pstmt1.close(); pstmt1.close();
pstmt1=null; pstmt1=null;*/
String[] amtRecov = new String[1000]; String[] amtRecov = new String[1000];
if(acctCodeReco == null || acctCodeReco.trim().length() == 0) if(acctCodeReco == null || acctCodeReco.trim().length() == 0)
...@@ -1202,6 +1205,12 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P ...@@ -1202,6 +1205,12 @@ public class PurchaseVoucherGltracePreview extends ActionHandlerEJB implements P
}*/ }*/
}
rs1.close();
rs1=null;
pstmt1.close();
pstmt1=null;
} }
/// if posting is standards then post diff to diff account /// if posting is standards then post diff to diff account
...@@ -1617,11 +1626,11 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]"); ...@@ -1617,11 +1626,11 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]");
ls_acct_tax = rs2.getString("acct_code"); ls_acct_tax = rs2.getString("acct_code");
ls_cctr_tax = checkNull(rs2.getString("cctr_code")); ls_cctr_tax = checkNull(rs2.getString("cctr_code"));
lc_reco_amt = rs2.getDouble("reco_amount"); lc_reco_amt = rs2.getDouble("reco_amount");
} /*}
rs2.close(); rs2.close();
rs2=null; rs2=null;
pstmt2.close(); pstmt2.close();
pstmt2=null; pstmt2=null;*/
if(lc_tax_amt > 0.0) if(lc_tax_amt > 0.0)
{ {
...@@ -1631,7 +1640,8 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]"); ...@@ -1631,7 +1640,8 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]");
} }
if(ls_cctr_tax == null || ls_cctr_tax.trim().length() == 0) if(ls_cctr_tax == null || ls_cctr_tax.trim().length() == 0)
{ {
ls_cctr_tax = acctCodePh; //ls_cctr_tax = acctCodePh;
ls_cctr_tax = cctrCodePh;
} }
/*sql = "select count(*) from vouchdet where acct_code = ? and cctr_code = ?"; /*sql = "select count(*) from vouchdet where acct_code = ? and cctr_code = ?";
...@@ -1719,6 +1729,12 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]"); ...@@ -1719,6 +1729,12 @@ System.out.println("@@@@@@@@@ acctInvOnline["+acctInvOnline+"]");
}*/ }*/
} }
}
rs2.close();
rs2=null;
pstmt2.close();
pstmt2=null;
//Rounding off net Amt //Rounding off net Amt
String ls_cctrcode_rnd = "",ls_acctcode_rnd = ""; String ls_cctrcode_rnd = "",ls_acctcode_rnd = "";
if(rndOff != "N") if(rndOff != "N")
......
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