Commit 2d806389 authored by kshinde's avatar kshinde

added trunc to conf date in sql.

changed eff to error code


git-svn-id: http://15.206.35.175/svn/proteus/business-java/trunk@106357 ce508802-f39f-4f6c-b175-0d175dae99d5
parent 59b1d573
...@@ -92,7 +92,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -92,7 +92,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
} }
if(toDT==null || toDT.trim().length()==0) if(toDT==null || toDT.trim().length()==0)
{ {
errCode="VPEDATE1"; errCode="VMEFFUPTO";
errString = itmDBAccessEJB.getErrorString("",errCode,"","",con); errString = itmDBAccessEJB.getErrorString("",errCode,"","",con);
return errString; return errString;
...@@ -150,7 +150,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -150,7 +150,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and " + "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )" + "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'VOUCH' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 " + " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'VOUCH' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? "; + " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql); pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher"); //pstmt.setString(1,"voucher");
pstmt.setString(1,siteCode); pstmt.setString(1,siteCode);
...@@ -219,7 +219,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -219,7 +219,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ " c.supp_code = i.sundry_code and i.sundry_type = 'S' and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and" + " c.supp_code = i.sundry_code and i.sundry_type = 'S' and s.site_code = i.site_code and i.site_code=? and i.gp_no is null and state.state_code = c.STATE_CODE and"
+ " (c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null)" + " (c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null)"
+ " and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'M-VOUC' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0" + " and (select count(1) from taxtran ti,tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'M-VOUC' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0"
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? "; + " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql1); pstmt=con.prepareStatement(sql1);
//pstmt.setString(1,"voucher"); //pstmt.setString(1,"voucher");
pstmt.setString(1,siteCode); pstmt.setString(1,siteCode);
...@@ -293,7 +293,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -293,7 +293,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='D' and i.gp_no is null and state.state_code = c.STATE_CODE and " + "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='D' and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )" + "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'DRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 " + " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'DRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? "; + " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql); pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher"); //pstmt.setString(1,"voucher");
...@@ -369,7 +369,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -369,7 +369,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
+ "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='C' and i.gp_no is null and state.state_code = c.STATE_CODE and " + "c.supp_code = i.supp_code and s.site_code = i.site_code and i.site_code=? and drcr_flag='C' and i.gp_no is null and state.state_code = c.STATE_CODE and "
+ "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )" + "(c.tax_reg_2 = 'UNREGISTER' or c.tax_reg_2 is null )"
+ " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'CRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 " + " and (select count(1) from taxtran ti, tax tm where tm.tax_code = ti.tax_code and ti.tran_code = 'CRNPAY' and ti.tran_id = i.tran_id and tm.tax_type in ('G','H','I','J') ) > 0 "
+ " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and i.conf_date between ? and ? "; + " and case when i.confirmed is null then 'N' else i.confirmed end = 'Y' and trunc(i.conf_date) between ? and ? ";
pstmt=con.prepareStatement(sql); pstmt=con.prepareStatement(sql);
//pstmt.setString(1,"voucher"); //pstmt.setString(1,"voucher");
...@@ -464,7 +464,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar ...@@ -464,7 +464,7 @@ public class ReverseChargeInvoiceGpGen extends ProcessEJB implements ReverseChar
catch (SQLException e1) catch (SQLException e1)
{ {
e1.printStackTrace(); e1.printStackTrace();
System.out.println("Exception ::"+ e1.getMessage()); System.out.println("Exception ::"+ e1.getMessage());
throw new ITMException(e1); throw new ITMException(e1);
}; };
System.out.println(e.getMessage()); System.out.println(e.getMessage());
......
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